function loadsearchbox(pagename)
{
var url = "/includes/" + pagename;

var myAjax = new Ajax.Request(url, {
		method: 'get', 
		parameters: null, 
		onComplete: getSearchbox
	});	
}

function getSearchbox(originalRequest)
{
	$("hsearch").innerHTML = originalRequest.responseText;
	initDate();
}


function googlemap(lgi,lti,hname,hid)
{
window.location.href ="/gmap.aspx?hid="+ hid +"&lgi=" + lgi +"&lti="+ lti +"&hname="+ hname;

//(url,null, 'resizable=yes,scrollbars=yes,location=yes,width=750,height=750'); 
}
function initDate()
 {
   //alert("run initdate from hotel.js");
 
   var now = new Date();
   var mth = now.getMonth();
   var dd = now.getDate();
   var yy = now.getFullYear();

   var yearboxarr=document.resrvForm.doa_yy;
   var yearboxdep=document.resrvForm.dod_yy;

   //yearboxarr.clear();
   //yearboxdep.clear();

   for (i=0; i<3; i++) {
     yy2d=yy%100;
     yearboxarr[i]=new Option(yy2d,yy);
   }
   
   if (mth <10)
    {
      mth == 0 + mth;
     }
   if (dd <10)
    {
      dd == 0 + dd;
    }
     if ((mth==11) && (dd>=29)) {
		 document.resrvForm.doa_mm.selectedIndex = mth;
		 document.resrvForm.doa_dd.selectedIndex = dd - 1;
		 document.resrvForm.dod_yy.value= yy;
		 document.resrvForm.dod_dd.selectedIndex = dd - dd;
		 document.resrvForm.dod_mm.selectedIndex = mth-mth;
		 document.resrvForm.dod_yy.value= yy+1;
     }
     else if ((dd>=29 ) || ((dd>=27 ) && (mth==1)))
     {
	 document.resrvForm.doa_mm.selectedIndex = mth+1;
     document.resrvForm.doa_dd.selectedIndex = dd-dd;
     document.resrvForm.doa_yy.value= yy;
     document.resrvForm.dod_dd.selectedIndex = (dd-dd)+1;
     document.resrvForm.dod_mm.selectedIndex = mth + 1;
     document.resrvForm.dod_yy.value= yy;
    }
   else
    {
   	document.resrvForm.doa_mm.selectedIndex=mth;
   	document.resrvForm.doa_dd.selectedIndex=dd+1;
   	document.resrvForm.dod_yy.value= yy;
   	document.resrvForm.dod_mm.selectedIndex=mth;
   	document.resrvForm.dod_dd.selectedIndex=dd+3;
	document.resrvForm.dod_yy.value= yy;
   }
}

function initDateNoyear()
 {
   var now = new Date();
   var mth = now.getMonth();
   var dd = now.getDate();
   var yy = now.getFullYear();
   if (mth <10)
    {
      mth == 0 + mth;
     }
   if (dd <10)
    {
      dd == 0 + dd;
    }
     if ((mth==11) && (dd>=29)) {
		 document.resrvForm.doa_mm.selectedIndex = mth;
		 document.resrvForm.doa_dd.selectedIndex = dd - 1;

		 document.resrvForm.dod_dd.selectedIndex = dd - dd;
		 document.resrvForm.dod_mm.selectedIndex = mth-mth;
		
     }
     else if ((dd>=29 ) || ((dd>=27 ) && (mth==1)))
     {
	 document.resrvForm.doa_mm.selectedIndex = mth+1;
     document.resrvForm.doa_dd.selectedIndex = dd-dd;
    
     document.resrvForm.dod_dd.selectedIndex = (dd-dd)+1;
     document.resrvForm.dod_mm.selectedIndex = mth + 1;
    
    }
   else
    {
   	document.resrvForm.doa_mm.selectedIndex=mth;
   	document.resrvForm.doa_dd.selectedIndex=dd+1;
   
   	document.resrvForm.dod_mm.selectedIndex=mth;
   	document.resrvForm.dod_dd.selectedIndex=dd+3;
	
   }
}

//initDate();