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 muestra_busqueda(){
var navieras, barcos, puertos, dias, meses, contenedor;
contenedor = document.getElementById('contenedor');
navieras = document.getElementById('navieras').value;
barcos = document.getElementById('barcos_00').value;
puertos = document.getElementById('puertos').value;
dias = document.getElementById('dias').value;
meses = document.getElementById('meses').value;
base_nav = document.getElementById('base_nav').value;
base_bar = document.getElementById('base_bar').value;

ajax=nuevoAjax();
ajax.open("GET", "http://www.spanishcruises.com/motor/index.php?tipo=interno&navieras="+navieras+"&barcos="+barcos+"&puertos="+puertos+"&dias="+dias+"&meses="+meses+"&base_nav="+base_nav+"&base_bar="+base_bar,true);
ajax.onreadystatechange=function() {
if (ajax.readyState==4) {
contenedor.innerHTML = ajax.responseText
}
}
ajax.send(null)
}



function cambia_recorrido(id_salida){
var contenedor;
contenedor_salida = document.getElementById('contenedor_salida');

ajax=nuevoAjax();
ajax.open("GET", "ver_recorrido.php?salida="+id_salida,true);
ajax.onreadystatechange=function() {
if (ajax.readyState==4) {
contenedor_salida.innerHTML = ajax.responseText
}
}
ajax.send(null)
}

function actualiza_formulario(){
var salida, sunombre, sucorreo, supais, telefono1, telefono2, elhorario, itinerario_base, suitinerario, barco_base, elbarco, naviera_base, lanaviera, elcamarote, fechas, suinfoadicional, contenedor_formulario;
contenedor_formulario = document.getElementById('contenedor_formulario');

salida = document.getElementById('salida').value;
sunombre = document.getElementById('sunombre').value;
sucorreo = document.getElementById('sucorreo').value;
supais = document.getElementById('supais').value;
telefono1 = document.getElementById('telefono1').value;
telefono2 = document.getElementById('telefono2').value;
elhorario = document.getElementById('elhorario').value;
itinerario_base = document.getElementById('itinerario_base').value;
suitinerario = document.getElementById('suitinerario').value;
barco_base = document.getElementById('barco_base').value;
elbarco = document.getElementById('elbarco').value;
naviera_base = document.getElementById('naviera_base').value;
lanaviera = document.getElementById('lanaviera').value;
elcamarote = document.getElementById('elcamarote').value;
fechas = document.getElementById('fechas').value;
suinfoadicional = document.getElementById('suinfoadicional').value;

ajax=nuevoAjax();
ajax.open("GET", "cotizacion.php?interno=si&salida="+salida+"&sunombre="+sunombre+"&sucorreo="+sucorreo+"&supais="+supais+"&telefono1="+telefono1+"&telefono2="+telefono2+"&elhorario="+elhorario+"&itinerario_base="+itinerario_base+"&suitinerario="+suitinerario+"&barco_base="+barco_base+"&elbarco="+elbarco+"&naviera_base="+naviera_base+"&lanaviera="+lanaviera+"&elcamarote="+elcamarote+"&fechas="+fechas+"&suinfoadicional="+suinfoadicional,true);
ajax.onreadystatechange=function() {
if (ajax.readyState==4) {
contenedor_formulario.innerHTML = ajax.responseText
}
}
ajax.send(null)
}


