<!--	  //global variables	  	  var checkin="checkin";	  	  // Set the initial date.	  var ds_i_date = new Date();	  ds_c_month = ds_i_date.getMonth() + 1;	  ds_c_year = ds_i_date.getFullYear();	  //ex. new Date("5/28/2008"), new Date("5/29/2008"), ... for reserveddates array	  reserveddates = new Array (new Date("0/0/0"));	  var checkindate = "notdone";	  var checkoutdate = 1;// Pop-up window script	function newWindow(newContent, pageName)			 {			  winContent = window.open(newContent, pageName, 'right=0, top=20, width=400, height=300, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, directories=no, status=no')		 }			function show(obj,msg){messageBox.style.top=obj.offsetTopmessageBox.style.left=obj.offsetLeft+obj.offsetWidth+5contents.innerHTML=msg+"<p>"+obj.hrefmessageBox.style.display="block"}	  // A function to show the calendar.			  // Called by HTML Object			  	// When user click on the date, it will set the content of t.	  	function ds_sh(t) {		  			  		// Set the element to set...	  		ds_element = t;	  			  		//Disable checkout if adjusting the check in Date	  		if(ds_element.id == 'checkout' && checkindate=="notdone"){							alert("Please choose a check-in date first.");					startover();					return;				}		  		if(ds_element.id == 'checkin') {						if(checkindate != "notdone"){					ds_hi();					return;					}				}		  					  		// Make a new date, and set the current month and year			  		// switch month to checkin month			  		if (checkindate == "notdone") {			  			var ds_sh_date = new Date();	  		} else {		  			var ds_sh_date = new Date(checkindate);	  		}		  				  				  		ds_c_month = ds_sh_date.getMonth() + 1;		  		ds_c_year = ds_sh_date.getFullYear();		  				  				  		// Draw the calendar		  		ds_draw_calendar(ds_c_month, ds_c_year);		  		// To change the position properly, we must show it first.		  		ds_ce.style.display = '';		  		// Move the calendar container!				var x = 0;				var y = 10;				if (checkindate != "notdone") {					y=28;				x=15;				}	  		//This next line to adjust the horizontal position			//was not working well, substituted a hard position			//the_left = ds_getleft(t)  - x;			the_left = 300;		  		the_top = ds_gettop(t) + t.offsetHeight - y;		  		ds_ce.style.left = the_left + 'px';		  		ds_ce.style.top = the_top + 'px';		  		// Scroll it into view.		  		ds_ce.scrollIntoView();		  	}			  				  				  				  // Get Element By Id				  function ds_getel(id) {			  	return document.getElementById(id);		  }			  // Get the left and the top of the element.			  function ds_getleft(el) {			  	var tmp = el.offsetLeft;		  	el = el.offsetParent;		  	while(el) {		  		tmp += el.offsetLeft;	  		el = el.offsetParent;	  	}		  	return tmp;		  }			  function ds_gettop(el) {			  	var tmp = el.offsetTop;		  	el = el.offsetParent;		  	while(el) {		  		tmp += el.offsetTop;	  		el = el.offsetParent;	  	}		  	return tmp;		  }			  			  // Output Element			  var ds_oe = ds_getel('ds_calclass');			  // Container			  var ds_ce = ds_getel('ds_conclass');			  			  // Output Buffering			  var ds_ob = ''; 			  function ds_ob_clean() {		  	ds_ob = '';	  }		  function ds_ob_flush() {		  	ds_oe.innerHTML = ds_ob;	  	ds_ob_clean();	  }		  function ds_echo(t) {		  	ds_ob += t;	  }		  		  var ds_element; // Text Element...		  		  var ds_monthnames = [		  'January', 'February', 'March', 'April', 'May', 'June',	  'July', 'August', 'September', 'October', 'November', 'December'		  ]; 			  			  var ds_daynames = [			  'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'			  ]; 			  			  // Calendar template			  function ds_template_main_above(t) {			  	return '<table cellpadding="3" cellspacing="1" class="ds_tbl">'		  	     + '<tr>'		  		 + '<td class="ds_head" style="cursor: pointer" onclick="ds_py();"><<</td>'	  		 + '<td class="ds_head" style="cursor: pointer" onclick="ds_pm();"><</td>'	  		 + '<td class="ds_head" style="cursor: pointer" onclick="ds_hi();" colspan="3">[Close]</td>'	  		 + '<td class="ds_head" style="cursor: pointer" onclick="ds_nm();">></td>'	  		 + '<td class="ds_head" style="cursor: pointer" onclick="ds_ny();">>></td>'	  		 + '</tr>'	  	     + '<tr>'		  		 + '<td colspan="7" class="ds_head">' + t + '</td>'	  		 + '</tr>'	  		 + '<tr>';	  }			  			  function ds_template_day_row(t) {			  	return '<td class="ds_subhead">' + t + '</td>';		  	// Define width in CSS, XHTML 1.0 Strict doesn't have width property for it.		  }			  			  function ds_template_new_week() {			  	return '</tr><tr>';		  }			  			  function ds_template_blank_cell(colspan) {			  	return '<td colspan="' + colspan + '"></td>';	  }		  		  function ds_template_day(d, m, y) {	  	return '<td class="ds_cell" onclick="ds_onclick(' + d + ',' + m + ',' + y + ')" title="Click to choose this date">' + d + '</td>';	  	// Define width the day row.	  }		  		  function ds_template_day_free(d, m, y) {	  	return '<td class="ds_cell" onclick="ds_onclick(' + d + ',' + m + ',' + y + ')" title="Stay at least this long and you get one night free!">' + d + '</td>';	  	// Define width the day row.	  }		  		  // onclick disabled for invalid dates		  function ds_template_day2(d, m, y) {		  	return '<td class="ds_cell2" title="This is not a valid date.">' + d + '</td>';	  	// Define width the day row.	  }	  		  		  // onclick disabled for invalid dates	due to minimum stay	  function ds_template_day3(d, m, y) {		  	return '<td class="ds_cell2" title="There is a 2-night minimum stay.">' + d + '</td>';	  	// Define width the day row.	  }	  		  // onclick disabled for invalid dates	due to 3-night holiday minimum stay	  function ds_template_day4(d, m, y) {		  	return '<td class="ds_cell2" title="There is a 3-night minimum stay&#10;&#13;during the Summer and Holidays.">' + d + '</td>';	  	// Define width the day row.	  }	  // highlight reserved days in red		  function ds_template_resday(d, m, y) {		  	return '<td class="ds_reserved" title="Sorry, someone else got here first!">' + d + '</td>';	  	// Define width the day row.	  }		  		  // highlight selected checkin day in yellow		  function ds_template_checkin(d, m, y) {		  	return '<td class="ds_checkin" title="This is your selected&#10;&#13check-in date">' + d + '</td>';	  	// Define width the day row.	  }		  		  // highlight the first day of a series of reserved dates in dark green		  function ds_template_resfirstday(d, m, y) {		  	return '<td class="ds_resfirstday" title="Someone else is checking in on&#10;&#13this date... but you can check&#10;&#13out on this date.">' + d + '</td>';	  	// Define width the day row.	  }		  		  		  // clear dates		  function startover() {		  	checkindate = "notdone";		checkoutdate = 1		ds_hi();		form.reset();	  	 	  }		  		  		  		  function ds_template_main_below() {		  	return '</tr>' + '<tr>' + '<td colspan=7 align="center">' + 'Click on the desired date' + '</td>' + '</tr>'	  	     + '</table>';	  }		  		  // This one draws calendar...		  function ds_draw_calendar(m, y) {		  // First create some variables to store today's date so we know		  // to gray out the dates that are already in the past		  	var today = new Date();	  	var yesterday = new Date();	   	yesterday.setDate(today.getDate()-1);

		var tomorrow = new Date();

		tomorrow.setDate(today.getDate()+1);	  // Then find earliest reserved date TODAY OR LATER in the current month		  // Variable 'n' will find the first date in the array		  // of reserved dates that occurs in the current month after today		  var n=0;		  while ((yesterday.getTime() > reserveddates[n].getTime() || reserveddates[n].getTime() < new Date(m + '/' + 1 + '/' + y).getTime()) && n<reserveddates.length-1) {		  	n++;	  }				  				  // Finally, we need to know the very first reserved date that occurs			  // after the check-in date				  	if (checkindate == "notdone") {			  		// Nothing to do here		  	} else {			  		// Let's find that date		  		var frd=0;		  		while (reserveddates[frd].getTime() < checkindate.getTime() && frd<reserveddates.length-1) {		  			frd++;	  	}			  				  	// But, if there are no more reserved dates after the check-in date,			  	// all future dates are valid - create a flag for that here			  	AllResDatesPast = 0;		  	if (reserveddates[frd].getTime () < checkindate.getTime()) {		  		AllResDatesPast = 1;	  		}	  	}		  			  	// First clean the output buffer.		  	ds_ob_clean();		  	// Here we go, do the header		  	ds_echo (ds_template_main_above(ds_monthnames[m - 1] + ' ' + y));		  	for (i = 0; i < 7; i ++) {		  		ds_echo (ds_template_day_row(ds_daynames[i]));	  	}		  			  	// Make a date object.		  	var ds_dc_date = new Date();		  	ds_dc_date.setDate(1);			ds_dc_date.setMonth(m - 1);		  	ds_dc_date.setFullYear(y); 	  	if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) {		  		days = 31;	  	} else if (m == 4 || m == 6 || m == 9 || m == 11) {		  		days = 30;	  	} else {		  		days = (y % 4 == 0) ? 29 : 28;	  	}		  	var first_day = ds_dc_date.getDay();		  	var first_loop = 1;		  	// Start the first week		  	ds_echo (ds_template_new_week());		  	// If sunday is not the first day of the month, make a blank cell...		  	if (first_day != 0) {		  		ds_echo (ds_template_blank_cell(first_day));		  	}			  	var j = first_day;			  	for (i = 0; i < days; i ++) {			  		// Today is sunday, make a new week.		  		// If this sunday is the first day of the month,		  		// we've made a new row for you already.		  		if (j == 0 && !first_loop) {		  			// New week!!	  			ds_echo (ds_template_new_week());	  		}		  		// Make a row of that day!		  				  // paint cells in calendar				  						  	  // The variable curdate is the current day of the month	  // as the Javascript paints each day one by one on the screen	  var tempday=i+1;	  curdate=new Date(m + '/' + tempday + '/' + y);	  var curdateplusone = new Date();		curdateplusone.setTime(curdate.getTime()+86400000);	  var curdateplustwo = new Date();		curdateplustwo.setTime(curdate.getTime()+86400000*2);	  var curdateplusthree = new Date();		curdateplusthree.setTime(curdate.getTime()+86400000*3);	  var curdateminusone = new Date();		curdateminusone.setTime(curdate.getTime()-86400000);	  var curdateminustwo = new Date();		curdateminustwo.setTime(curdate.getTime()-86400000*2);	  var curdateminusthree = new Date();		curdateminusthree.setTime(curdate.getTime()-86400000*3);	  var FreeNight = new Date();	  if (checkindate == "notdone") {} else {		FreeNight.setTime(checkindate.getTime()+86400000*7);		}	  	  // Determine holiday 4-night minimum rental period	  if (m > 1) {	  HolidayStart = new Date(12 + '/' + 20 + '/' + y);	  nexty = y+1;	  HolidayEnd = new Date (1 + '/' + 5 + '/' + nexty);	  }	  else if (m == 1) {	  prevy = y-1;	  HolidayStart = new Date(12 + '/' + 20 + '/' + prevy);	  HolidayEnd = new Date (1 + '/' + 5 + '/' + y);	  }

	 // Set Summer begin/end dates
	 SummerStart = new Date(5 + '/' + 22 + '/' + y);
	 SummerEnd = new Date(9 + '/' + 11 + '/' + y);


	  	  if (checkindate == "notdone") {	  // This code runs if user is selecting checkin date	  			  // Now apply the appropriate colors to the calendar			  			  // Set past dates as gray with no hyperlinks			  if (yesterday.getTime() >= curdate.getTime()) {			  ds_echo (ds_template_day2(i + 1, m, y));			  		}	  			  // If the date is reserved, make it appear red			  else if (curdate.getTime() == reserveddates[n].getTime()) { 			  			  	// Unless this is the first date of someone else's reservation		  	// in which case it's a valid check-out date - color dark green		  	veryfirst=0;		  	previousdate=n;		  	if (n==0) {		  		veryfirst=1;	  		}	  	else {previousdate=n-1}		  	if (curdateminusone.getTime() != reserveddates[previousdate].getTime() ||		  veryfirst==1) {			  		ds_echo (ds_template_resfirstday(i + 1, m, y));	  		}	  	else {		  		ds_echo (ds_template_resday(i + 1, m, y));	  		}	  	// This is a reserved day, so move to the next one		  	// in the array, if there is a next one		  	if (n<reserveddates.length-1) {		  		n++; }	  	}		  			  // Make sure to disable the date right before any reserved				  // dates since you can't make a 1-night reservation	  //   ********* This is disabled ********			  ///////else if (curdateplusone.getTime() == reserveddates[n].getTime()) { 				  ///////		ds_echo (ds_template_resfirstday(i + 1, m, y));		  ///////		}		  				  // Because of the 4-night minimum stay over the holidays, disable			  // the next two nights before any holiday reservation	  //   ****** 4-night minimum disabled *******			  // else if (curdate.getTime() >= HolidayStart.getTime() &&				  // curdate.getTime() <= HolidayEnd.getTime() &&				  //			(curdateplustwo.getTime() == reserveddates[n].getTime() ||	  //			curdateplusthree.getTime() == reserveddates[n].getTime())) { 	  //		ds_echo (ds_template_resfirstday(i + 1, m, y));	  //		}		  				  				  			  // Otherwise, make it green		  else {			  		ds_echo (ds_template_day(i + 1, m, y));	  		}	  	}		  			  // Once checkin date is chosen, the check-out selection code runs:		  else {			  			  // Paint the check-in date yellow			  if (curdate.getTime() == checkindate.getTime()){			  	ds_echo (ds_template_checkin(i + 1, m, y));		}		  			  // Disable the day right after the check-in date			  // Because of the two-night minimum stay requirement			  else if (curdateminusone.getTime() == checkindate.getTime()){		// Except if there is only one more night between		// the Check-in Date and the next reservation, then allow a 1-night reservation		// for this special case		if (curdate.getTime() == reserveddates[frd].getTime()){			ds_echo (ds_template_day(i + 1, m, y));			}		else {	  		ds_echo (ds_template_day3(i + 1, m, y));			}		}	  //   ****** 3-night minimum *******			  // Because of the 3-night minimum stay over Summer & the holidays, disable		  // the second night after any holiday check-in date	  //  HOLIDAY 3-night min disabled!!!   Paste this criterion into the else if statement below	  //   to put it back:		//(curdate.getTime() >= HolidayStart.getTime() && curdate.getTime() <= HolidayEnd.getTime()) ||	  else if (( (curdate.getTime() >= SummerStart.getTime() && curdate.getTime() 	   	<= SummerEnd.getTime())) && (curdateminustwo.getTime() == checkindate.getTime())) { 				// Except if there are only two nights between		// the Check-in Date and the next reservation, then allow a 2-night reservation		// for this special case		if (curdate.getTime() == reserveddates[frd].getTime()){			ds_echo (ds_template_day(i + 1, m, y));			}		else {			ds_echo (ds_template_day4(i + 1, m, y));			}	  	}		  			  // Now determine whether curdate comes at least two days			  // after the checkin date			  else if (curdateminusone.getTime() > checkindate.getTime()) {			  			  		// If curdate is before the first reserved date after the check-in	  		// date, this is a valid check-out date... paint green		  		if(curdate.getTime() < reserveddates[frd].getTime() || AllResDatesPast == 1) {			  			// If this is the 7th night, make it free				if (curdate.getTime() >= FreeNight.getTime()) {					ds_echo (ds_template_day_free(i + 1, m, y));				} else {										ds_echo (ds_template_day(i + 1, m, y));					}	  		}			  					  		// If curdate is equal to the first reserved date after the check-in			  		// date, this special case is a valid check-out date... paint green		  		else if(curdate.getTime() == reserveddates[frd].getTime()) {			  			// But, again, If this is the 7th night, make it free				if (curdate.getTime() >= FreeNight.getTime()) {					ds_echo (ds_template_day_free(i + 1, m, y));				} else {										ds_echo (ds_template_day(i + 1, m, y));					}	  			// Also, note this is a reserved day, so move to the next one	  			// in the array, if there is a next one		  			if (n<reserveddates.length-1) {		  				n++; }	  			}		  					  // When curdate is a reserved date, paint red, as long as this is					  // not the special case above					  else if (curdate.getTime() == reserveddates[n].getTime()){							ds_echo (ds_template_resday(i + 1, m, y));			  			// This is a reserved day, so move to the next one	  			// in the array, if there is a next one		  			if (n<reserveddates.length-1) {		  				n++;	  			}		  		}		  					  		// Only other possibility - date is not reserved but there is			  		// a reserved date in between this date and the check-in date,		  		// so it would be invalid - paint it gray			  		else {			  			ds_echo (ds_template_day2(i + 1, m, y));		  		}			  	}			  				  	// Now we deal with dates that come before the check-in date			  else {				  	// Reserved dates get painted red			  	if (curdate.getTime() == reserveddates[n].getTime()){			  			ds_echo (ds_template_resday(i + 1, m, y));  			// This is a reserved day, so move to the next one	  			// in the array, if there is a next one  			if (n<reserveddates.length-1) {	  				n++; }  }				  				  		// And all other dates get painted gray		  else {				  			ds_echo (ds_template_day2(i + 1, m, y));	  			}  		}	  	}		  			  		// This is not first loop anymore...	  		first_loop = 0;	  		// What is the next day?	  		j ++;	  		j %= 7;	  	}		  	// Do the footer		  	ds_echo (ds_template_main_below());		  	// And let's display..		  	ds_ob_flush();	  	// Scroll it into view.	  	ds_ce.scrollIntoView();	  }		  		  	// Hide the calendar.	  	function ds_hi() {	  		ds_ce.style.display = 'none';  	}	  		  	// Moves to the next month...	  	function ds_nm(tt) {	  		// Increase the current month.  		ds_c_month ++;  		// We have passed December, let's go to the next year.  		// Increase the current year, and set the current month to January.  		if (ds_c_month > 12) {	  			ds_c_month = 1;   			ds_c_year++;  		}	  		// Redraw the calendar.	  		ds_draw_calendar(ds_c_month, ds_c_year);	  	}		  			  // Moves to the previous month...			  function ds_pm(tt) {			  	ds_c_month = ds_c_month - 1; // Can't use dash-dash here, it will make the page invalid.		  	// We have passed January, let's go back to the previous year.  	// Decrease the current year, and set the current month to December.	  	if (ds_c_month < 1) {		  		ds_c_month = 12;   		ds_c_year = ds_c_year - 1; // Can't use dash-dash here, it will make the page invalid.  	}	  	// Redraw the calendar.	  	ds_draw_calendar(ds_c_month, ds_c_year);	  }		// Moves to the next year...		function ds_ny(tt) {			// Increase the current year.		ds_c_year++;		// Redraw the calendar.		ds_draw_calendar(ds_c_month, ds_c_year);	}		// Moves to the previous year...		function ds_py(tt) {		// Decrease the current year.	ds_c_year = ds_c_year - 1; // Can't use dash-dash here, it will make the page invalid.	// Redraw the calendar.	ds_draw_calendar(ds_c_month, ds_c_year);}	// Format the date to output.	function ds_format_date(d, m, y) {	return m + '/' + d + '/' + y;	//selecteddate= new Date(m + '/' + d + '/' + y);	//return ds_daynames[selecteddate.getDay()] + ', ' + ds_monthnames[m-1] + ' ' + d + ', ' + y;}	// When the user clicks the day.	function ds_onclick(d, m, y) {		// Hide the calendar.		ds_hi();		// Set the value of it, if we can.	if (typeof(ds_element.value) != 'undefined') {			ds_element.value = ds_format_date(d, m, y);	// Maybe we want to set the HTML in it.		} else if (typeof(ds_element.innerHTML) != 'undefined') {			ds_element.innerHTML = ds_format_date(d, m, y);	// I don't know how should we display it, just alert it to user.		} else {			alert (ds_format_date(d, m, y));	}		if(checkindate == "notdone") {			checkindate = new Date(m + '/' + d + '/' + y);	}	// Show calendar for checkout date.	if(checkoutdate == 1) {		checkoutdate = new Date(m + '/' + d + '/' + y);		ds_sh(checkout);	} else {				// If this is a 7-night stay, note that one is free		checkoutdate = new Date(m + '/' + d + '/' + y);		if (checkoutdate.getTime() - checkindate.getTime() >= 86400000*7) {			alert("You get one night free if you book these dates!");			}	}}		-->		
