function BookHotel()
			{
	           var fYear = getObj("arrivalMonthYear").value.substring(0,4);
        var fmonth = getObj("arrivalMonthYear").value.substring(4,6);
        
        var tYear = getObj("departureMonthYear").value.substring(0,4);
        var tmonth = getObj("departureMonthYear").value.substring(4,6);
        
        if (fmonth.substring(0,1) == "0"){
			
            fmonth = fmonth.substring(1,2);			
         }        
         fmonth = parseFloat(fmonth)+1;
        
        
        if (tmonth.substring(0,1) == "0"){        
           tmonth = tmonth.substring(1,2);   		  
         }
        
          tmonth = parseFloat(tmonth)+1;
	         
	      iRet = window.open( "http://www.choicehotels.ca/rooms/CN579?srp="+document.frmhotelBook.LeftMenu1_srp.value+"&checkin="+ getObj("arrivalDay").value +"-"+fmonth+"-"+fYear+"&checkout="+ getObj("departureDay").value +"-"+tmonth+"-"+tYear);	   
        // window.open( "http://www.choicehotels.ca/rooms/CN579?srp="+ document.frmhotelBook.LeftMenu1_srp.value +"&checkin="+ arrDay +"-"+ arrmonth +"-"+ arrYear +"&checkout="+ depDay +"-"+ depmonth +"-"+ depYear);			
			
			}

function setValue(Action)
			{
				var dt 
				if(Action == "1")
				{
					dt = document.frmhotelBook.txtDateFr.value   
					obj1 = document.frmhotelBook.day;   
					obj2 = document.frmhotelBook.month;
				}
				else
				{
					dt = document.frmhotelBook.txtDateTo.value ;
					obj1 = document.frmhotelBook.depart_day ;   
					obj2 = document.frmhotelBook.depart_month  ;
  
				}
				if(dt != "")
				{
					mm = dt.substring(0,2)
					dd = dt.substring(3,5)
					obj1.selectedIndex = dd;
					obj2.selectedIndex = mm;
				}
			}

			function setDateTxt(oImg, iID, sDateField) {
			try{
				//var formfield = 'dgMilestones__ctl' + iID + sDateField;
				//var formEndDate = 'dgMilestones__ctl' + iID + '_EndDate';
				popUpCalendar(oImg, document.getElementById(iID), document.getElementById(sDateField), 'mm dd yyyy');
				
			}catch(er){
				alert('Error trying to set date into form element. \n\nPlease enter date into field in this format: MM/DD/YYYY');
			}   
		}	