function verify(){

	if (document.getElementById("selecthotel").value == "")
	{
			alert("Please select a hotel");
			document.getElementById("selecthotel").focus();
			return false;
	}
	document.getElementById("frm").submit();
}
/*
function doContinue()
{
	if (!verify()) 
	{
		return false;
	}
	else
	{
		// continue button pressed - submit form
		var sValue=document.getElementById("selecthotel").value;
		document.getElementById("hidGateway").value = sValue.substr(0,6);
		document.getElementById("hidCocode").value = sValue.substr(6,4);
		document.getElementById("hidAccom").value = sValue.substr(10,4);
		//alert(document.getElementById("hidAccom").value);
		//document.getElementById("frm").onsubmit();
		document.getElementById("frm").submit();
	}
}
*/
function opwin(purl)
{
 var swin = window.open(purl,'bsubw','width=340,height=340,menubar=no,scrollbars=yes')
 swin.focus();
}
function doSelect(n)
{
	var found = 0;

	//alert('doSelect='+n.substr(0,14))
		
	if (document.frm.selecthotel.options.length > 1)
	{
	  for(var i = 0 ; i < document.frm.selecthotel.options.length ; i++)
	  {	  
		if (document.frm.selecthotel.options[i].value == n.substr(0,14))
		{
			document.frm.selecthotel.selectedIndex = i;
			found = i;
		}
	  }
	}


	if (found > 0) 
	{
		var s;
		//s = 'details.asp?cc=DISN&ac=DACA&la=en'
		
		s = 'details.asp?cc=';
		s = s + n.substr(6,4);
		s = s + '&ac=';
		s = s + n.substr(10,4);
		s = s + '&la=' + n.substr(14,2)
		//alert(s);
		
		//DISN&ac=DACA&la=en'
		opwin(s);
	}
}


