var icons = [];
var map = null;
$(document).ready(function(){
    Whl.Site.initPortalPage(); 
    Whl.getMore();
    Whl.toggleContent({controlHideClass:'txt_icon01',controlShowClass:'txt_icon'}); 
    // Accm By Region/Type
    Whl.tab('accm-tab', 'active');
    if(hotelData) 
    {   
        InitGoogleMap();
        if(hotelData.siteType != 0){
        	if(hotelData) AddOtherMarker(hotelData, hotel, arrHotel);    	
            if(pointData) AddOtherMarker(pointData, landmark, arrPoi); 
        }    	
        else{
        	$('#uxHotel').attr('src', '/images/blue/en/hotel_off.gif');
        	$('#uxShowShop').attr('src', '/images/blue/en/shopping_off.gif');
        	$('#uxShowRes').attr('src', '/images/blue/en/restaurant_off.gif');
        	$('#uxShowPoi').attr('src', '/images/blue/en/landmark_off.gif');
        	AddDestPoint(hotelData);
        }    	
    }
});

function GInitIcon(){
    var arrIconName = ['flag_blue','flag_red','flag_yellow','flag_green'];
    for (var i = 0; i < 4; i++){
    	var icon = new GIcon();
    	icon.image = "/images/" + arrIconName[i] + ".gif";
    	icon.iconSize = new GSize(16, 16);
    	icon.iconAnchor = new GPoint(8, 15);
    	icons[i] = icon;
    }
}

function InitGoogleMap()
{
	if (!GBrowserIsCompatible()) return;	
	var arrMap = [G_NORMAL_MAP, G_SATELLITE_MAP, G_PHYSICAL_MAP];
	map = new GMap2(document.getElementById("site_map"));
	map.setCenter(new GLatLng(default_lat, default_lon), default_zoom);	    
    map.addControl(new FilterMarkerControl(landmark));
    map.setUIToDefault(); 
    map.setMapType(arrMap[mapType]);
    map.disableScrollWheelZoom();    	
	GInitIcon();
}

function GotoAccm(accm){
    window.location.href = "../"+accm;
}
