

function BookHotel()
{

	var SIndex=getObj("HotelName").selectedIndex;
	var fmonth = getObj("arrivalMonthYear").value.substring(4,6);
    var tmonth = getObj("departureMonthYear").value.substring(4,6);
    if (fmonth.substring(0,1) == "0")
    {
        fmonth = fmonth.substring(1,2);
        fmonth++;
    }
    if (tmonth.substring(0,1) == "0")
    {
        tmonth = tmonth.substring(1,2);
        tmonth++;
    }
	
	if(SIndex==0)
	{
		
		iRet = window.open("http://www.ramada.com/Ramada/control/Booking/check_avail?entry_source=http%3A%2F%2Fwww.ramada.com%2FRamada%2Fcontrol%2FBooking%2Fmodify_dates%3FbrandCode%3DRA%2CMQ%2CDI%2CHJ%2CKG%2CSE%2CTL%2CBU%26searchWithinMiles%3D25%26areaType%3D1%26destination%3Dvancouver%26stateName%3DBritish%2520Columbia%26state%3DBC%26countryName%3DCanada%26country%3DCA%26checkInDate%3D04%2F27%26numberAdults%3D1%26numberRooms%3D1%26checkOutDate%3D04%2F28%26numberChildren%3D0%26rateName%3DBest%2520Avail%26rate%3D000%26id%3D11832%26propBrandId%3DRA%26force_nostay%3Dfalse+++%26checkInDate%3D01%2F9%2F2008%26numberRooms%3D1%26checkOutDate%3D01%2F10%2F2008%26numberAdults%3D1%26numberChildren%3D0%26rate%3D000"+
		"&checkInDate="+fmonth +"%2F"+  getObj("arrivalDay").value+
		"&numberAdults="+getObj("txtadults").value+
		"&numberRooms="+getObj("txtrooms").value+
		"&checkOutDate="+tmonth+"%2F"+getObj("departureDay").value+
		"&numberChildren="+getObj("txtchildren").value+
		"&rateName=Best+Avail&rate=000&promotionCode=&corporateCode=&iataNumber=&brandCode=RA%2CMQ%2CDI%2CHJ%2CKG%2CSE%2CTL%2CBU&searchWithinMiles=25&areaType=1&destination=vancouver&stateName=British+Columbia&state=BC&countryName=Canada&country=CA&id=11832&propBrandId=RA&force_nostay=false+++");
		


	
//getObj("selectHotelForm").action="reservation.html";
	}
	
	if(SIndex==1)
	{
	
		var rooms=1;
		var child =0;
		var adults=1;
		if(getObj("txtrooms").value!="")
		{			
		 rooms =getObj("txtrooms").value;
		}
		
		if(getObj("txtchildren").value!="")
		{			
		 child =getObj("txtchildren").value;
		}
		if(getObj("txtadults").value!="")
		{			
		 adults =getObj("txtadults").value;
		}
		
		iRet = window.open("http://www.choicehotels.ca/hotels/roomRates?hotel=CN376&srp=RACK&minisrp="+
		"&day="+ getObj("arrivalDay").value +
		"&month="+ fmonth + 
		"&depart_day="+getObj("departureDay").value+
		"&depart_month="+tmonth+
		"&nroom="+ rooms +
		"&nadult="+ adults +
		"&nchild="+ child +
		"&destination=Victoria");
	}

	if(SIndex==2)
	{
		
		iRet = window.open("http://www.ramada.com/Ramada/control/Booking/check_avail?brandCode=RA,MQ,DI,HJ,KG,SE,TL&searchWithinMiles=25&areaType=1&destination=victoria&stateName=British%20Columbia&state=BC&countryName=Canada&country=CA"+
		"+&checkInDate="+fmonth +"/"+  getObj("arrivalDay").value+
		"&numberAdults="+getObj("txtadults").value+
		"&numberRooms="+getObj("txtrooms").value+
		"&checkOutDate="+tmonth+"/"+getObj("departureDay").value+
		"&numberChildren="+getObj("txtchildren").value+
		"&rateName=Best%20Avail&rate=000&variant=&id=05951&propBrandId=RA&force_nostay=false ");
	}


	if(SIndex==3)
	{
		
		iRet = window.open("http://www.travelodge.com/Travelodge/control/Booking/check_avail?brandCode=TL,MQ,DI,HJ,KG,RA,SE&searchWithinMiles=25&areaType=1&destination=nanaimo&stateName=British%20Columbia&state=BC&countryName=Canada&country=CA"+
		"&checkInDate="+fmonth +"/"+  getObj("arrivalDay").value+
		"&numberAdults="+getObj("txtadults").value+
		"&numberRooms="+getObj("txtrooms").value+
		"&checkOutDate="+tmonth+"/"+getObj("departureDay").value+
		"&numberChildren="+getObj("txtchildren").value+
		"&rateName=Best%20Avail&rate=000&id=08770&propBrandId=TL&force_nostay=false");
	}
	
	if(SIndex==4)
	{
		
	    getObj("selectHotelForm").target="_blank";
	    getObj("selectHotelForm").action="http://book.bestwestern.com/bestwestern/priceAvail.do?propertyCode=62087&disablenav=true&language=en_US&showPropertyLink=true&suppressSSLPopup=true','','toolbar=yes,menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes";		 
	}
	
	if(SIndex==5)
	{
		
	    getObj("selectHotelForm").target="_blank";
	    getObj("selectHotelForm").action="http://book.bestwestern.com/bestwestern/priceAvail.do?propertyCode=66037&disablenav=true&language=en_US&showPropertyLink=true&suppressSSLPopup=true','','toolbar=yes,menubar=yes,location=yes,resizable=yes,scrollbars=yes,status=yes";		 
	}
	


//window.location="reservation1.html";
window.location.reload();
}



function selecthotel()
{
	var Index=getObj("HotelName").selectedIndex;
	if(Index==4 || Index==5)
	{
		getObj("tradults").style.visibility="hidden";
		getObj("trrooms").style.visibility="hidden";
		getObj("trchildern").style.visibility="hidden";
	}
	else
	{
		getObj("tradults").style.visibility="visible";
		getObj("trrooms").style.visibility="visible";
		getObj("trchildern").style.visibility="visible";
	
	}

	if(Index==0)
	{
		getObj("hotelimg").src="images/reservations/vancouverramada.jpg";
	}
	if(Index==1)
	{
		getObj("hotelimg").src="images/reservations/VQI.jpg";
	}
	if(Index==2)
	{
		getObj("hotelimg").src="images/reservations/VR.jpg";
	}
	if(Index==3)
	{
		getObj("hotelimg").src="images/reservations/NT.jpg";
	}
	if(Index==4)
	{
		getObj("hotelimg").src="images/reservations/BWCR.jpg";
	}
	if(Index==5)
	{
		getObj("hotelimg").src="images/reservations/BWAT.jpg";
	}
}

