HWSMap = {
	init : function(){
			virtualEarthMap.generatePushpinData();
			virtualEarthMap.getMap(HWSMap);
	},
		
		browserTweeks : function(){
			if(navigator.userAgent.indexOf("Firefox")!=-1){
				var versionindex=navigator.userAgent.indexOf("Firefox")+8
				if (parseInt(navigator.userAgent.charAt(versionindex))>=1)
					document.writeln("<style>.attractionInfo{top: 0px; !important}</style>")
			}else{
					document.writeln("<style>.attractionInfo{top: -50px; !important}</style>")
			}
		},
			
//set custom icon styles	
	getCustomIcon : function(pushpinNo, category, isAttractionCenteredMap){
				var iconStyle = "pushpin-mapicon";
				var pushpinName = pushpinNo;
				var customIcon;	
				var mapType = "";
				
				document.getElementById("HWS-map-type") != null ? mapType = document.getElementById("HWS-map-type").value : "";
				mapType == "mapIt" ? pushpinName = "" : "";
				
				if(category == "Crowne Plaza Athens City Centre Hotel") {
					iconStyle = "pushpin-hotels";
					pushpinName = "";
				}
				
				customIcon = "<div class='category " + iconStyle + "'>" + pushpinName + "</div>";
				return customIcon;
	},


	displayMapError : function(){
        		var errorBlockObj = document.getElementById("error-messages");
				var hwsMapObj = document.getElementById("hws-map");
        		errorBlockObj != undefined ? errorBlockObj.className = "display-on" : "";
				hwsMapObj != undefined ? hwsMapObj.className = "display-off" : "";
	},
	
	setMapView : function(){
				if(virtualEarthMap.locs.length == 1)
				{
					//When there is only one pushpin on the map, the map is too zoomed in
					//so forcing the zoom level to 15.
					virtualEarthMap.map.SetCenterAndZoom(virtualEarthMap.locs[0], 15);
				}
				else
				{
					virtualEarthMap.map.SetMapView(virtualEarthMap.locs);
				}
	}

}//End 

virtualEarthMap.addLoadEvent(HWSMap.init);
HWSMap.browserTweeks();
