var MyWin;

//################################################################################################
function showHotelMap()
{
	window.open('hotelmap.asp',null,'height=415,width=620,status=no,toolbar=no,menubar=no,location=no,titlebar=no,resizable=yes,scrollbars=yes');
}

//################################################################################################
function formSubmit(targetForm)
{
	document.getElementById(targetForm).submit();
}

//################################################################################################
function Show(url,wid,heg)
{
wid = 260
heg = 200
	if(MyWin!=null)
	{
		MyWin.close;
	}
				
	MyWin=window.open(url,'images',"height=" + (heg + 200) + ",width=" + (wid + 100) + ",status=no,toolbar=no,menubar=no,location=no,titlebar=no,resizable=yes");
	MyWin.moveTo(5,5);
	MyWin.focus();
}
//################################################################################################
function Highlight(el)
{			
	el.style.backgroundColor = "#D5C98F";
	el.style.border="1px solid #4D4D4D";
}
//################################################################################################
function UnHighlight(el)
{
	el.style.backgroundColor = "white";	
	el.style.border="1px solid white";
}
//################################################################################################
function SubmitTheForm() {
	
	document.regForm.submit();
	document.regForm.submit1.disabled = true;	
}

//###############################################################################################
function launchWin(url,sizeStr)
{
	var newWin
	newWin = window.open(url,null,sizeStr+",status=no,toolbar=no,menubar=no,location=no,titlebar=no,resizable=yes");	
	newWin.focus();
}
//###############################################################################################


function addRooms()
{
	var htmlOptionTagAdult;
	var htmlOptionTagChild;
	var htmlString;
	var roomCount = document.getElementById("rooms_count").value;
	var el = document.getElementById("RoomList");
	var newRoom;
	
	for(var j=1;j<=4;j++) 
	{
		htmlOptionTagAdult = htmlOptionTagAdult + "<option value =" + j + ">" + j + "</option>"
	}
	
	for(var j=0;j<=4;j++) 
	{
		htmlOptionTagChild = htmlOptionTagChild + "<option value =" + j + ">" + j + "</option>"
	}
	
	el.innerHTML = "";
	
	for(var j=1;j<=roomCount;j++)
	{
		htmlString = "&nbsp;" + lc_adults + "&nbsp;";
		htmlString = htmlString + "&nbsp;<select name ='adults_" + j + "' id ='adults_" + j + "'>";
		htmlString = htmlString + htmlOptionTagAdult;
		htmlString = htmlString + "</select>&nbsp;";
		htmlString = htmlString + "&nbsp;&nbsp;" + lc_children + "&nbsp;";
		htmlString = htmlString + "&nbsp;<select name ='children_" + j + "' id ='children_" + j + "'>";
		htmlString = htmlString + htmlOptionTagChild;
		htmlString = htmlString + "</select>&nbsp;";

		newRoom = document.createElement("DIV");
		newRoom.className = "RoomItem";
		newRoom.innerHTML = "<p><b>Room "  + j + ":</b> " + htmlString + "</p>";
		el.appendChild(newRoom);
	}
	
	var submitBtn = document.createElement("DIV");
	submitBtn.className = "btnCheck";
	submitBtn.innerHTML = "<input value = '" + lc_check + "' type = 'button' onclick='return ValidateDatesCapacity();'>"
	el.appendChild(submitBtn)
	
}

function disableButton()
{
	document.sendBooking.submit();
	document.sendBooking.bookBtn.disabled = true;	

}
