
var myAirports = {"location": [{"lat": "40.6937", "long": "-74.1759", "title": "Newark Liberty International Airport", "description": ""},{"lat": "40.639722", "long": "-73.778889", "title": "John F. Kennedy International Airport", "description": ""}]};
var myPointsOfInterest = {"location": [{"lat": "40.703717", "long": "-74.016094", "title": "Battery Park", "description": ""},{"lat": "40.764779", "long": "-73.979895", "title": "Carnegie Hall", "description": ""},{"lat": "40.783921", "long": "-73.964081", "title": "Central Park", "description": ""},{"lat": "40.748433", "long": "-73.9856", "title": "Empire State Building", "description": ""},{"lat": "40.7528", "long": "-73.9765", "title": "Grand Central Station  ", "description": ""},{"lat": "40.750118", "long": "-73.989379", "title": "Macy's Department Store", "description": ""},{"lat": "40.750486", "long": "-73.993547", "title": "Madison Square Garden", "description": ""},{"lat": "40.759722", "long": "-73.979167", "title": "Radio City Music Hall", "description": ""},{"lat": "40.758603", "long": "-73.979167", "title": "Rockefeller Centre", "description": ""},{"lat": "40.6892", "long": "-74.0445", "title": "Statue of Liberty", "description": ""},{"lat": "40.75659", "long": "-73.98626", "title": "Times Square", "description": ""}]};	
	function loadMap(aptsfile, apts, poifile, poi, altzoom, altcentre, altlat, altlon){

		prev = 3;
		next = 2;
		currentDiv = 1;
		shapeCount = 0;
		count = 0;
		divCount = 0;
		liCount = 0;
		LEGEND = 9;		
	
	         map = new VEMap('msMap');
	var sFullLegend = "";			
	var newZoom = 14;if (!((altzoom == "") || (altzoom == undefined) || (altzoom == null))) {var newZoom = altzoom;} 
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
		
	
	var newLat = 40.7471244545455;var newLon = -73.9903809090909;if (!((altlat == "") || (altlat == undefined) || (altlat == null))) {var newLat = altlat;} if (!((altlon == "") || (altlon == undefined) || (altlon == null))) {var newLon = altlon;} map.LoadMap(new VELatLong(newLat, newLon), newZoom ,'h' ,false);
	
		switch(apts){
			case "append":
			CreateLayer(myAirports, "/cms/global/assets/images/icons/flight_blank.gif");CreateLayer(aptsfile, "/cms/global/assets/images/icons/flight_blank.gif");			
			break;
			case "replace":
			CreateLayer(aptsfile, "/cms/global/assets/images/icons/flight_blank.gif");			
			break;
			default:
			CreateLayer(myAirports, "/cms/global/assets/images/icons/flight_blank.gif");			
		}
		switch(poi){
			case "append":
			CreateLayer(myPointsOfInterest, "/cms/global/assets/images/icons/sightseeing_blank.gif");CreateLayer(poifile, "/cms/global/assets/images/icons/sightseeing_blank.gif");			
			break;
			case "replace":
			CreateLayer(poifile, "/cms/global/assets/images/icons/sightseeing_blank.gif");			
			break;
			default:
			CreateLayer(myPointsOfInterest, "/cms/global/assets/images/icons/sightseeing_blank.gif");			
		}

		sFullLegend = genLegend();
		showLegend(sFullLegend);
		truncLegend(1);
	}


		  
		$(function() { 
		      showMapTab(); 
		
		});
	