// JavaScript Document
function checkMiniSearch(){
	var miniPlaceFinder = document.getElementById('miniPlaceFinder');
	if (miniPlaceFinder.destination.selectedIndex == 0){
		alert('Please select a location.');
		return false; 
	}
	if (miniPlaceFinder.month.selectedIndex == 0){
		alert('Please select a check in month.');
		return false; 
	}
	if (miniPlaceFinder.day.selectedIndex == 0){
		alert('Please select a check in day.');
		return false; 
	}
		if (miniPlaceFinder.depart_month.selectedIndex == 0){
		alert('Please select a check out month.');
		return false; 
	}
	if (miniPlaceFinder.depart_day.selectedIndex == 0){
		alert('Please select a check out day.');
		return false; 
	}
	var result = validateDates('miniPlaceFinder');
	if( result == 1 ) {
		alert('The Check in date must be before the Check out date. A date earlier than today is considered next year.');
		return false;
	}
	if( result == 2) {
		alert('You cannot book a room more than 51 weeks in the future. A date earlier than today is considered next year.');
		return false;
	}
}
function goOffer(destinationId, srp) {
	var destination = document.getElementById(destinationId);
	var placeFinder = document.getElementById('placeFinder');
	placeFinder.destination.value=destination.value;
	placeFinder.srp.value=srp;
	placeFinder.submit();
}
var vipid='Corporate ID';
function checkClientID(){
	var clientlogin = document.getElementById('clientlogin');
	if (clientlogin.client.value == '' || clientlogin.client.value == vipid){
		alert('Please enter your Client ID.');
		return false; 
	}	
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments;
	document.MM_sr=new Array;
	for(i=0;i<(a.length-2);i+=3)
		if ((x=MM_findObj(a[i]))!=null) { 
			document.MM_sr[j++]=x;
			if(!x.oSrc) x.oSrc=x.src;
			x.src=a[i+2];
		}
}
function checkGoogle(searchMsg) {
      var google = document.getElementById('google');
      if( google.q.value == searchMsg ) {
            return false;
      }
      return true;
}