function submitForm() {b_valid = true; if(!htlDoaCal.returnSelectedDate("doa_yy","doa_mm","doa_dd")) b_valid = false; if(!htlDodCal.returnSelectedDate("dod_yy","dod_mm","dod_dd")) b_valid = false; critUpdate(); return (b_valid);}
function pastDate(date) {var now = new Date(); now = now.getTime(); var params	= date.split('/'); var mm = params[0]; var dd = params[1]; var yy = params[2]; var dateToCheck = new Date(); dateToCheck.setYear(yy); dateToCheck.setMonth(mm-1); dateToCheck.setDate(dd); var checkDate = dateToCheck.getTime(); var futureDate = (now < checkDate); var pastDate = (now > checkDate);	if (pastDate == true) return true; else return false;}
function critCheck() {var x = get_cookie('HotelWidget'); if (x) {var params	= x.split('|');	var doa		= params[0].substring(params[0].indexOf('=')+1); var dod = params[1].substring(params[1].indexOf('=')+1); if (pastDate(doa) || pastDate(dod)) {document.getElementById('chk_in').value = 'MM/DD/YYYY'; document.getElementById('chk_out').value	= 'MM/DD/YYYY';} else {document.getElementById('chk_in').value	= doa; document.getElementById('chk_out').value	= dod; }} return null;}
function critUpdate() {	var doa	= document.getElementById('chk_in').value; var dod	= document.getElementById('chk_out').value;	var cookie_string = "doa="+escape(doa)+"|dod="+escape(dod);	set_cookie('HotelWidget',cookie_string); return null;}
function delete_cookie ( cookie_name ) {var cookie_date = new Date ( );	cookie_date.setTime ( cookie_date.getTime() - 1 );	document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();	}
function get_cookie ( cookie_name ) {var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );	if ( results ) return ( unescape ( results[2] ) );	else return null;}
function set_cookie ( name, value ) {var cookie_string = name + "=" + escape ( value ) + "; expires=31/12/2222 00:00:00"; delete_cookie(name); document.cookie = cookie_string;	}
