function submitReservationsForm(){
	var oForm = document.getElementById('reservationsForm');

	if(oForm.arrive.value == '' || oForm.arrive.value == 'GROUP CODE'){
		alert("Please enter the date");
		oForm.arrive.focus();
		return;
	}
	
	
	
	if(Date.isValid(oForm.arrive.value,'') == false){
		alert("Please enter a valid date MM/DD/YYYY");
		oForm.arrive.focus();
		return;
	}
	
	if(oForm.Group.value == 'GROUP CODE'){
		oForm.Group.value = '';
	}
	if(oForm.Promo.value == 'PROMO CODE'){
		oForm.Promo.value = '';
	}
	
	
	
	oForm.action = 'https://reservations.synxis.com/gc/rez.aspx';
	oForm.submit();
}


function redirecting(url){
	//alert(url);
	location.href = url;
	
}

function reservationGroupFocus(){
	var Group = xGetElementById("Group");
	if(Group.value == 'GROUP CODE'){
		Group.value = '';
	}
}
	
	function reservationPromoFocus(){
	var Promo = xGetElementById("Promo");
	if(Promo.value == 'PROMO CODE'){
		Promo.value = '';
	}
}

function reservationGroupBlur(){
	var Group = xGetElementById("Group");
	if(Group.value == ''){
		Group.value = 'GROUP CODE';
	}
}

function reservationPromoBlur(){
	var Promo = xGetElementById("Promo");
	if(Promo.value == ''){
		Promo.value = 'PROMO CODE';
	}
}

function todayStr() {
var today=new Date()
return today.getMonth()+1+"/"+today.getDate()+"/"+(today.getFullYear() )
}



function reservationDateFocus(){
	var arrive = xGetElementById("arrive");
	if(arrive.value == 'MM/DD/YYYY'){
		arrive.value = '';
	}
}

function reservationDateBlur(){
	var arrive = xGetElementById("arrive");
	if(arrive.value == ''){
		arrive.value = todayStr();
	}
}
function xGetElementById(e){
	if(typeof(e)!='string') return e;
	if(document.getElementById) e=document.getElementById(e);
	else if(document.all) e=document.all[e];
	else e=null;
	return e;
}


