// This call is nec on Macs (Netscape & Safari) to whittle down the destination list after the Back button is hit // (not nec on PCs with IE or Mozilla on Linux). I.e., on Mac browsers the (html SELECT element) destination list's // initial state was shown on Back up rather than its final state. 8/04 var ABL_list=new Array( new Option('Kobuk (OBU)','OBU') , new Option('Kotzebue (OTZ)','OTZ') , new Option('Shungnak (SHG)','SHG') ) ; var KTS_list=new Array( new Option('Nome (OME)','OME') , new Option('Shishmaref (SHH)','SHH') , new Option('Wales (WAA)','WAA') ) ; var BKC_list=new Array( new Option('Deering (DRG)','DRG') , new Option('Kotzebue (OTZ)','OTZ') ) ; var LUR_list=new Array( new Option('Kotzebue (OTZ)','OTZ') , new Option('Point Hope (PHO)','PHO') ) ; var DRG_list=new Array( new Option('Buckland (BKC)','BKC') , new Option('Kotzebue (OTZ)','OTZ') ) ; var DIO_list=new Array( ) ; var ELI_list=new Array( new Option('Golovin (GLV)','GLV') , new Option('Koyuk (KKA)','KKA') , new Option('Shaktoolik (SKK)','SKK') , new Option('White Mountain (WMO)','WMO') ) ; var GAM_list=new Array( new Option('Savoonga (SVA)','SVA') ) ; var GLV_list=new Array( new Option('Elim (ELI)','ELI') , new Option('Koyuk (KKA)','KKA') , new Option('Shaktoolik (SKK)','SKK') , new Option('White Mountain (WMO)','WMO') ) ; var IAN_list=new Array( new Option('Kotzebue (OTZ)','OTZ') , new Option('Noorvik (ORV)','ORV') ) ; var KVL_list=new Array( new Option('Kotzebue (OTZ)','OTZ') , new Option('Point Hope (PHO)','PHO') ) ; var OBU_list=new Array( new Option('Ambler (ABL)','ABL') , new Option('Kotzebue (OTZ)','OTZ') , new Option('Shungnak (SHG)','SHG') ) ; var OTZ_list=new Array( new Option('Ambler (ABL)','ABL') , new Option('Buckland (BKC)','BKC') , new Option('Cape Lisburne (LUR)','LUR') , new Option('Deering (DRG)','DRG') , new Option('Kiana (IAN)','IAN') , new Option('Kivalina (KVL)','KVL') , new Option('Kobuk (OBU)','OBU') , new Option('Noatak (WTK)','WTK') , new Option('Nome (OME)','OME') , new Option('Noorvik (ORV)','ORV') , new Option('Point Hope (PHO)','PHO') , new Option('Selawik (WLK)','WLK') , new Option('Shungnak (SHG)','SHG') ) ; var KKA_list=new Array( new Option('Nome (OME)','OME') , new Option('Shaktoolik (SKK)','SKK') , new Option('Unalakleet (UNK)','UNK') ) ; var WTK_list=new Array( new Option('Kivalina (KVL)','KVL') , new Option('Kotzebue (OTZ)','OTZ') ) ; var OME_list=new Array( new Option('Elim (ELI)','ELI') , new Option('Golovin (GLV)','GLV') , new Option('Kotzebue (OTZ)','OTZ') , new Option('Koyuk (KKA)','KKA') , new Option('Shaktoolik (SKK)','SKK') , new Option('Shishmaref (SHH)','SHH') , new Option('White Mountain (WMO)','WMO') ) ; var ORV_list=new Array( new Option('Kiana (IAN)','IAN') , new Option('Kotzebue (OTZ)','OTZ') ) ; var PHO_list=new Array( new Option('Cape Lisburne (LUR)','LUR') , new Option('Kotzebue (OTZ)','OTZ') ) ; var KPC_list=new Array( ) ; var SMK_list=new Array( new Option('Stebbins (WBB)','WBB') , new Option('Unalakleet (UNK)','UNK') ) ; var SVA_list=new Array( new Option('Gambell (GAM)','GAM') , new Option('Nome (OME)','OME') ) ; var WLK_list=new Array( new Option('Kotzebue (OTZ)','OTZ') ) ; var SKK_list=new Array( new Option('Koyuk (KKA)','KKA') , new Option('Nome (OME)','OME') , new Option('Unalakleet (UNK)','UNK') ) ; var SHH_list=new Array( new Option('Nome (OME)','OME') ) ; var SHG_list=new Array( new Option('Ambler (ABL)','ABL') , new Option('Kobuk (OBU)','OBU') , new Option('Kotzebue (OTZ)','OTZ') ) ; var WBB_list=new Array( new Option('Saint Michael (SMK)','SMK') , new Option('Unalakleet (UNK)','UNK') ) ; var TLA_list=new Array( new Option('Brevig Mission (KTS)','KTS') , new Option('Nome (OME)','OME') , new Option('Shishmaref (SHH)','SHH') , new Option('Wales (WAA)','WAA') ) ; var TNC_list=new Array( new Option('Wales (WAA)','WAA') ) ; var UNK_list=new Array( new Option('Koyuk (KKA)','KKA') , new Option('Nome (OME)','OME') , new Option('Saint Michael (SMK)','SMK') , new Option('Shaktoolik (SKK)','SKK') , new Option('Stebbins (WBB)','WBB') ) ; var WAA_list=new Array( new Option('Nome (OME)','OME') , new Option('Shishmaref (SHH)','SHH') , new Option('Tin City (TNC)','TNC') ) ; var WMO_list=new Array( new Option('Elim (ELI)','ELI') , new Option('Golovin (GLV)','GLV') , new Option('Koyuk (KKA)','KKA') , new Option('Shaktoolik (SKK)','SKK') ) ; function setDestinationList() { // Called when user chooses/changes start_code locale. gbh 2/25/04 if (!document.flight_search.start_code) return; depCode = document.flight_search.start_code.value; // Grab the currently selected value of the start_code list. if(""==depCode) return; destList = document.flight_search.dest_code.options; // From this point, what is done to destList is done to the dest_code options. destList.length = 0; // Truncate away the old values. // Display the destination list corresponding to the currently selected start_code locale. for (i=0; i < eval(depCode+'_list.length'); i++) { destList[i] = eval(depCode+'_list[i]'); } } // endfunction setDestinationList. function flight_search_validate() { obj = document.flight_search; if(''==obj.start_code.value) { alert('Please select location of departure.'); obj.start_code.focus(); return false; } if(''==obj.dest_code.value) { alert('Please select a destination.'); obj.dest_code.focus(); return false; } var startdate = new Date(obj.startyear.value, obj.startmonth.value-1, obj.startday.value); var now = new Date(); // Var 'now' includes the time of day, which we get rid of ... var today = new Date(now.getFullYear(), now.getMonth(), now.getDate()); // ... here. if (startdate < today) { alert('Error: date of departure is in the past.'); obj.startday.focus(); return false; } return true; } //flight_search_validate