
<!--START COMPONENT:3-->
//ScRIPT FOR Reservation and GHA Toggle
function mpToggle() {
if(203830 == '203487' || 203830 == '203636' || 203830 == '203635') {
//FOR Homepage
document.getElementById('mpReservationBox').style.display='block';
document.getElementById('ghaReservationBox').style.display='none';
document.getElementById('leftTab').style.backgroundImage="url(/media/Images/Themes/Marco_Polo/home_tableft.gif)"
document.getElementById('tabTitle').style.backgroundColor = "#586871";
document.getElementById('resLink').style.color = "#C0C0BF"; 
document.getElementById('rightTab').style.backgroundImage = "url(/media/Images/Themes/Marco_Polo/home_tabright.gif)";
document.getElementById('ghaleftTab').style.backgroundImage = "url(/media/Images/Themes/Marco_Polo/home_tableft_d.gif)";
document.getElementById('ghatabTitle').style.backgroundColor = "#75848C";
document.getElementById('ghaLink').style.color = "#94a0a6"; 
document.getElementById('gharightTab').style.backgroundImage = "url(/media/Images/Themes/Marco_Polo/home_tabright_d.gif)";
document.getElementById('tabLogo_gha').style.backgroundColor = "#75848C";
}
else {
//FOR Subapge
document.getElementById('mpReservationBox').style.display='block';
document.getElementById('ghaReservationBox').style.display='none';
$("#ghaleftTab").css("background", "url(/media/images/Themes/Marco_Polo/leftnav_tableft_d.gif)");
$("#gharightTab").css("background", "url(/media/images/Themes/Marco_Polo/leftnav_tabright_d.gif)");
$("#ghatabTitle").css("background", "#BDBBB0");

$("#tabLogo_gha").css("background", "#BDBBB0 url(/media/Images/Themes/Marco_Polo/gha_Logo_d.png)");

$("#leftTab").css("background", "url(/media/images/Themes/Marco_Polo/leftnav_tableft.gif)");
$("#rightTab").css("background", "url(/media/images/Themes/Marco_Polo/leftnav_tabright.gif)");
$("#tabTitle").css("background", "#E4E2D6");
}
}

function ghaToggle() {
if(203830 == '203487' || 203830 == '203636' || 203830 == '203635') {
document.getElementById('mpReservationBox').style.display='none';
document.getElementById('ghaReservationBox').style.display='block';
document.getElementById('leftTab').style.backgroundImage="url(/media/Images/Themes/Marco_Polo/home_tableft_d.gif)"
document.getElementById('tabTitle').style.backgroundColor = "#75848C";
document.getElementById('resLink').style.color = "#C0C0BF";
document.getElementById('rightTab').style.backgroundImage = "url(/media/Images/Themes/Marco_Polo/home_tabright_d.gif)"
document.getElementById('ghaleftTab').style.backgroundImage = "url(/media/Images/Themes/Marco_Polo/home_tableft.gif)";
document.getElementById('ghatabTitle').style.backgroundColor = "#586871";
document.getElementById('ghaLink').style.color = "#94a0a6";
document.getElementById('gharightTab').style.backgroundImage = "url(/media/Images/Themes/Marco_Polo/home_tabright.gif)";
document.getElementById('tabLogo_gha').style.backgroundColor = "#586871";
}
else {
//FOR SUBPAGE
document.getElementById('mpReservationBox').style.display='none';
document.getElementById('ghaReservationBox').style.display='block';
$("#ghaleftTab").css("background", "url(/media/images/Themes/Marco_Polo/leftnav_tableft.gif)");
$("#gharightTab").css("background", "url(/media/images/Themes/Marco_Polo/leftnav_tabright.gif)");
$("#ghatabTitle").css("background", "#E4E2D6");
$("#tabLogo_gha").css("background", "#E4E2D6 url(/media/Images/Themes/Marco_Polo/gha_Logo_d.png)");

$("#leftTab").css("background", "url(/media/images/Themes/Marco_Polo/leftnav_tableft_d.gif)");
$("#rightTab").css("background", "url(/media/images/Themes/Marco_Polo/leftnav_tabright_d.gif)");
$("#tabTitle").css("background", "#BDBBB0");
}
}


//ScRIPT FOR HOMEPAGE Member Checkbox Toggle
function memToggle() {
if(document.getElementById('memCheckBox').checked) {
document.getElementById('memberForm').style.display='block';
document.getElementById('freeTollNumber').style.display='none';
}

else if (!document.getElementById('memCheckBox').checked)  {
document.getElementById('memberForm').style.display='none';

document.getElementById('freeTollNumber').style.display='block';

}
}
//ScRIPT FOR HOMEPAGE Member Checkbox Toggle ENDS HERE

function toggleSecMenu(show)
{
var o = document.getElementById('footerSecMenu');
if (o)
{
if (show)
{
o.style.display = 'block';
}
else
{
o.style.display = 'none';
}
}
}



var HotelsUriTable =  new Array();
HotelsUriTable.push(new Array("HKG356","/en/hotels/hongkong/kowloon/gateway/index.html"));HotelsUriTable.push(new Array("DVO1362","/en/hotels/philippines/davao/marco_polo_davao/index.html"));HotelsUriTable.push(new Array("HKG355","/en/hotels/hongkong/kowloon/marco_polo_hongkong/index.html"));HotelsUriTable.push(new Array("HKG1367","/en/hotels/hong_kong_sar/kowloon/prince/index.html"));HotelsUriTable.push(new Array("BJS339","/en/hotels/china/beijing/marco_polo_parkside/index.html"));HotelsUriTable.push(new Array("WUH1176","/en/hotels/china/hankou/marco_polo_wuhan/index.html"));HotelsUriTable.push(new Array("BJS339","/en/hotels/china/beijing/marco_polo_parkside/index.html"));HotelsUriTable.push(new Array("CEB1589","/en/hotels/philippines/cebu/marco_polo_plaza/index.html"));HotelsUriTable.push(new Array("HKG356","/en/hotels/hongkong/kowloon/gateway/index.html"));HotelsUriTable.push(new Array("HKG355","/en/hotels/hongkong/kowloon/marco_polo_hongkong/index.html"));HotelsUriTable.push(new Array("HKG1367","/en/hotels/hong_kong_sar/kowloon/prince/index.html"));HotelsUriTable.push(new Array("WUH1176","/en/hotels/china/hankou/marco_polo_wuhan/index.html"));HotelsUriTable.push(new Array("XMN1363","/en/hotels/china/xiamen/marco_polo_xiamen/index.html"));HotelsUriTable.push(new Array("SZX7633","/en/hotels/china/shenzhen/marco_polo_shenzhen/index.html"));HotelsUriTable.push(new Array("DVO1362","/en/hotels/philippines/davao/marco_polo_davao/index.html"));HotelsUriTable.push(new Array("XMN1363","/en/hotels/china/xiamen/marco_polo_xiamen/index.html"));HotelsUriTable.push(new Array("CEB1589","/en/hotels/philippines/cebu/marco_polo_plaza/index.html"));HotelsUriTable.push(new Array("SZX7633","/en/hotels/china/shenzhen/marco_polo_shenzhen/index.html"));HotelsUriTable.push(new Array("JJN1177","/en/hotels/china/jinjiang/marco_polo_jinjiang/index.html"));HotelsUriTable.push(new Array("JJN1177","/en/hotels/china/jinjiang/marco_polo_jinjiang/index.html"));//This is a dependency of Standard Reservation Box

function goToHotel(){
var url="/index.html";
var hotelCode=document.reservationForm.propertySelect.options[document.reservationForm.propertySelect.selectedIndex].value;

for(var i=0; i < HotelsUriTable.length;i++)
{
  if(HotelsUriTable[i][0] == hotelCode) url = HotelsUriTable[i][1];
}
location.href=url;
}

function checkAvail() {
    if (document.getElementById('arrive').value == "" || document.getElementById('depart').value == "") {
    alert("Please select Arrival Date/Departure Date");
    return false;
    }
    else if (document.reservationForm.propertySelect.value =="default") {
    alert("Please select a Property");
    return false;
    }
    else {
    return true;
    }
}

//function to randomize the order of the property listing

$(function(){
var max=$(".xhotelListEntry > div").length;
var pickGroup = Math.floor(Math.random()*max+1)-1;
$(".hotelListEntry > div").eq(pickGroup).clone().insertBefore(".hotelListEntry > div:first");
$(".hotelListEntry > div").eq(pickGroup+1).remove();
});

//virtual tour


var VrxStudiosPopUp;
var VrxStudiosFramePopUp;
						
function PopUp(urlstr, height, width)
{
var options = 'height=' + height + ',width=' + width + ',toolbar=no,menubar=no,scrollbars=no,resizable=no,status=no,location=no,z-lock=yes,left=5,top=5';
VrxStudiosPopUp = window.open(urlstr, 'VrxStudiosPopUp', options); 
VrxStudiosPopUp.focus();
}

function PopUpVirtualTour(urlstr, height, width)
{
PopUp(urlstr, height, width);
}
<!--END COMPONENT:3-->
