	var ricerca_proA;

function cercaARRIVO_A()
{
    var valorecampo = document.FBookingH.A_PARTENZA.options[document.FBookingH.A_PARTENZA.selectedIndex].value;
    if (window.XMLHttpRequest) {
        ricerca_proA = new XMLHttpRequest();
        ricerca_proA.onreadystatechange = riceviARRIVO_A;
        ricerca_proA.open("GET", "/linee/01cercaARRIVO.asp?ID="+valorecampo,true);
        ricerca_proA.send(null);
    } else if (window.ActiveXObject) {
        ricerca_proA = new ActiveXObject("Microsoft.XMLHTTP");
        if (ricerca_proA) {
            ricerca_proA.onreadystatechange = riceviARRIVO_A;
            ricerca_proA.open("GET", "/linee/01cercaARRIVO.asp?ID="+valorecampo,true);
            ricerca_proA.send();
        }
    }
}
  function riceviARRIVO_A() {
    var strRes;
    var arrValori;
	  if (ricerca_proA.readyState == 4) {
		  strRes=ricerca_proA.responseText;
		  arrValori=strRes.split("||");
		  document.FBookingH.A_ARRIVO.options.length=0;

document.FBookingH.A_ARRIVO.options[document.FBookingH.A_ARRIVO.options.length]= new Option('[ Arrivo a: ]','');		    

		  for(i=0;i<arrValori.length;i++)
		  {
document.FBookingH.A_ARRIVO.options[document.FBookingH.A_ARRIVO.options.length]= new Option((arrValori[i].split("|")[1]),(arrValori[i].split("|")[0]));

			}
		}
	}

	var ricerca_proR;

function cercaARRIVO_R()
{
    var valorecampo = document.FBookingH.R_PARTENZA.options[document.FBookingH.R_PARTENZA.selectedIndex].value;
    if (window.XMLHttpRequest) {
        ricerca_proR = new XMLHttpRequest();
        ricerca_proR.onreadystatechange = riceviARRIVO_R;
        ricerca_proR.open("GET", "/linee/01cercaARRIVO.asp?ID="+valorecampo,true);
        ricerca_proR.send(null);
    } else if (window.ActiveXObject) {
        ricerca_proR = new ActiveXObject("Microsoft.XMLHTTP");
        if (ricerca_proR) {
            ricerca_proR.onreadystatechange = riceviARRIVO_R;
            ricerca_proR.open("GET", "/linee/01cercaARRIVO.asp?ID="+valorecampo,true);
            ricerca_proR.send();
        }
    }
}
  function riceviARRIVO_R() {
    var strRes;
    var arrValori;
	  if (ricerca_proR.readyState == 4) {
		  strRes=ricerca_proR.responseText;
		  arrValori=strRes.split("||");
		  document.FBookingH.R_ARRIVO.options.length=0;

document.FBookingH.R_ARRIVO.options[document.FBookingH.R_ARRIVO.options.length]= new Option('[ Arrivo a: ]','');		    

		  for(i=0;i<arrValori.length;i++)
		  {
document.FBookingH.R_ARRIVO.options[document.FBookingH.R_ARRIVO.options.length]= new Option((arrValori[i].split("|")[1]),(arrValori[i].split("|")[0]));

			}
		}
	}
