function sendto_friend(){
document.location.href="mailto:?Subject=renohotelseye.com&body=http://www.renohotelseye.com";
}
function OpenCalendar(monthField,dayField,yearField,formName){
dayval=document.forms[formName].elements[dayField].options[document.forms[formName].elements[dayField].selectedIndex].value;
monthval=document.forms[formName].elements[monthField].options[document.forms[formName].elements[monthField].selectedIndex].value;
window.open("http://69.36.170.164/calendar.asp?formName="+formName+"&dayField="+dayField+"&day="+dayval+"&monthField="+monthField+"&month="+(Number(monthval)+1)+"&yearField=-&year=-&site=reno","calwin","width=210,height=210,location=0,status=0");
}
function book_mark(){
if (navigator.appName.indexOf('Microsoft')>-1){
window.external.AddFavorite(document.location,document.title);
}else{
alert("Please Press &quot;Ctrl+D&quot; to Bookmark This Site");
}
}
function cus_support(url,win){
window.open(url,win,"width=550,height=380,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=0");
}
function converter(){
window.open("http://hotels.renohotelseye.com/util/currencyconvert.jsp?cid=82345","convert","width=600,height=200,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=0");
}
function howto_book(opt){
if (opt=="room"){
window.open("how-to-book-a-room.html","howtoroom","width=550,height=400,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=0");
}else if (opt=="hotel"){
window.open("how-to-book-a-hotel.html","howtohotel","width=550,height=400,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=0");
}
}
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 OpenWindow(file, name, width, height) {
OpenWindow(file, name, width, height, false);
}
function OpenWindow(file, name, width, height, showLeftTopScrollbar) {
var attr = "";
if(showLeftTopScrollbar) {
attr += "top=50,left=50,scrollbars=1,";
}
attr += "width=" + width + ",height=" + height + ",resizeable=1";
window.open(file, name, attr);
}
var date = new Date();
var indate = new Date(date.setDate(date.getDate()+21));
var outdate =  new Date(date.setDate(date.getDate()+2));
function get_dates(){
indate = new Date(date.setDate(date.getDate()+21));
outdate =  new Date(date1.setDate(date1.getDate()+2));
with(document.frm_Search){
arrivalMonth.selectedIndex=indate.getMonth();
arrivalDay.selectedIndex=indate.getDate()-1;
departureMonth.selectedIndex=outdate.getMonth();
departureDay.selectedIndex=outdate.getDate()-1;
}
}
function get_home_dates(){
with(document.myform){
arrivalMonth.selectedIndex=indate.getMonth();
arrivalDay.selectedIndex=indate.getDate()-1;
departureMonth.selectedIndex=outdate.getMonth();
departureDay.selectedIndex=outdate.getDate()-1;
}
}
function get_hotel_dates(){
with(document.frm_Search){
arrivalMonth.selectedIndex=indate.getMonth();
arrivalDay.selectedIndex=indate.getDate()-1;
departureMonth.selectedIndex=outdate.getMonth();
departureDay.selectedIndex=outdate.getDate()-1;
}
}
function get_hotelpage_dates(){
with(document.frm_Search1){
arrivalMonth.selectedIndex=indate.getMonth();
arrivalDay.selectedIndex=indate.getDate()-1;
departureMonth.selectedIndex=outdate.getMonth();
departureDay.selectedIndex=outdate.getDate()-1;
}
}
function get_car_dates(){
indate = new Date(date.setDate(date.getDate()+7));
with(document.carForm){
pickUpMonth.selectedIndex=indate.getMonth();
pickUpDay.selectedIndex=indate.getDate()-1;
outdate =  new Date(indate.setDate(indate.getDate()+1));
dropOffMonth.selectedIndex=outdate.getMonth();
dropOffDay.selectedIndex=outdate.getDate()-1;
}
}
function get_flights_date(){
with(document.airForm){
departureMonth.selectedIndex=indate.getMonth();
departureDay.selectedIndex=indate.getDate()-1;
returnMonth.selectedIndex=outdate.getMonth();
returnDay.selectedIndex=outdate.getDate()-1;
}
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
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];}
}
//////////////////////////
//start new script code
// Checks if browser is Netscape 2.0x since the options array properties don't work with Netscape 2.0x
function isBrowserSupp() {
// Get the version of the browser
version =  parseFloat( navigator.appVersion );
if ( ( version >= 2.0 ) && ( version < 2.1 ) && ( navigator.appName.indexOf( "Netscape" ) != -1 ) ) {
return false;
} else {
return true;
}

return true;
}
function isLeapYear( yrStr ) {
var leapYear = false;
var year = parseInt( yrStr, 10 );
// every fourth year is a leap year
if ( year % 4 == 0 ) {
leapYear = true;
// unless it's a multiple of 100
if( year % 100 == 0 ) {
leapYear = false;
// unless it's a multiple of 400
if( year % 400 == 0 ) {
leapYear=true;
}
}
}
return leapYear;
}
function getDaysInMonth( mthIdx, YrStr ) {
// all the rest have 31
var maxDays = 31
// expect Feb. (of course)
if( mthIdx == 1 ) {
if( isLeapYear( YrStr ) ) {
maxDays=29;
} else {
maxDays=28;
}
}
// thirty days hath...
if( mthIdx == 3 || mthIdx == 5 || mthIdx == 8 || mthIdx == 10 ) {
maxDays=30;
}
return maxDays;
}
//the function which does some magic to the date fields
// return non-zero if it is the last day of the month
function adjustDate( mthIdx, Dt ) {
var value = 0;

var today = new Date()
var theYear = parseInt( today.getYear(), 10 )
if( mthIdx < today.getMonth() ) {
theYear = ( parseInt( today.getYear(), 10 ) + 1 )
}
if( theYear < 100 ) {
theYear = "19" + theYear
} else {
if( ( theYear - 100 ) < 10 ) {
theYear = "0" + ( theYear - 100 )
} else {
theYear = ( theYear - 100 ) + ""
}
theYear = "20" + theYear
}
var numDays = getDaysInMonth( mthIdx, theYear );
if( mthIdx == 1 ) {
if( Dt.options.selectedIndex + 2 < numDays ) {
return 0;
} else {
if( Dt.options.selectedIndex + 1 > numDays) {
Dt.options.selectedIndex=numDays - 1;
}
//check for leap year
if( (Dt.options.selectedIndex + 1) == numDays ) {
return 1;
} else {
return 4;
}
}
}
if( Dt.options.selectedIndex + 2 < numDays ) {
value = 0;
} else {
if ( Dt.options.selectedIndex + 1 > numDays ) {
Dt.options.selectedIndex--;
value = 3;
} else if ( Dt.options.selectedIndex + 1 == numDays ) {
//index is 31 or 30
value = 2;
} else {
value = 4;
}
}
return value;
}
//changes departure month when arrival month is changed
function amadChange( inM, inD, outM, outD ) {
if ( !isBrowserSupp() ) {
return;
}
var res = adjustDate( inM.options.selectedIndex, inD );
if( res != 0 ) {
outD.options.selectedIndex = 0;
if ( outM.options.selectedIndex == 11 ) {
outM.options.selectedIndex = 0
} else if( res == 4 ) {
outM.options.selectedIndex=inM.options.selectedIndex + 1;
outD.options.selectedIndex = 0;
} else {
outM.options.selectedIndex=inM.options.selectedIndex + 1;
outD.options.selectedIndex = 1;
}
} else {
outM.options.selectedIndex = inM.options.selectedIndex;
if (outD.options.selectedIndex <= inD.options.selectedIndex) {
outD.options.selectedIndex = inD.options.selectedIndex + 2;
}
}
return;
}
function dmddChange( outM, outD ) {
if ( !isBrowserSupp() ) {
return;
}
adjustDate( outM.options.selectedIndex, outD );
return;
}
function validateDepWindow(formName) {
if (document.forms[formName].tempDepTime[document.forms[formName].tempDepTime.selectedIndex].value==('M')) {
document.forms[formName].tripWindow.value='5';
document.forms[formName].departureTime.value='7AM';
} else if (document.forms[formName].tempDepTime[document.forms[formName].tempDepTime.selectedIndex].value==('A')) {
document.forms[formName].tripWindow.value='5';
document.forms[formName].departureTime.value='3PM';
} else if (document.forms[formName].tempDepTime[document.forms[formName].tempDepTime.selectedIndex].value==('E')) {
document.forms[formName].tripWindow.value='5';
document.forms[formName].departureTime.value='8PM';
} else if(document.forms[formName].tempDepTime[document.forms[formName].tempDepTime.selectedIndex].value==('ANT')) {
document.forms[formName].tripWindow.value='9';
document.forms[formName].departureTime.value='12PM';
} else {
document.forms[formName].tripWindow.value='5';
document.forms[formName].departureTime.value=document.forms[formName].tempDepTime.value;
}
}
function clearTextBox(source) {
with(document.forms["myform"]){
usertyped.checked=false;
speccity.value='';
speccountry.value='';

}
}
function setStateProvince(stat,countr){
with(document.forms["myform"]){
stateProvince.value =stat;
country.value=countr;
}
}
function checkDest(destName) {
for (var x=0 ; x<document.forms['myform'].radcity.length; x++) {
if (document.forms['myform'].radcity[x].value==destName) {
document.forms['myform'].radcity[x].checked=true;
}
}
}
function clearCities(){
for(var x=0;x<document.forms['myform'].radcity.length;x++){
document.forms['myform'].radcity[x].checked=false;
}
document.forms['myform'].stateProvince.value="";
document.forms['myform'].country.value="";
}
function validateForm(){
with(document.forms['myform']){
	if (usertyped.checked){
	city.value=speccity.value;
	}else{
		for (var x=0 ; x<radcity.length; x++) {
			if (radcity[x].checked) {
			city.value=radcity[x].value;
			}
		}
	}
submit();
}
}
function openwin(win,w,h){
var winDesc = 'resizable=yes,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,width=' + w + ',height=' + h;
HelpWin = window.open(win,"ICT",winDesc);
}
///////////////////////////