function increment (n) {
	n = n+1;
	return n;
}

function synxsis(form) {

	thedate = new Date(form.date.value);
	thenights = form.nights.options[form.nights.selectedIndex].text;
	thedepart = new Date(thedate.getFullYear(), thedate.getMonth(), thedate.getDate()+Math.floor(thenights));
	theadults = form.adults.options[form.adults.selectedIndex].text;
	thechildren = form.children.options[form.children.selectedIndex].text;

	arrivaldate = increment(thedate.getMonth())+"/"+thedate.getDate()+"/"+thedate.getFullYear();
	departuredate = increment(thedepart.getMonth())+"/"+thedepart.getDate()+"/"+thedepart.getFullYear();

	theURL = "https://gc.synxis.com/rez.aspx?Hotel=19538&Chain=7648&step=2&start=1";
	theURL += "&arrive="+arrivaldate;
	theURL += "&depart="+departuredate;
	theURL += "&adult="+theadults;
	theURL += "&child="+thechildren;

	if (thedate == "Please select ...") {
		alert ("Please select a date.");
	} else {
		$('#synxisFormLink').attr('href',theURL).trigger('click');
	}
}