function resPanelLayer(layerName) {
	//picks a layer and shows it, hiding the other one
	if (layerName=="byBestRate") {
		if (document.getElementById) {
			// this is the way the standards work	
			document.getElementById("byHotel").style.display = "none";			
			document.getElementById("byBestRate").style.display = "block";
			document["tab_byBestRate"].src = "/images/ROBE/resPanel/Tab_Search-By-Best-Rate_on.gif";
			document["tab_byHotel"].src = "/images/ROBE/resPanel/Tab_Search-By-Hotel.gif";
		} else if (document.all) {
			// this is the way old msie versions work
			document.all["byHotel"].style.display = "none";
			document.all["byBestRate"].style.display = "block";
			document.all["tab_byBestRate"].src = "/images/ROBE/resPanel/Tab_Search-By-Best-Rate_on.gif";
			document.all["tab_byHotel"].src = "/images/ROBE/resPanel/Tab_Search-By-Hotel.gif";
		}else if (document.layers) {
			// this is the way nn4 works
			document.layers["byHotel"].style.display = "none";
			document.layers["byBestRate"].style.display = "block";
			document.layers["tab_byBestRate"].src = "/images/ROBE/resPanel/Tab_Search-By-Best-Rate_on.gif";
			document.layers["tab_byHotel"].src = "/images/ROBE/resPanel/Tab_Search-By-Hotel.gif";
		}
	}else{
		if (document.getElementById) {
			// this is the way the standards work	
			document.getElementById("byHotel").style.display = "block";
			document.getElementById("byBestRate").style.display = "none";
			document["tab_byBestRate"].src = "/images/ROBE/resPanel/Tab_Search-By-Best-Rate.gif";
			document["tab_byHotel"].src = "/images/ROBE/resPanel/Tab_Search-By-Hotel_on.gif";
		} else if (document.all) {
			// this is the way old msie versions work
			document.all["byHotel"].style.display = "block";
			document.all["byBestRate"].style.display = "none";
			document.all["tab_byBestRate"].src = "/images/ROBE/resPanel/Tab_Search-By-Best-Rate.gif";
			document.all["tab_byHotel"].src = "/images/ROBE/resPanel/Tab_Search-By-Hotel_on.gif";
		}else if (document.layers) {
			// this is the way nn4 works
			document.layers["byHotel"].style.display = "block";
			document.layers["byBestRate"].style.display = "none";
			document.layers["tab_byBestRate"].src = "/images/ROBE/resPanel/Tab_Search-By-Best-Rate.gif";
			document.layers["tab_byHotel"].src = "/images/ROBE/resPanel/Tab_Search-By-Hotel_on.gif";
		}
	}	
}
function submitForm(whichForm) {
	if (whichForm=="xmlRequest") {
		if (document.xmlRequest.hotelCode.value=="" && document.xmlRequest.region.value=="") {
			alert("Please select a hotel or destination to search for.");
		} else {
			document.xmlRequest.submit();
		} 
	} else if (whichForm=="xmlRequest28") {
		if (document.xmlRequest28.hotelCode.value=="" && document.xmlRequest28.region.value=="") {
			alert("Please select a hotel or destination to search for.");
		}else {
			document.xmlRequest28.submit();
		} 
	}
}

function resetDropDownMenus(form,menu)
{
	if (form == 'xmlRequest') {
		document.xmlRequest28.hotelCode.selectedIndex=0;
		document.xmlRequest28.region.selectedIndex=0;
		if (menu == 'hotelCode' )
			document.xmlRequest.region.selectedIndex=0;
		else
			document.xmlRequest.hotelCode.selectedIndex=0;
	}
	else {
		document.xmlRequest.hotelCode.selectedIndex=0;
		document.xmlRequest.region.selectedIndex=0;
		if (menu == 'hotelCode' )
			document.xmlRequest28.region.selectedIndex=0;
		else
			document.xmlRequest28.hotelCode.selectedIndex=0;		
	}
}
