<!-- Body of reservation page updated 06/08/11 - COS

var _sel0 = " ";
var _sel1 = " ";
var _sel2 = " ";
var _sel3 = " ";
var _sel4 = " ";
// REM 05/19/11 var _sel5 = " ";
var _sel6 = " ";
var _sel7 = " ";
var _sel8 = " ";
// REM 05/19/11 var _sel9 = " ";
var _selA = " ";	// The La Veta Vista
var _selB = " ";
var _selC = " ";
var _selD = " ";
var _selE = " ";
// REM 04/17/11 var _selF = " ";
// REM 04/17/11 var _selG = " ";
// REM 04/17/11 var _selH = " ";
// REM 05/19/11 var _selI = " ";	// Whispering Pines
var _selJ = " ";	// Aspen Shores
var _selK = " ";	// The Rivers Edge
var _selL = " ";	// Bristlecone Ranch
var _selM = " ";	// The Spanish Peaks Lodge
var _selN = " ";	// The Cuchara Inn - Double
var _selNa = " ";	// The Cuchara Inn - King
var _selNb = " ";	// The Cuchara Inn - Suite
var _selP = " ";	// Mountain View Escape
var numDys = "7";
var selDte = " ";

function buildResvPage() {
  dspDte = GetTodayDate();
  selDte = dspDte;
  document.write("<table align='left' border='2' height='60%' width='100%'><tr><td>");
  document.write("<table align='left' bgcolor='#F7D6A5' cols='2' border='0' cellspacing='4' cellpadding='1' height='100%' width='100%'>");
  document.write("<tr align='left'><td colspan='2' width='100%'><b class='ListBody'>Check availability and make your reservation now!</b></td></tr>");
  document.write("<tr align='left'><td width='25%'><form action='' method='get' name='resfrm' id='resfrm'>");
  document.write("<b class='ListBody'>Check-in&nbsp;date:</b></td>");
  document.write("<td valign='middle' width='75%'><input id='adate' type='text' name='adate' value='" + initDate +"' size='10' valign='middle'>");
  document.write("</td></tr>");
  document.write("<tr align='left'><td width='25%'><b class='ListBody'>Number&nbsp;of&nbsp;nights:</b></td>");
  document.write("<td width='75%'><input type='text' name='TOTALDAYS' value='7' size='4' maxlength='4'></td></tr>");
  document.write("<tr align='left'><td width='25%'><b class='ListBody'>Number&nbsp;of&nbsp;bedrooms:</b></td>");
  document.write("<td width='75%'><select name='SRCHBEDROOMS'><option value=''>ANY</option><option value='2'>2</option><option value='3'>3</option></select></td></tr>");
  document.write("<tr align='left'><td align='left' width='25%'><b class='ListBody'>Desired accomodation:</b></td>");
  document.write("<td width='75%'><SELECT name='acmdtn' type='text' size='1' class='lst'>");

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// the following function inserts the selection list.  var _selx is used to
// select the property being viewed.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    document.write("<option value=''" +_sel0 +">Anything   </option>");
    document.write("<option value='ALV'" +_sel1 +">Aspen Leaf </option>");
    document.write("<option value='AS'" +_selJ +">Aspen Shores </option>");
    // REM 01/01/11 document.write("<option value='BB'" +_selE +">Black Bear </option>");
    document.write("<option value='BR'" +_selL +">Bristlecone Ranch </option>");
    document.write("<option value='CR'" +_sel2 +">Creekside Retreat </option>");
    document.write("<option value='118'" +_selN +">Cuchara Inn - Double</option>");
    document.write("<option value='212'" +_selNa +">Cuchara Inn - King</option>");
    document.write("<option value='112'" +_selNb +">Cuchara Inn - Suite</option>");
    document.write("<option value='ER'" +_selD +">Enchanted River Cab </option>");
    document.write("<option value=''" +_selB +">Itty Bitty Adobe</option>");	// NO IDENTIFIER
    document.write("<option value=''" +_selC +">La Veta Log Cabin </option>");	// NO IDENTIFIER
    document.write("<option value='LV'" +_selA +">La Veta Vista </option>");
    // REM 05/19/11 document.write("<option value='LC'" +_sel9 +">Little Creek Cabin </option>");
    // REM 04/17/11 document.write("<option value='MH'" +_selH +">Majestic Hideaway </option>");
    document.write("<option value='MV'" +_selP +">Mountain View Escape</option>");
    // REM 01/01/11 document.write("<option value=''" +_sel3 +">Panadero Villa </option>");	// NO IDENTIFIER
    // REM 04/17/11 document.write("<option value='PM'" +_selG +">Paradise Mountain </option>");
    // REM 04/17/11 document.write("<option value='PW'" +_selF +">Peaceful Waters </option>");
    document.write("<option value='RE'" +_selK +">Rivers Edge, The </option>");
    // REM 01/01/11 document.write("<option value='SL'" +_selM +">Spanish Peaks Lodge, The </option>");
    // REM 05/19/11 document.write("<option value='SP'" +_sel5 +">Sugar Pine Cabin </option>");
    document.write("<option value='TG'" +_sel4 +">Texas Gals, The </option>");
    // REM 01/01/11 document.write("<option value=''" +_sel6 +">Sun Mountain </option>");	// NO IDENTIFIER
    document.write("<option value='SW'" +_sel7 +">Sun Watcher </option>");
    document.write("<option value=''" +_sel8 +">Villas @ Cuchara </option>");
    // REM 05/19/11 document.write("<option value='WP'" +_selI +">Whispering Pines </option>");
  
  document.write("</select></td></tr>");
  document.write("<tr align='left'><td colspan='2' width='100%'><HR ALIGN='center' WIDTH=50%></td></tr>");
  document.write("<tr align='center'><td align='right' width='25%'>");
  document.write("<input type='hidden' name='TRAVINSUR' value='Y'>");
  document.write("<input type='hidden' name='SRCHSECTION' value=''>");
  document.write("<input type='hidden' name='SRCHLOCATION' value=''>");
  document.write("<input type='hidden' name='USERSRCH1' value=''>");
  document.write("<input type='hidden' name='USERSRCH2' value=''>");
//  document.write("<input type='submit' name='RSAVAILSearch' value='Available?' onclick='inspect(this.form)'></td><td align='center' width='75%'");
  document.write("<input type='submit' name='RSAVAILSearch' value='Available?' onclick='WinOpen(this.form)'></td><td align='center' width='75%'");
  document.write("<input type='hidden' name='USERSRCH3' value=''>");
  document.write("<input type='hidden' name='USERSRCH4' value=''>");
  document.write("<input type='hidden' name='CHILDREN' value='0'>");
  document.write("<input type='hidden' name='ADULTS' value='2'>");
  document.write("<input type='reset' name='rstBtn' value='Clear Form'></td></tr></form></table>");
  document.write("</td></tr></table>");
  }

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
// the following function calls the reservation service with a specified property

function WinOpen(form) {
  numDys = resfrm.TOTALDAYS.value;
  selDte = resfrm.adate.value;
  var res_svc = "http://rms5.resortplanet.com/1466/rmsunitgb.php?unit=";
  if (form.acmdtn.options[form.acmdtn.selectedIndex].value != "") {
	res_svc = res_svc + form.acmdtn.options[form.acmdtn.selectedIndex].value + "&arrival=";
	res_svc = res_svc + selDte + "&nights=" + numDys + "#unitHeader";
  }
  else {
  	res_svc = "http://rms5.resortplanet.com/1466/olb/olb3.exe";
  }
  // alert(res_svc);
  Win1=window.open(res_svc,"wd1","HEIGHT=850,WIDTH=700,location=no,resizable=yes,scrollbars=yes,screenx=0,screeny=0");
}

function WinOpen1() {
   res_svc = "http://rms5.resortplanet.com/1466/olb/olb3.exe";
   Win1=window.open(res_svc,"wd1","HEIGHT=850,WIDTH=700,location=no,resizable=yes,scrollbars=yes,screenx=0,screeny=0");}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
//-- insert feature and make resolution sensitive

function insertFeature() {
	GetTodayDate();			// update today's date alt='Cuchara properties'
	featPic = thisMon - 1;		// pick off the month and decrement for index
	if (resn <= 1400) {
	  document.write("<a class='link' title='" + featNme[featPic] + "'>");
          document.write("<IMG SRC='images/" + featPix[featPic] + "' width='342' BORDER='0'></a>");
		document.write("<br><em class='CmdAbbrv'>Featured Property");
		document.write("</em>");
          }
	else {
	  document.write("<a class='link' title='" + featNme[featPic] + "'>");
          document.write("<img src='images/" + featPix[featPic] + "' width='280' border='0'></a>");
		document.write("<br><em class='CmdAbbrv'>Featured Property");
		document.write("</em>");
          }
	}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

 function insertUpdate (){
    document.write("<p class='ButnSpcr'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em class='special'>" +upDated +"</em><br><br>");
    document.write("<a class='active' href='mailto:im2bike4ever@gmail.com?subject=RE. Cuchara Web Site' title='Contact cuchara webmaster'><em class='CmdAbbrv'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Webmaster</em></a></p>");
    document.write("<p class='ButnSpcr'><img name='logo' src='images/PenS_logo.gif' height='15' width='100' border='0'></p>");
    document.write("<em class='special'>&#169; " + copyRight + "<br>Cuchara Mountain Resorts.<br>All rights reserved.</em>");
  }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
function turnOn(imageName) 
{ 
	if (document.images) { document[imageName].src = eval(imageName + "on.src"); } 
}
function turnOff(imageName) 
{ 
	if (document.images) { document[imageName].src = eval(imageName + "off.src"); } 
}

var thisYear = " ";
var thisMon = " ";			// current month
var thisDay = " ";			// current day of month
var initDate = " ";
var thisHour = " ";			// current hour of day
var toDay = new Date(); 
var dspDte = " ";

// - - - - - - - - - - Function to determine today's  date - - - - - - - - - - - - - - 
function GetTodayDate() {
	toDay = new Date();
	thisHour = toDay.getHours();	// XXX begining of code to cut off resv @ 17:00
	var thisDate = (toDay.getMonth() + 1) + "/" + toDay.getDate() + "/" + toDay.getFullYear(); // mm/dd/yy format
	thisMon = toDay.getMonth() +1;		// establish current month
	thisDay = toDay.getDate() + 7;
    	if (thisDay >= 31) {
            thisDay = 1;			// sloppy but prevents picking invalid date except in Feb
	    thisMon = thisMon + 1;
	    if (thisMon >= 13) {
		thisMon = 1;
	    }
	}	
	thisYear = toDay.getFullYear();
	initDate = thisMon + "/" + thisDay + "/" + thisYear;
	return initDate;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
-->
