// JavaScript Documentfunction checkfields() { var error=0;    var now = new Date();    var curMonth = (now.getMonth()+1);    if (document.formHO.dateLeavingMonth.value < curMonth)       {theyear = now.getFullYear()+1;}    else if (document.formHO.dateLeavingMonth.value >= curMonth)       {theyear = now.getFullYear();}    if (document.formHO.dateReturningMonth.value < curMonth)       {thedepyear = now.getFullYear()+1;}    else if (document.formHO.dateReturningMonth.value >= curMonth)       {thedepyear = now.getFullYear();}	document.formHO.checkin.value=document.formHO.dateLeavingMonth.value+'/'+document.formHO.dateLeavingDay.value+'/'+theyear;	document.formHO.checkout.value=document.formHO.dateReturningMonth.value+'/'+document.formHO.dateReturningDay.value+'/'+thedepyear;	if (document.formHO.property.value == 0) {		document.formHO.submit();}	else {		//Property selected from the multiple property dropdown		URLVars='id='+document.formHO.property.value+'&checkin='+document.formHO.checkin.value+'&checkout='+document.formHO.checkout.value+'&adults='+document.formHO.adults.value+'&children='+document.formHO.children.value+'&rooms='+document.formHO.rooms.value+'&refLoc='+document.formHO.JSrefLoc.value+'&bookedOnrefLoc='+document.formHO.JSbookedOnrefLoc.value;		document.formHO.action='https://secure.guestdesk.com/reservations/?'+URLVars; document.formHO.submit(); }}function rePositionCal (e) {  var theCoodinates=checkwhere(e);  var coodinateArray=theCoodinates.split(":");  var Xcoodinate=parseInt(coodinateArray[0])-50;  var Ycoodinate=parseInt(coodinateArray[1])+10;  var ifr =     document.all ? document.all['iframeCal'] :       document.getElementById('iframeCal');  ifr.style.top=Ycoodinate+'px';  ifr.style.left=Xcoodinate+'px';  //ifr.style.visibility='hidden';}function checkwhere(e) {  // returns the mouse x and y coodinates to position the calendar    var posx = 0;	var posy = 0;	if (!e) var e = window.event;	if (e.pageX || e.pageY) 	{		posx = e.pageX;		posy = e.pageY;	}	else if (e.clientX || e.clientY) 	{		posx = e.clientX + document.body.scrollLeft			+ document.documentElement.scrollLeft;		posy = e.clientY + document.body.scrollTop			+ document.documentElement.scrollTop;	}  return (posx+':'+posy)}function openArrivalCal(theEvent) {	window.calendar.openCal(theEvent,'HO_from','HO_cal');	adjDate(document.formHO);	rePositionCal();}function openDepartureCal(theEvent) {	window.calendar.openCal(theEvent,'HO_to','HO_cal');	b_stopBit = 1;	rePositionCal();}
