<!--

var sysdate		= new Date();
var anio 		= sysdate.getFullYear();
var mes     	= sysdate.getMonth();
var numpaxes 	= 9;
var Meses=arrMes[0];
function flightInit_go(dat)
{
 var str = "";
 // Quito los acentos
 flightForm.depCity.value = QuitarAcentos(flightForm.depCity.value);
 flightForm.arrCity.value = QuitarAcentos(flightForm.arrCity.value);
 var msg="";
 //groupval(str, nom, islg, isln, isnm)
   msg = doconcat(msg,groupval(flightForm.depCity.value,'Ciudad de salida',1,1,0)); 
   msg = doconcat(msg,groupval(flightForm.arrCity.value,'Ciudad de llegada',1,1,0)); 
   msg = doconcat(msg,groupval(flightForm.fe_dia.options[flightForm.fe_dia.selectedIndex].value,'Día de salida',0,1,1));
   msg = doconcat(msg,groupval(flightForm.fe_mesanyo.options[flightForm.fe_mesanyo.selectedIndex].value,'Mes de salida',0,1,1));
   var fechadep = flightForm.fe_mesanyo.options[flightForm.fe_mesanyo.selectedIndex].value + "" + flightForm.fe_dia.options[flightForm.fe_dia.selectedIndex].value;
   //comprobamos vuelos directos
	  if (flightForm.direct.checked)
	  {
	      flightForm.directOnly.value = 'S';
	  }
	  else
	  {
	      flightForm.directOnly.value = 'N';
	  }
   
   if (flightForm.queryType[0].checked){
     msg = doconcat(msg,groupval(flightForm.fs_dia.options[flightForm.fs_dia.selectedIndex].value,'Día de llegada',0,1,1));
     msg = doconcat(msg,groupval(flightForm.fs_mesanyo.options[flightForm.fs_mesanyo.selectedIndex].value,'Mes de llegada',0,1,1));
     var fecharet = flightForm.fs_mesanyo.options[flightForm.fs_mesanyo.selectedIndex].value + "" + flightForm.fs_dia.options[flightForm.fs_dia.selectedIndex].value;
     if (fecharet < fechadep)
      {msg = doconcat(msg,"La fecha de llegada tiene que ser mayor que la de salida \n");}
   }
   
     //me fijo que la fecha de salida sea mayor a 2 dias
 // SACA LA HORA DEL SERVIDOR

     var now 	= new Date();
     now.setTime(dat);
     
     now.setDate(now.getDate());
     var strnow = now.getFullYear()+""+flightInit_addcero(now.getMonth()+1)+""+flightInit_addcero(now.getDate());
    if (fechadep < strnow)
      {msg = doconcat(msg,"Error. No puede buscar vuelos para fechas pasadas. \n");}
   
     var nAdt = 1 * flightForm.paxAdt.options[flightForm.paxAdt.selectedIndex].value;
     var nChd = 1 * flightForm.paxChd.options[flightForm.paxChd.selectedIndex].value;
     var nInf = 1 * flightForm.paxInf.options[flightForm.paxInf.selectedIndex].value;
     if (nInf > nAdt)msg = doconcat(msg,"El número bebes no puede superar al de adultos \n");
     if ((nAdt + nChd) > 9)msg = doconcat(msg,"El número total de adultos y niños no puede ser mayor a nueve. \n");
     if ((nInf + nChd) > (nAdt * 2) )msg = doconcat(msg,"El número bebes y niños no puede superar al doble del numero de adultos \n");
   /* Si es i/v para el mismo d???a se mete a pelo busqueda por horario
   if(flightForm.depTime.value != "" || flightForm.retTime.value != ""){
		flightForm.resultType[1].checked = true;
	}
	*/
   
   if (msg != '')
    {alert(msg);}
   else
    {
     if (browser!="Microsoft Internet Explorer" || browser!="Netscape"){
     	flightForm.resultType.value="P";
     }
	 str = flightForm.fe_mesanyo.value;
	 flightForm.depDate.value = flightForm.fe_dia.value+"/"+str.substring(4)+"/"+str.substring(0,4);
	 str = flightForm.fs_mesanyo.value;
	 flightForm.retDate.value = flightForm.fs_dia.value+"/"+str.substring(4)+"/"+str.substring(0,4);
	 flightForm.submit();
    //alert("LLEGOOO");
    }
}


function flightInit_addcero(str)
{
	var str2 = "0"+str;
	return str2.substring(str2.length-2);
}
function flightInit_triptype()
{
	if(flightForm.rrt.checked)
	{
		flightForm.fs_dia.disabled 		= false;
        flightForm.fs_mesanyo.disabled 	= false;
        flightForm.retTime.disabled 	= false;
	}
	if(flightForm.row.checked)
	{
		flightForm.fs_dia.disabled 		= true;
        flightForm.fs_mesanyo.disabled 	= true;
        flightForm.retTime.disabled 	= true;
	}
}
function flightInit_test()
{
   flightForm.depCity.value = "MAD";
   flightForm.arrCity.value = "LON";
   flightForm.fe_dia.value	= "08";
   flightForm.fs_dia.value  = "20";
   flightForm.fe_mesanyo.value = "200511";
   flightForm.fs_mesanyo.value = "200511";
}
-->
