function cambiar()
{
var index=document.getElementById('sltorigen').selectedIndex;

document.getElementById('slthasta').length=0; 

if(index==0) opcionxdefecto();

if(index==1) Aruba();
if(index==2) Barcelona(); 
if(index==3) Barinas(); 
if(index==4) Barquisimeto(); 
if(index==5) Caracas(); 
//if(index==6) Cumana();
if(index==6) Curacao(); 
//if(index==8) Maracaibo(); 
if(index==7) Miami(); 
if(index==8) Porlamar(); 
//if(index==11) PuertoOrdaz(); 
//if(index==12) 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*/
function Acarigua(){
var matriz=new Array(5);
matriz[0]=new Option("Aruba (AUA)","AUA","defauldSelected");
matriz[1]=new Option("Caracas (CCS)","CCS");
matriz[2]=new Option("Carupano (CUP)","CUP");
matriz[3]=new Option("Coro (CZE)","CZE");
matriz[4]=new Option("Porlamar (PMV)","PMV");
matriz[5]=new Option("San Tom\351 (SOM)","SOM");
for (x = 0; x <=5 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}
/* Destinos de Aruba*/
function Aruba(){
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 Barcelona*/
function Barcelona(){
var matriz=new Array(4);
matriz[0]=new Option("Barinas (BNS)","BNS","defauldSelected");
matriz[1]=new Option("Barquisimeto (BRM)","BRM");
matriz[2]=new Option("Caracas (CCS)","CCS");
matriz[3]=new Option("Miami (MIA)","MIA");
matriz[4]=new Option("Porlamar (PMV)","PMV");
for (x = 0; x <=4 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}
/*Destinos de Barinas*/
function Barinas(){
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];
}

function Barquisimeto(){
var matriz=new Array(5);
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("Curacao (CUR)","CUR");
matriz[5]=new Option("Porlamar (PMV)","PMV");
for (x = 0; x <=5 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

function Caracas(){
var matriz=new Array(5);
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("Porlamar(PMV)","PMV");
for (x = 0; x <=5 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

function Carupano(){
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("Coro (CZE)","CZE");
matriz[5]=new Option("San Tom\351 (SOM)","SOM");
for (x = 0; x <=5 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

function Coro(){
var matriz=new Array(4);
matriz[0]=new Option("Barcelona (BLA)","BLA","defauldSelected");
matriz[1]=new Option("Caracas (CCS)","CCS");
matriz[2]=new Option("Carupano (CUP)","CUP");
matriz[3]=new Option("Porlamar (PMV)","PMV");
matriz[4]=new Option("San Tom\351 (POS)","POS");
for (x = 0; x <=4 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

function Cumana(){
var matriz=new Array(3);
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("Porlamar (PMV)","PMV");

for (x = 0; x <=3 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

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];
}

function Maracaibo(){
var matriz=new Array(0);
matriz[0]=new Option("Curacao (CUR)","CUR","defauldSelected");
document.getElementById('slthasta').options[0]=matriz[0];

}

function Miami(){
var matriz=new Array(1);	
matriz[0]=new Option("Barcelona (BLA)","BLA","defauldSelected");
matriz[1]=new Option("Porlamar (PMV)","PMV");
for (x = 0; x <=1 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];

}

function Porlamar(){
var matriz=new Array(3);
matriz[0]=new Option("Barcelona (BLA)","BLA","defauldSelected");
matriz[1]=new Option("Barquisimeto (BRM)","BRM");
matriz[2]=new Option("Caracas (CCS)","CCS");
matriz[3]=new Option("Miami (MIA)","MIA");
for (x = 0; x <=3; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

function PuertoEspana(){
var matriz=new Array(3);
matriz[0]=new Option("Barcelona (BLA)","BLA","defauldSelected");
matriz[1]=new Option("Caracas (CCS)","CCS");
matriz[2]=new Option("Porlamar (PMV)","PMV");
matriz[3]=new Option("Puerto Ordaz (PZO)","PZO");
for (x = 0; x <=3 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

function PuertoOrdaz(){
var matriz=new Array(3);
matriz[0]=new Option("Aruba (AUA)","AUA","defauldSelected");
matriz[1]=new Option("Barquisimeto (BRM)","BRM");
matriz[2]=new Option("Caracas (CCS)","CCS");
matriz[3]=new Option("Porlamar (PMV)","PMV");
for (x = 0; x <=3 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

function SanTome(){
var matriz=new Array(4);
matriz[0]=new Option("Acarigua (AGV)","AGV","defauldSelected");
matriz[1]=new Option("Barquisimeto (BRM)","BRM");
matriz[2]=new Option("Caracas (CCS)","CCS");
matriz[3]=new Option("Coro (CZE)","CZE");
matriz[4]=new Option("Porlamar (PMV)","PMV");
for (x = 0; x <=4 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];
}

function Valencia(){
var matriz=new Array(1);
matriz[0]=new Option("Aruba (AUA)","AUA","defauldSelected");
matriz[1]=new Option("Curacao (CUR)","CUR");
for (x = 0; x <=1 ; x++)
document.getElementById('slthasta').options[x]=matriz[x];

}
