//Choose a Hotel from the list and get price breakdown
function TourSelection(TO_ID, TR_ID, RT_ID, HT_ID, AC_ID, ID, EXTRA, adult, junior, child, M_ISQUOT)
{
	if (RT_ID=='')
		RT_ID = 0;
	if 	(HT_ID=='')
		HT_ID = 0;

		document.SearchTour.departure.value=document.getElementById('f_' + ID).value;
	if (EXTRA == 1)
		{document.SearchTour.NTEXTRA.value=document.getElementById('d_' + ID).value;}
	
	document.SearchTour.tour.value= TO_ID;
	document.SearchTour.tourrateid.value= TR_ID;
	document.SearchTour.item.value= RT_ID;
	document.SearchTour.idhotel.value = HT_ID;
	document.SearchTour.cboAccom.value = AC_ID;
	
	document.SearchTour.Adult.value = adult;
	document.SearchTour.Child.value = child;
	document.SearchTour.Junior.value = junior;
	document.SearchTour.quote.value = M_ISQUOT;
	
	document.SearchTour.submit();	
	return false;
	
}


function Validator()
{

	var resid = document.frmSearch.Resid.value;
	
	var sinput = document.frmSearch.text.value + document.frmSearch.cityid.value + document.frmSearch.zoneid.value + document.frmSearch.txtcityzone.value;
	if (resid == '')
	{
		if (sinput == '')
		{ 
			alert("Please suply at least a 'city' or 'hotel' to narrow the result set.")
			document.frmSearch.txtcityzone.focus();
		}
		else
		{
			document.frmSearch.submit();
		}
	
		if (isNaN(document.frmSearch.pfrom.value)) 
			{
				alert("Please suply only numeric values for Price.")
				document.frmSearch.pfrom.focus();
			}
		if (isNaN(document.frmSearch.pto.value)) {
				alert("Please suply only numeric values for Price.")
				document.frmSearch.pto.focus();
			}
	}
	else
	{document.frmSearch.submit();}
}


function TourDetail(tourid, fileid)
{
	document.frmSearch.tourid.value = tourid;
	if(fileid!='')
		{
			document.frmSearch.idFile.value = fileid;
		}
	document.frmSearch.redir.value = "/v11/tour_detail.asp";			
	document.frmSearch.submit();    
}

function TourTarifario(tourid)
{
	document.frmSearch_opt2.tourid.value = tourid;
	var el = document.createElement("input");
	el.name = "tarifario";
   	el.value = "1";
	el.style.display = "none";
   	document.frmSearch_opt2.appendChild(el);

	document.frmSearch_opt2.redir.value = "/v11/tour_detail.asp";			
	document.frmSearch_opt2.submit();    
}


