
function pushToTalk() {
	var winP2T = window.open("http://www.navistechnologies.info/p2talk/p2talk.aspx?Account=13513",
		"PushToTalk", "height=500, width=610, left=50, top=100," + "titlebar=no," +
		"directories=no,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes");
	winP2T.focus();	
}
function pushToTalkBigSky() {
	var winP2T = window.open("http://www.navistechnologies.info/p2talk/p2talk.aspx?Account=VA1085",
		"PushToTalk", "height=500, width=610, left=50, top=100," + "titlebar=no," +
		"directories=no,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes");
	winP2T.focus();	
}
function pushToTalkTahoe() {
	var winP2T = window.open("http://www.navistechnologies.info/p2talk/p2talk.aspx?Account=14332",
		"PushToTalk", "height=500, width=610, left=50, top=100," + "titlebar=no," +
		"directories=no,location=no,menubar=no,toolbar=no,resizable=yes,scrollbars=yes");
	winP2T.focus();	
}
function sendURL() {
	selectQuickJump = document.getElementById("QuickJumpDestination");
	if (selectQuickJump && selectQuickJump.value && selectQuickJump.value != ""){
		window.document.location = selectQuickJump.value;
	}
}	
//function sendQuickJumpURL2() {
//	if (document.QuickJumpDestination.value != ""){
//		window.document.location = document.QuickJumpDestination.value;
//	}
//}
//function sendQuickJumpURL() {
//	if (document.QuickJumpDestination.value != ""){
//		window.document.location = document.QuickJumpDestination.value;
//	}
//}	

function bookAspenOnLine() {
	if (OnlineBookingPageTypeID == 5) document.location='https://booker.hotelfactory.com/cgi/uzbook1.cgi?p=4377&c=SC&s=TAM4377&r=www.aspenlodgingco.com'; // ALC
	else if (OnlineBookingPageTypeID == 11) document.location='https://booker.hotelfactory.com/cgi/uzbook1.cgi?p=1300&c=SC&s=IAA1300&r=www.innataspen.com'; // inn at aspen
	else document.location='default.aspx?p=2637'; // choose
}

function setBookOnlineDates() {
	var dtToday = new Date();
	var dtTomorrow = new Date(dtToday.getFullYear(), dtToday.getMonth(), (dtToday.getDate() + 1) );
	document.getElementById("ArrivalSelectMonth").selectedIndex = (dtTomorrow.getMonth() );
	document.getElementById("ArrivalSelectDay").selectedIndex = (dtTomorrow.getDate() - 1);
	document.getElementById("DepartureSelectMonth").selectedIndex = (dtTomorrow.getMonth() );
	document.getElementById("DepartureSelectDay").selectedIndex = (dtTomorrow.getDate());	
}

function bookOnlineTS(sURL) {
	try {
		var iArrivalMonth = document.getElementById("ArrivalSelectMonth").value;
		var iArrivalDay = document.getElementById("ArrivalSelectDay").value;
		var iArrivalYear = document.getElementById("ArrivalSelectYear").value;
		
		var iDepartureMonth = document.getElementById("DepartureSelectMonth").value;
		var iDepartureDay = document.getElementById("DepartureSelectDay").value;
		var iDepartureYear = document.getElementById("DepartureSelectYear").value;
		
		var dtArrival = new Date(iArrivalYear, (iArrivalMonth - 1), iArrivalDay);
		var dtDeparture = new Date(iDepartureYear, (iDepartureMonth - 1), iDepartureDay);

		var dtToday = new Date();
		var dtTomorrow = new Date(dtToday.getFullYear(), dtToday.getMonth(), (dtToday.getDate() + 1) );
		if (dtTomorrow > dtArrival) {
			alert("Arrival Date must be in the future");
		}
		else if (dtArrival >= dtDeparture) {
			alert("Arrival Date must be after Departure date");
		}
		else {
			var iDays = Math.floor( ( dtDeparture.getTime() - dtArrival.getTime() ) /1000/60/60/24 );
			var sQS = sURL + "?arrival=" +
				iArrivalMonth + iArrivalDay + iArrivalYear + "&totaldays=" + iDays +
				"&sessionid=a";
			window.open(sQS,'OLB')
		}
	}
	catch (e) {
		window.open(sURL,'OLB')
	}
}


