//Javascript Orios Page
var xmlHttp


function nuevoAjax()
{
	var xmlhttp=false;
 	try {
 		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 	} catch (e) {
 		try {
 			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
 		} catch (E) {
 			xmlhttp = false;
 		}
  	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
 		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

function verdestino_prin()
{
	document.getElementById('resdestino').innerHTML="<img src='img/loader.gif'>";
	
	var prod=document.getElementById('producto').value;
	
	abr=nuevoAjax();
	abr.open("GET", "ajax_querys.php?producto="+prod,true);
	abr.onreadystatechange= 
	function() 
		{ 	
			if (abr.readyState==4) { 
			document.getElementById('resdestino').innerHTML=abr.responseText; 
		} 
	} 
	abr.send(null);
}

function verhoteles_prin()
{
	document.getElementById('reshotel').innerHTML="<img src='img/loader.gif'>";
	var dest=document.getElementById('destino').value;

	abr2=nuevoAjax();
	abr2.open("GET", "ajax_querys.php?destino="+dest,true);
	abr2.onreadystatechange= 
	function() 
		{ 	
			if (abr2.readyState==4) { 
			document.getElementById('reshotel').innerHTML=abr2.responseText; 
			//alert(abr6.responseText);
		} 
	} 
	abr2.send(null);
}


function verdestinotarifario(idprod,produ)
{
	var producto=document.getElementById("prod"+produ).value;
	abr5=nuevoAjax();
	abr5.open("GET", "ajax_querys.php?producto_tarifario="+idprod+"&produ="+producto,true);
	abr5.onreadystatechange= 
	function() 
		{ 	
			if (abr5.readyState==4) { 
			document.getElementById('resdestino').innerHTML=abr5.responseText; 
		} 
	} 
	abr5.send(null);
}

function verhotelestarifario()
{
	var destino=document.getElementById("destino").value;
	
	abr6=nuevoAjax();
	abr6.open("GET", "ajax_querys.php?destino_tarifario="+destino,true);
	abr6.onreadystatechange= 
	function() 
		{ 	
			if (abr6.readyState==4) { 
			document.getElementById('reshotel').innerHTML=abr6.responseText; 
		} 
	} 
	abr6.send(null);
}

function verfactortarifario()
{
	var hotel=document.getElementById("hotel").value;
	
	abr7=nuevoAjax();
	abr7.open("GET", "ajax_querys.php?factor_tarifario="+hotel,true);
	abr7.onreadystatechange= 
	function() 
		{ 	
			if (abr7.readyState==4) { 
			document.getElementById('factorhotel').innerHTML=abr7.responseText; 
		} 
	} 
	abr7.send(null);
}
