function cambiar()
{
var index=document.getElementById('sltorigen').selectedIndex;

document.getElementById('slthasta').length=0; 

if(index==1) Aruba();
if(index==2) Barcelona(); 
if(index==3) Barinas(); 
if(index==4) Barquisimeto(); 
if(index==5) Caracas(); 
if(index==6) Curacao(); 
if(index==7) Maracaibo(); 
if(index==8) Miami(); 
if(index==9) Porlamar();
if(index==10) PuertoOrdaz(); 
if(index==11) Valencia(); 


}
/*Opcion por defecto*/
function opcionxdefecto(){
opcion0=new Option("ciudad o codigo de aeropuerto","ciudad o codigo de aeropuerto","defauldSelected");
document.getElementById('slthasta').options[0]=opcion0;
}
/*Destinos de Acarigua*/

/* Destinos de Aruba*/
function Aruba(){
var matriz=new Array(2);
matriz[0]=new Option("Barcelona (BLA)","BLA","defauldSelected");
matriz[1]=new Option("Barquisimeto (BRM)","BRM");
matriz[2]=new Option("Caracas (CCS)","CCS");
for (x = 0; x <=2 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}
/*Destinos de Barcelona*/
function Barcelona(){
var matriz=new Array(9);
matriz[0]=new Option("Aruba (AUA)","AUA","defauldSelected");
matriz[1]=new Option("Barinas (BNS)","BNS");
matriz[2]=new Option("Barquisimeto (BRM)","BRM");
matriz[3]=new Option("Caracas (CCS)","CCS");
matriz[4]=new Option("Curacao (CUR)","CUR");
matriz[5]=new Option("Maracaibo (MAR)","MAR");
matriz[6]=new Option("Miami (MIA)","MIA");
matriz[7]=new Option("Porlamar (PMV)","PMV");
matriz[8]=new Option("Puerto Ordaz (PZO)","PZO");
matriz[9]=new Option("Valencia (VLN)","VLN");

for (x = 0; x <=9 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}
/*Destinos de Barinas*/
function Barinas(){
var matriz=new Array(3);
matriz[0]=new Option("Barcelona (BLA)","BLA","defauldSelected");
matriz[1]=new Option("Caracas (CCS)","CCS");
matriz[2]=new Option("Maracaibo (MAR)","MAR");
matriz[3]=new Option("Porlamar (PMV)","PMV");
for (x = 0; x <=3 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

/*Destinos de Barquisimeto*/
function Barquisimeto(){
var matriz=new Array(4);
matriz[0]=new Option("Aruba (AUA)","AUA","defauldSelected");
matriz[1]=new Option("Barcelona (BLA)","BLA");
matriz[2]=new Option("Barinas (BNS)","BNS");
matriz[3]=new Option("Caracas (CCS)","CCS");
matriz[4]=new Option("Porlamar (PMV)","PMV");
for (x = 0; x <=4 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

/*Destinos de Caracas*/
function Caracas(){
var matriz=new Array(7);
matriz[0]=new Option("Aruba (AUA)","AUA","defauldSelected");
matriz[1]=new Option("Barcelona (BLA)","BLA");
matriz[2]=new Option("Barinas (BNS)","BNS");
matriz[3]=new Option("Barquisimeto (BRM)","BRM");
matriz[4]=new Option("Curacao (CUR)","CUR");
matriz[5]=new Option("Maracaibo (MAR)","MAR");
matriz[6]=new Option("Porlamar(PMV)","PMV");
matriz[7]=new Option("Puerto Ordaz (PZO)","PZO");
for (x = 0; x <=7 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

/*Destinos de Curacao*/
function Curacao(){
var matriz=new Array(1);
matriz[0]=new Option("Barquisimeto (BRM)","BRM", "defauldSelected");
matriz[1]=new Option("Caracas (CCS)","CCS");

for (x = 0; x <=1 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

/*Destinos de Maracaibo*/
function Maracaibo(){
var matriz=new Array(6);
matriz[0]=new Option("Aruba (AUA)","AUA","defauldSelected");
matriz[1]=new Option("Barcelona (BLA)","BLA");
matriz[2]=new Option("Caracas (CCS)","CCS");
matriz[3]=new Option("Curacao (CUR)","CUR");
matriz[4]=new Option("Porlamar(PMV)","PMV");
matriz[5]=new Option("Puerto Ordaz (PZO)","PZO");
matriz[6]=new Option("Valencia (VLN)","VLN");

for (x = 0; x <=6 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

/*Destinos de Miami*/
function Miami(){
var matriz=new Array(2);	
matriz[0]=new Option("Barcelona (BLA)","BLA","defauldSelected");
matriz[1]=new Option("Porlamar (PMV)","PMV");
matriz[2]=new Option("Puerto Ordaz (PZO)","PZO");
for (x = 0; x <=2 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];

}


/*Destinos de Porlamar*/
function Porlamar(){
var matriz=new Array(5);
matriz[0]=new Option("Aruba (AUA)","AUA","defauldSelected");
matriz[1]=new Option("Barcelona (BLA)","BLA");
matriz[2]=new Option("Barquisimeto (BRM)","BRM");
matriz[3]=new Option("Caracas (CCS)","CCS");
matriz[4]=new Option("Curacao (CUR)","CUR");
matriz[5]=new Option("Miami (MIA)","MIA");
for (x = 0; x <=5 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

/*Destinos de Puerto Ordaz*/
function PuertoOrdaz(){
var matriz=new Array(4);
matriz[0]=new Option("Barcelona (BLA)","BLA","defauldSelected");
matriz[1]=new Option("Caracas (CCS)","CCS");
matriz[2]=new Option("Maracaibo (MAR)","MAR");
matriz[3]=new Option("Miami (MIA)","MIA");
matriz[4]=new Option("Valencia (VLN)","VLN");
for (x = 0; x <=4 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

/*Destinos de Valencia*/
function Valencia(){
var matriz=new Array(2);
matriz[0]=new Option("Barcelona (BLA)","BLA","defauldSelected");
matriz[1]=new Option("Maracaibo (MAR)","MAR");
matriz[2]=new Option("Puerto Ordaz (PZO)","PZO");
for (x = 0; x <=2 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];

}

