var tinbu_fv_server = "http://www.tinbuflight.com";
var y1l00l10="http://www.tinbusports.com";

var tinbu_cookieName = 'C1OOl110l';
var tinbu_cookieArray = new Array(null);
var ysearch_url;
var affildata;
var fv_feed_category=27;
 

var varNameLen = 4;
var timeToKeep = 365*24*60*60*1000;
var tinbu_cookieExpires = new Date();
tinbu_cookieExpires.setTime(tinbu_cookieExpires.getTime() + timeToKeep);

var varName_fv_user_def_prod="f0v1";      // for Flight
var varName_fv_user_def_flight="f0v2";   
var varName_fv_user_def_airline="f0v3";
var varName_fv_user_def_date="f0v4";
var varName_fv_user_flight="f0v5";
var varName_fv_user_airline="f0v6";
var varName_fv_user_airport="f0v7";
var varName_fv_user_date="f0v8";
var varName_fv_user_metric="f0v9";
var varName_fv_user_color="f1v0";
var varName_fv_show_fv="f1v1";
var varName_fv_year="f1v2";

// Following cookie name have to be unique and 4 chars
var varName_fv_sch_airline="f1v3";        // for airline  
var varName_fv_sch_flnumber="f1v4";       // Flight Number
var varName_fv_sch_depdate="f1v5";        // departure date
var varName_fv_sch_arrdate="f1v6";        // arrival date
var varName_fv_sch_depap="f1v7";          // departure airport 
var varName_fv_sch_arrap="f1v8";          // arrival airport
var varName_fv_sch_dephr="f1v9";          // departure hour 
var varName_fv_sch_arrhr="f2v0";          // arrival hour
var varName_fv_sch_simplestatus="f2v1";   // simplestatus

// var for requesting flight XLM data
var varName_fv_req_airline="f2v2";        // Airline 
var varName_fv_req_flnumber="f2v3";       // Flight number
var varName_fv_req_depdate="f2v4";        // departure date
var varName_fv_req_arrdate="f2v5";        // arrival date
var varName_fv_req_depap="f2v6";          // departture airport 
var varName_fv_req_arrap="f2v7";          // arrival airport
var varName_fv_req_dephr="f2v8";          // departture hour 
var varName_fv_req_arrhr="f2v9";          // arrival hour
var varName_fv_req_simplestatus="f3v0";   // simplestatus

var varName_fv_req_search="f3v1";           // search by Airline/Flight or City 
var varName_fv_req_prod="f3v2";          
var xl1ll11lll11lll="f3v3";           // varName_fv_req_airport: Requested Airport Status
var varName_fv_req_article="f3v4";           // Requested Airport Status
var varName_fv_selected_ap0="f3v5";
var varName_fv_selected_ap1="f3v6";
var varName_fv_selected_ap2="f3v7";
var varName_fv_selected_al="f3v8";

var MaxUserLocations = 20;
var MaxUserFlight = 20;
var MaxUserAirline = 20;
var NumUserFlight = 0;
var NumUserAirline = 0;
var NumFvLocations = 0;
var fv_local_hours = 100;

// create var for the search cases
var UserReqSearchFlight = 0;   // search by flight 
var UserReqSearchCity = 1;     // search by city
var UserReqAirportStatus = 2;
var UserReqShowCustomFv = 3;
var xl11lllll1lllll = 4;
var UserReqAirlineLinks = 5;
var UserReqSeniorCitizens = 6;
var UserReqTellFriend = 7;
var UserReqOnTimeStat = 8;


var fv_def_width;
var fv_def_fv_url;           // default flight view url
var fv_def_fv_airline;       //  default airline value AL=aa(a) 
var fv_def_fv_airport;       //  default airport vaule
var fv_def_style_file;
var fv_def_style_set;
var fv_def_site_fv_lang;
var fv_def_site_fv_flight;

var ValueColorSet;
var ValueReqFvSearch;          // For Flight Search
var ValueReqFvProd;            // For Flight request
var ValueDefaultFlight;        // For User Default Flight
var ValueDefaultAirline;       // For User Default Airline
var ValueDefaultAirport;       // For User Default Airport
var ValueAirportStatus;
var ValueRequestYear;          // request year for statistics
// create the var for storing cookie values

var ValueFvSchFlnumber;    //  Format for flight number: ACID=AA1234 or ACID=1234 
var ValueFvSchAirline;       //  Format for airline value AL=aa(a) 
var ValueFvSchdepdate;       //  Format for departure date depdt=yyyymmdd
var ValueFvScharrdate;       //  Format for arrival date arrdt=yyyymmdd
var ValueFvSchdepap;         //  Format for departure airport depap=aaa(a)
var ValueFvScharrap;         //  Format for arrival airport arrap = aaa(a)
var ValueFvSchdephour;       //  Format for departure hour dephr = hhmm
var ValueFvScharrhour;       //  Format for arrival hour arrhr=hhmm
var ValueFvArticleID;  //  Flight Article ID
var ValueFvCurrApIndex=1;
var ValueFvAirlines = new Array("EI", "AM", "9A", "AC", "CA", "AF", "3H", "JM", "IJ", "NZ", "FL", "TS", "GB", "AS", "AZ", "NH", "G4", "AQ", "AA", "AV", "UP", "JV", "GQ", "BU", "BA", "BD", "ED", "C6", "5T", "CX", "MU", "CZ", "CO", "DL", "7H", "BR", "U2", "LY", "E0", "XE", "AY", "7F", "RF", "F9", "GA", "HQ", "HA", "IB", "FI", "IC", "IR", "JD", "JL", "QJ", "B6", "KL", "KE", "WJ", "LH", "MY", "MH", "YV", "MX", "GL", "YX", "NW", "OA", "KS", "PR", "PO", "QF", "SN", "S6", "SV", "SK", "YR", "S5", "SQ", "SX", "5G", "SA", "WN", "JK", "NK", "SY", "LX", "TG", "TIJ", "TK", "US", "U5", "UA", "VP", "RG", "VX", "VS", "WS", "MF", "Z4");

var ValueDefSiteFlightArray = new Array();
var ValueSavedFlightArray= new Array();
var ValueSearchFlightArray= new Array();
document.write("<script language=JavaScript src='http://www.tinbuweather.com/js/overlib.js'></script>");
if (fv_def_style_file=="") {
 ValueColorSet = getVarValuesByName (varName_fv_user_color);
 if (ValueColorSet=="") {
  ValueColorSet = fv_def_style_set;
  document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\""+tinbu_fv_server+"/css_fv/fv_style"+fv_def_style_set+".css\">");
 } else {
  document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\""+tinbu_fv_server+"/css_fv/fv_style"+ValueColorSet+".css\">");
 }
} else {
 document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\""+fv_def_style_file+"\">");
}

if (fv_def_site_fv_lang==0) {
 document.write("<script type=\"text/javascript\" src='"+tinbu_fv_server+"/js/tinbufv_english.js'></script>");
} else if (fv_def_site_fv_lang==1) {
 document.write("<script type=\"text/javascript\" src='"+tinbu_fv_server+"/js/tinbufv_spanish.js'></script>");
 fv_feed_category=28;
} else if (fv_def_site_fv_lang==2) {
 document.write("<script type=\"text/javascript\" src='"+tinbu_fv_server+"/js/tinbufv_german.js'></script>");
} else if (fv_def_site_fv_lang==3) {
 document.write("<script type=\"text/javascript\" src='"+tinbu_fv_server+"/js/tinbufv_chinese_simplified.js'></script>");
} else if (fv_def_site_fv_lang==4) {
 document.write("<script type=\"text/javascript\" src='"+tinbu_fv_server+"/js/tinbufv_chinese_traditional.js'></script>");
} else if (fv_def_site_fv_lang==5) {
 document.write("<script type=\"text/javascript\" src='"+tinbu_fv_server+"/js/tinbufv_french.js'></script>");
} else {
 fv_feed_category=27;
 document.write("<script type=\"text/javascript\" src='"+tinbu_fv_server+"/js/tinbufv_english.js'></script>");
}

function set_cookie(cookie_name,cookie_value,cookie_expires)
{
 if (!cookie_expires) {
  cookie_expires = new Date();
 }
 document.cookie = cookie_name + '=' + escape(cookie_value) + '; expires=' + cookie_expires.toGMTString() + '; path=/';
}
function get_cookie(cookie_name) {
 var dcookie = document.cookie;
 var cname = cookie_name + "=";
 var clen = dcookie.length;
 var cbegin = 0;
 while (cbegin < clen)
 {
  var vbegin = cbegin + cname.length;
  if (dcookie.substring(cbegin, vbegin) == cname) {
   var vend = dcookie.indexOf (";", vbegin);
  if (vend == -1) vend = clen;
   return unescape(dcookie.substring(vbegin, vend));
  }
  cbegin = dcookie.indexOf(" ", cbegin) + 1;
  if (cbegin == 0) break;
 }
 return null;
}
function del_cookie(cookie_name)
{
 document.cookie = cookie_name + '=' + '; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/';
}
function get_array(cookie_name)
{
 var the_entry = get_cookie(cookie_name);
 if (the_entry) {
  arr_idx = 1;
  while (the_entry.indexOf('^') != '-1')
  {
   tinbu_cookieArray[arr_idx] = the_entry.substring(0,the_entry.indexOf('^'));
   arr_idx++;
   the_entry = the_entry.substring(the_entry.indexOf('^')+1, the_entry.length);
  }
 }
}
function set_array(cookie_name, cookie_expires)
{
 var cookie_value = '';
 for (var arr_idx = 1; tinbu_cookieArray[arr_idx]; arr_idx++)
 {
  cookie_value += tinbu_cookieArray[arr_idx] + '^';
 }
 set_cookie(cookie_name, cookie_value, cookie_expires);
}
function del_entry(cookie_name, cookie_pos, cookie_expires)
{
 var cookie_value = '';
 get_array(cookie_name);
 for (var arr_idx = 1; arr_idx < cookie_pos; arr_idx++)
 {
  cookie_value += tinbu_cookieArray[arr_idx] + '^';
 }
 for (var array_idx = cookie_pos + 1; tinbu_cookieArray[array_idx]; array_idx++)
 {
  cookie_value += tinbu_cookieArray[array_idx] + '^';
 }
 set_cookie(cookie_name, cookie_value, cookie_expires);
}
function next_entry()
{
 var arr_idx = 0;
 for (var i = 1; tinbu_cookieArray[i]; i++)
 {
  arr_idx = i
 }
 return arr_idx + 1;
}
function dump_cookies()
{
 if (document.cookie == '')
  document.write('No Cookies Found');
 else
 {
  thisCookie = document.cookie.split('; ');
  for (arr_idx=0; arr_idx<thisCookie.length; arr_idx++)
  {
   document.write(thisCookie[arr_idx] + '<br \/>');
  }
 }
}
function xlll11ll111lll1 (varName, varValue) //function setVarValuesByName (varName, varValue)
{
 var varIndex;
 get_array(tinbu_cookieName);
 for (varIndex=1; tinbu_cookieArray[varIndex]; varIndex++) {
   if (tinbu_cookieArray[varIndex].substring (0,varNameLen) == varName) {
       tinbu_cookieArray[varIndex] = varName+varValue;
       set_array(tinbu_cookieName, tinbu_cookieExpires);
       return;
   }
 }

 var entry_num = next_entry();
 tinbu_cookieArray[entry_num] = varName+varValue;
 set_array(tinbu_cookieName, tinbu_cookieExpires);
}
function getVarValuesByName (varName)
{
 var varIndex;
 get_array(tinbu_cookieName);
 for (var varIndex=1; tinbu_cookieArray[varIndex]; varIndex++)
 {
   if (tinbu_cookieArray[varIndex].substring (0,varNameLen) == varName) {
       return (tinbu_cookieArray[varIndex].substring(varNameLen));
   }
 }
 return "";
}
function delVarValuesByName (varName)
{
 var varIndex;
 get_array(tinbu_cookieName);
 for (varIndex=1; tinbu_cookieArray[varIndex];  varIndex++)
 {
   if (tinbu_cookieArray[varIndex].substring (0,varNameLen) == varName) {
       del_entry(tinbu_cookieName, varIndex, tinbu_cookieExpires);
       return;
   }
 }
}
function ysetl01l(y0O1l111,yO00O1ll,y1l1l010, yOOO1ll1)
{
 var y1ll0Oll=y0O1l111 + "=" + escape(yO00O1ll) + ((y1l1l010) ? "; expires=" + y1l1l010.toGMTString():"") +((yOOO1ll1) ? "; path=" + yOOO1ll1 : "");
 document.cookie=y1ll0Oll;
}
function y1100ll1 (y0011000) {
 var y11ll011=document.cookie.indexOf (";", y0011000);
 if (y11ll011 == -1) {
    y11ll011=document.cookie.length;
 }
 return unescape(document.cookie.substring(y0011000, y11ll011));
}
function yget01O1 (yll100l1)
{
 var yl1l1100=yll100l1 + "=";
 var yl110100=yl1l1100.length;
 var yOl0l11l=document.cookie.length;
 var ylll01O0=null;
 var i=0;
 while (i < yOl0l11l)
 {
  var j=i + yl110100;
  if (document.cookie.substring(i, j) == yl1l1100) {
   ylll01O0=y1100ll1 (j);
  }
  i=document.cookie.indexOf(" ", i) + 1;
  if (i == 0) break;
 }
 return ylll01O0;
}
function y1lll1l1()
{
 var yO1OllOl=window.location.href;
 if(yO1OllOl.indexOf('http://',0)!=0) {
  return;
 }
 var yexp01ll=new Date ();
 yexp01ll.setTime (yexp01ll.getTime()+(60*60*1000));
 var yll11lOl = yO1OllOl.indexOf ("/",7);
 var yval10ll = yget01O1("ycook101");
 if (!yval10ll||yval10ll=='null') {
  yval10ll=0;
 } else {
  yval10ll=1;
 }
 document.write("<script Language=JAVASCRIPT src='"+y1l00l10+"/script/y0000000?ft="+fv_feed_category+"&v="+yval10ll+"&u="+yO1OllOl.substring(7,yll11lOl)+"'></script>");
 ysetl01l("ycook101",1,yexp01ll,"/");
}
function FvLoadFlightPage()
{
 window.location.href = fv_def_fv_url;
}

// STEP 5: after page reload, pick up saved cookie value: 1. product(search for a Flight by flight number, airport and date)
// fv_Middle
function x1lll1l1l11l1ll()  // All Flight Applications Called From Here
{
 y1lll1l1();

 var QueryStringFirstPart = "<script language=javascript src='"+tinbu_fv_server+"/script/";
 var QueryStringLastPart = "'></script>";

 ValueReqFvProd= getVarValuesByName (varName_fv_req_prod);
 ValueDefaultFlight = getVarValuesByName (varName_fv_user_def_flight);

 if (ValueReqFvProd == -1) {
     if (ValueDefaultFlight != "") {
         SetUserQuery(ValueDefaultFlight);
         ValueReqFvProd= getVarValuesByName (varName_fv_req_prod);
     }
 }
     
 if (ValueReqFvProd == UserReqSearchFlight) {
  // STEP 6. pick up search Flight number, Airline, departure Date from cookie
  ValueFvSchFlnumber = getVarValuesByName (varName_fv_sch_flnumber);
  ValueFvSchAirline = getVarValuesByName (varName_fv_sch_airline);
  ValueFvSchdepdate = getVarValuesByName (varName_fv_sch_depdate);
  ValueFvSchdepap = getVarValuesByName (varName_fv_sch_depap);
  if (ValueFvSchFlnumber.length > 0) {
     QueryStringPart2 = "fv_find_flight?"; 
     QueryStringPart2 = QueryStringPart2+"flno="+ValueFvSchFlnumber;
     QueryStringPart2 = QueryStringPart2+"&al="+ValueFvSchAirline;
     QueryStringPart2 = QueryStringPart2+"&depdate="+ValueFvSchdepdate;
     QueryStringPart2 = QueryStringPart2+"&depap="+ValueFvSchdepap;
   
   // STEP 7. call c application fv_find_flight
   //alert(QueryStringFirstPart+QueryStringPart2+QueryStringLastPart);
     document.write(QueryStringFirstPart+QueryStringPart2+QueryStringLastPart);
  }
 } else if (ValueReqFvProd == UserReqSearchCity) {
   // City Search
   ValueFvSchdepap = getVarValuesByName (varName_fv_sch_depap);
   ValueFvScharrap = getVarValuesByName (varName_fv_sch_arrap);
   ValueFvSchdepdate = getVarValuesByName (varName_fv_sch_depdate);
   ValueFvScharrdate = getVarValuesByName (varName_fv_sch_arrdate);
   ValueFvSchdephour = getVarValuesByName (varName_fv_sch_dephr);
   ValueFvScharrhour = getVarValuesByName (varName_fv_sch_arrhr);
   if (ValueFvSchdepap.length > 0) {
      xlll11ll111lll1 (xl1ll11lll11lll, ValueFvSchdepap); //setVarValuesByName (varName_fv_req_airport, ValueFvSchdepap);
      QueryStringPart2 = "fv_find_flight?"; 
      QueryStringPart2 = QueryStringPart2+"depap="+ValueFvSchdepap;
      QueryStringPart2 = QueryStringPart2+"&arrap="+ValueFvScharrap;
      if (ValueFvSchdepdate.length > 0) {
          QueryStringPart2 = QueryStringPart2+"&depdate="+ValueFvSchdepdate;
      } else if (ValueFvScharrdate.length > 0) {
          QueryStringPart2 = QueryStringPart2+"&arrdate="+ValueFvScharrdate;
      }
      if (ValueFvSchdephour.length > 0) {
          QueryStringPart2 = QueryStringPart2+"&dephr="+ValueFvSchdephour;
      } else if (ValueFvScharrhour.length > 0) {
          QueryStringPart2 = QueryStringPart2+"&arrhr="+ValueFvScharrhour;
      }
      
    //alert(QueryStringFirstPart+QueryStringPart2+QueryStringLastPart);
      document.write(QueryStringFirstPart+QueryStringPart2+QueryStringLastPart);
   }
 } else if (ValueReqFvProd == xl11lllll1lllll) {
  ValueFvArticleID = getVarValuesByName (varName_fv_req_article);
  ShowFlightArticle(ValueFvArticleID);
 } else if (ValueReqFvProd == UserReqOnTimeStat) {
  ValueRequestYear = getVarValuesByName (varName_fv_year);
  QueryStringPart2 = "fv_ontime_stat?"; 
  QueryStringPart2 = QueryStringPart2+"year="+ValueRequestYear;
  document.write(QueryStringFirstPart+QueryStringPart2+QueryStringLastPart);
 } else if (ValueReqFvProd == UserReqShowCustomFv) {
   ShowFvCustomize();
 } else if (ValueReqFvProd == UserReqTellFriend) {
   ShowTellFriend();
 } else if (ValueReqFvProd == UserReqAirlineLinks) {
   ShowAirlineLinks();
 } else {
 }

 xlll11ll111lll1 (varName_fv_sch_flnumber, ""); //setVarValuesByName (varName_fv_sch_flnumber, "");
 xlll11ll111lll1 (varName_fv_sch_airline, ""); //setVarValuesByName (varName_fv_sch_airline, "");
 xlll11ll111lll1 (varName_fv_sch_depdate, ""); //setVarValuesByName (varName_fv_sch_depdate, "");
 xlll11ll111lll1 (varName_fv_sch_arrdate, ""); //setVarValuesByName (varName_fv_sch_arrdate, "");
 xlll11ll111lll1 (varName_fv_sch_depap, ""); //setVarValuesByName (varName_fv_sch_depap, "");
 xlll11ll111lll1 (varName_fv_sch_arrap, ""); //setVarValuesByName (varName_fv_sch_arrap, "");
 xlll11ll111lll1 (varName_fv_sch_dephr, ""); //setVarValuesByName (varName_fv_sch_dephr, "");
 xlll11ll111lll1 (varName_fv_sch_arrhr, ""); //setVarValuesByName (varName_fv_sch_arrhr, "");

}

function xll1l1lllllllll(TheAirport) //function GoToAirportClick(TheAirport)
{
 xlll11ll111lll1 (xl1ll11lll11lll, TheAirport); //setVarValuesByName (varName_fv_req_airport, TheAirport);
 xlll11ll111lll1 (varName_fv_req_prod, UserReqAirportStatus); //setVarValuesByName (varName_fv_req_prod, UserReqAirportStatus);

 FvLoadFlightPage();
}

function GoToAirportStatus(TheForm)
{
 xlll11ll111lll1 (xl1ll11lll11lll, TheForm.Airport.value); //setVarValuesByName (varName_fv_req_airport, FormFvAirportStatus.Airport.value);
 xlll11ll111lll1 (varName_fv_req_prod, UserReqAirportStatus); //setVarValuesByName (varName_fv_req_prod, UserReqAirportStatus);

 FvLoadFlightPage();
}

function fv_WriteAirportArea(TheSType, TheCoords, TheAirport)
{
  document.write("<area shape=\""+TheSType+"\" coords=\""+TheCoords+"\" alt=\""+TheAirport+"\" onmousedown=\"xll1l1lllllllll('"+TheAirport+"')\" href="+fv_def_fv_url+">"); //document.write("<area shape=\""+TheSType+"\" coords=\""+TheCoords+"\" alt=\""+TheAirport+"\" onmousedown=\"GoToAirportClick('"+TheAirport+"')\" href="+fv_def_fv_url+">");
}

function x111l11lll1l1ll()  // fv_AirportStatus
{
 ValueAirportStatus = getVarValuesByName (xl1ll11lll11lll); //ValueAirportStatus = getVarValuesByName (varName_fv_req_airport);
 ValueReqFvProd= getVarValuesByName (varName_fv_req_prod);

 if (ValueReqFvProd == -1 || ValueReqFvProd > UserReqAirportStatus) {
     return;
 }
 if (ValueAirportStatus == "") {
     ValueAirportStatus = "USENTIRE";
 }

 document.write("<br>");

 if (ValueAirportStatus.length > 3) {
     xlllll1111ll11l(fv_txt_airport[0], ""); //ShowMyFlightBoxTop
     document.write("<center><table cellspacing=0 cellpadding=5 border=0>");
     document.write("<tr><td>");
     if (ValueAirportStatus == "USENTIRE") {
        document.write("<img border=0 src='http://tracker.flightview.com/fvdelay/delaymap.asp?custId=Tinbu&mapId="+ValueAirportStatus+"' usemap=\"#mapUSEntire\">");
        document.write("<map name=\"mapUSEntire\">");
        fv_WriteAirportArea("rect", "15,48,39,61", "SEA");
        fv_WriteAirportArea("rect", "15,61,35,75", "PDX");
        fv_WriteAirportArea("rect", "16,100,31,115", "SMF");
        fv_WriteAirportArea("poly", "0,111,14,111,16,117,19,117,20,120,18,123,15,122,12,119,0,119", "SFO");
        fv_WriteAirportArea("poly", "5,124,5,132,18,132,18,127,25,123,24,120,20,121,17,123", "SJC");
        fv_WriteAirportArea("poly", "41,114,41,123,27,122,21,120,21,117,25,116,27,116", "OAK");
        fv_WriteAirportArea("poly", "21,134,38,135,37,140,43,141,42,144,40,146,36,144,21,144", "LAX");
        fv_WriteAirportArea("poly", "24,146,23,154,41,154,40,149,47,147,45,145,42,144,39,145", "SNA");
        fv_WriteAirportArea("poly", "45,134,44,139,43,142,42,144,46,146,48,143,61,143,62,135", "ONT");
        fv_WriteAirportArea("poly", "44,149,44,155,48,156,48,162,67,163,67,155,51,154,51,149", "SAN");
        fv_WriteAirportArea("rect", "49,117,65,132", "LAS");
        fv_WriteAirportArea("rect", "66,94,82,110", "SLC");
        fv_WriteAirportArea("rect", "70,137,93,150", "PHX");
        fv_WriteAirportArea("rect", "94,101,116,114", "DEN");
        fv_WriteAirportArea("rect", "146,105,168,116", "MCI");
        fv_WriteAirportArea("rect", "168,109,190,119", "STL");
        fv_WriteAirportArea("rect", "130,147,156,156", "DFW");
        fv_WriteAirportArea("poly", "136,184,151,184,152,177,147,176,147,172,144,170,142,170,141,175,137,177", "SAT");
        fv_WriteAirportArea("poly", "128,159,128,167,144,167,149,172,153,170,149,165,146,165,147,160", "AUS");
        fv_WriteAirportArea("poly", "153,158,153,166,156,166,158,172,163,171,163,167,168,167,168,158", "IAH");
        fv_WriteAirportArea("poly", "180,183,180,175,165,176,164,171,158,172,159,177,161,177,162,183", "HOU");
        fv_WriteAirportArea("rect", "179,158,194,173", "MSY");
        fv_WriteAirportArea("rect", "187,126,210,138", "BNA");
        fv_WriteAirportArea("rect", "207,181,230,188", "TPA");
        fv_WriteAirportArea("rect", "231,174,253,184", "MCO");
        fv_WriteAirportArea("poly", "211,203,210,194,227,194,232,191,235,195,230,198,229,202", "RSW");
        fv_WriteAirportArea("poly", "258,210,242,210,241,205,236,201,237,197,242,200,244,202,257,203", "MIA");
        fv_WriteAirportArea("poly", "259,201,245,201,241,199,236,196,240,194,244,195,258,194", "FLL");
        fv_WriteAirportArea("poly", "238,194,243,194,243,190,246,191,258,191,259,184,244,184,242,187,237,188", "PBI");
        fv_WriteAirportArea("poly", "214,142,214,149,220,149,218,157,235,157,234,149,223,148,221,143", "ATL");
        fv_WriteAirportArea("rect", "227,132,242,147", "CLT");
        fv_WriteAirportArea("poly", "205,120,205,112,212,112,213,105,219,105,220,112,223,113,223,120", "CVG");
        fv_WriteAirportArea("rect", "153,60,176,73", "MSP");
        fv_WriteAirportArea("poly", "179,103,179,94,196,94,197,92,202,90,205,94,201,97,200,103", "MDW");
        fv_WriteAirportArea("poly", "177,92,195,92,203,89,203,86,196,85,177,84", "ORD");
        fv_WriteAirportArea("poly", "180,73,180,81,196,81,196,85,203,86,203,80,198,79,198,74", "MKE");
        fv_WriteAirportArea("poly", "204,78,204,86,219,86,222,92,229,88,224,84,222,78", "DTW");
        fv_WriteAirportArea("poly", "249,84,233,84,231,90,226,95,230,99,235,97,236,93,250,93", "CLE");
        fv_WriteAirportArea("poly", "222,99,222,109,235,109,236,103,241,103,243,98,241,96,237,96,234,99", "PIT");
        fv_WriteAirportArea("poly", "240,107,253,107,260,112,263,107,258,105,257,99,245,98,241,101", "BWI");
        fv_WriteAirportArea("poly", "236,121,235,112,249,113,249,109,253,107,256,110,254,113,251,120", "IAD");
        fv_WriteAirportArea("poly", "276,121,257,122,258,116,254,113,255,111,260,112,261,113,275,114", "DCA");
        fv_WriteAirportArea("rect", "244,127,267,139", "RDU");
        fv_WriteAirportArea("poly", "262,100,267,101,269,104,284,104,285,112,269,112,268,107,265,107,262,106", "PHL");
        fv_WriteAirportArea("poly", "269,102,271,101,272,98,270,96,266,96,266,92,252,92,250,92,248,94,248,98,253,99,258,100,263,100,266,100", "EWR");
        fv_WriteAirportArea("poly", "274,102,272,101,271,98,274,96,277,97,281,95,293,96,294,103,279,103,278,101,276,101", "JFK");
        fv_WriteAirportArea("poly", "279,92,275,92,275,95,272,98,269,96,269,93,263,91,264,84,279,85", "LGA");
        fv_WriteAirportArea("rect", "284,80,307,90", "BOS");
        document.write("</map>");
     } else {
        document.write("<img src='http://tracker.flightview.com/fvdelay/delaymap.asp?custId=Tinbu&mapId="+ValueAirportStatus+"'>");
     }
     document.write("</td></tr></table></center>");
 } else {
     xlllll1111ll11l(ValueAirportStatus+"&nbsp;"+fv_txt_airport[2], ""); //ShowMyFlightBoxTop
     document.write("<center><table cellspacing=0 cellpadding=5 border=0>");
     document.write("<tr><td>");
     document.write("<img src='http://tracker.flightview.com/fvdelay/delaygraphic.asp?custId=Tinbu&graphicId=histogram&aptId="+ValueAirportStatus+"' alt=\"\"><img src='http://www.flightview.com/res/img/legend.gif'>");
   document.write("</td></tr></table></center>");
 }
 document.write("<center><form name=FormFvAirportStatus\">");
 document.write("<select class=FvInput name=Airport onChange=\"javascript:GoToAirportStatus(this.form)\">");
     document.write("<option selected value=\"\">"+fv_txt_search[9]+"</option>");
     document.write("<option value=\"USENTIRE\">Entire U.S.</option>");
     document.write("<option value=\"USNESEPTANT\">Northeast U.S.</option>");
     document.write("<option value=\"USNNESEPTANT\">Midwest U.S.</option>");
     document.write("<option value=\"USNSEPTANT\">Northern U.S.</option>");
     document.write("<option value=\"USNWSEPTANT\">Northwest U.S.</option>");
     document.write("<option value=\"USSESEPTANT\">Southeast U.S.</option>");
     document.write("<option value=\"USSSEPTANT\">South-Central U.S.</option>");
     document.write("<option value=\"USSWSEPTANT\">Southwest U.S.</option>");
     document.write("<option value=\"ALB\" >Albany, NY - ALB</option>");
     document.write("<option value=\"ABQ\" >Albuquerque, NM - ABQ</option>");
     document.write("<option value=\"ATL\" >Atlanta, GA - ATL</option>");
     document.write("<option value=\"AUS\" >Austin, TX - AUS</option>");
     document.write("<option value=\"BWI\" >Baltimore, MD - BWI</option>");
     document.write("<option value=\"BGR\" >Bangor, ME - BGR</option>");
     document.write("<option value=\"BTR\" >Baton Rouge, LA - BTR</option>");
     document.write("<option value=\"BIL\" >Billings, MT - BIL</option>");
     document.write("<option value=\"BHM\" >Birmingham, AL - BHM</option>");
     document.write("<option value=\"BIS\" >Bismarck, ND - BIS</option>");
     document.write("<option value=\"BOI\" >Boise, ID - BOI</option>");
     document.write("<option value=\"BOS\" >Boston, MA - BOS</option>");
     document.write("<option value=\"BZN\" >Bozeman, MT - BZN</option>");
     document.write("<option value=\"BUF\" >Buffalo, NY - BUF</option>");
     document.write("<option value=\"BUR\" >Burbank, CA - BUR</option>");
     document.write("<option value=\"BTV\" >Burlington, VT - BTV</option>");
     document.write("<option value=\"CPR\" >Casper, WY - CPR</option>");
     document.write("<option value=\"CID\" >Cedar Rapids, IA - CID</option>");
     document.write("<option value=\"CRW\" >Charleston, WV - CRW</option>");
     document.write("<option value=\"CHS\" >Charleston, SC - CHS</option>");
     document.write("<option value=\"CLT\" >Charlotte, NC - CLT</option>");
     document.write("<option value=\"MDW\" >Chicago, IL (Midway) - MDW</option>");
     document.write("<option value=\"ORD\" >Chicago, IL (O'Hare) - ORD</option>");
     document.write("<option value=\"CVG\" >Cincinnati, OH - CVG</option>");
     document.write("<option value=\"CLE\" >Cleveland, OH - CLE</option>");
     document.write("<option value=\"COS\" >Colorado Springs, CO - COS</option>");
     document.write("<option value=\"CMH\" >Columbus, OH - CMH</option>");
     document.write("<option value=\"DAL\" >Dallas, TX (Love Field) - DAL</option>");
     document.write("<option value=\"DFW\" >Dallas, TX (Dallas/Fort Worth) - DFW</option>");
     document.write("<option value=\"DAY\" >Dayton, OH - DAY</option>");
     document.write("<option value=\"DEN\" >Denver, CO - DEN</option>");
     document.write("<option value=\"DSM\" >Des Moines, IA - DSM</option>");
     document.write("<option value=\"DTW\" >Detroit, MI - DTW</option>");
     document.write("<option value=\"ELP\" >El Paso, TX - ELP</option>");
     document.write("<option value=\"FAR\" >Fargo, ND - FAR</option>");
     document.write("<option value=\"FLL\" >Fort Lauderdale, FL - FLL</option>");
     document.write("<option value=\"RSW\" >Fort Myers, FL - RSW</option>");
     document.write("<option value=\"FWA\" >Fort Wayne, IN - FWA</option>");
     document.write("<option value=\"GJT\" >Grand Junction, CO - GJT</option>");
     document.write("<option value=\"GRR\" >Grand Rapids, MI - GRR</option>");
     document.write("<option value=\"GSO\" >Greensboro, NC - GSO</option>");
     document.write("<option value=\"GSP\" >Greenville, SC - GSP</option>");
     document.write("<option value=\"GPT\" >Gulfport, MS - GPT</option>");
     document.write("<option value=\"BDL\" >Hartford, CT - BDL</option>");
     document.write("<option value=\"HOU\" >Houston, TX (Hobby) - HOU</option>");
     document.write("<option value=\"IAH\" >Houston, TX (Intercontinental) - IAH</option>");
     document.write("<option value=\"IND\" >Indianapolis, IN - IND</option>");
     document.write("<option value=\"JAN\" >Jackson, MS - JAN</option>");
     document.write("<option value=\"JAC\" >Jackson Hole, WY - JAC</option>");
     document.write("<option value=\"JAX\" >Jacksonville, FL - JAX</option>");
     document.write("<option value=\"MCI\" >Kansas City, MO - MCI</option>");
     document.write("<option value=\"TYS\" >Knoxville, TN - TYS</option>");
     document.write("<option value=\"LAS\" >Las Vegas, NV - LAS</option>");
     document.write("<option value=\"LEX\" >Lexington, KY - LAS</option>");
     document.write("<option value=\"LNK\" >Lincoln, NE - LNK</option>");
     document.write("<option value=\"LIT\" >Little Rock, AR - LIT</option>");
     document.write("<option value=\"LGB\" >Long Beach, CA - LGB</option>");
     document.write("<option value=\"LAX\" >Los Angeles, CA - LAX</option>");
     document.write("<option value=\"SDF\" >Louisville, KY - SDF</option>");
     document.write("<option value=\"MSN\" >Madison, WI - MSN</option>");
     document.write("<option value=\"MHT\" >Manchester, NH - MHT</option>");
     document.write("<option value=\"MEM\" >Memphis, TN - MEM</option>");
     document.write("<option value=\"MIA\" >Miami, FL - MIA</option>");
     document.write("<option value=\"MKE\" >Milwaukee, WI - MKE</option>");
     document.write("<option value=\"MSP\" >Minneapolis, MN - MSP</option>");
     document.write("<option value=\"MOB\" >Mobile, AL - MOB</option>");
     document.write("<option value=\"MYR\" >Myrtle Beach, SC - MYR</option>");
     document.write("<option value=\"BNA\" >Nashville, TN - BNA</option>");
     document.write("<option value=\"MSY\" >New Orleans, LA - MSY</option>");
     document.write("<option value=\"JFK\" >New York, NY - JFK</option>");
     document.write("<option value=\"LGA\" >New York, NY (LaGuardia) - LGA</option>");
     document.write("<option value=\"EWR\" >Newark, NJ - EWR</option>");
     document.write("<option value=\"ORF\" >Norfolk, VA - ORF</option>");
     document.write("<option value=\"OAK\" >Oakland, CA - OAK</option>");
     document.write("<option value=\"OKC\" >Oklahoma City, OK - OKC</option>");
     document.write("<option value=\"OMA\" >Omaha, NE - OMA</option>");
     document.write("<option value=\"ONT\" >Ontario, CA - ONT</option>");
     document.write("<option value=\"SNA\" >Orange County, CA - SNA</option>");
     document.write("<option value=\"MCO\" >Orlando, FL - MCO</option>");
     document.write("<option value=\"PNS\" >Pensacola, FL - PNS</option>");
     document.write("<option value=\"PHL\" >Philadelphia, PA - PHL</option>");
     document.write("<option value=\"PHX\" >Phoenix, AZ - PHX</option>");
     document.write("<option value=\"PIT\" >Pittsburgh, PA - PIT</option>");
     document.write("<option value=\"PDX\" >Portland, OR - PDX</option>");
     document.write("<option value=\"PWM\" >Portland, ME - PWM</option>");
     document.write("<option value=\"PVD\" >Providence, RI - PVD</option>");
     document.write("<option value=\"RDU\" >Raleigh Durham, NC - RDU</option>");
     document.write("<option value=\"RAP\" >Rapid City, SD - RAP</option>");
     document.write("<option value=\"RNO\" >Reno, NV - RNO</option>");
     document.write("<option value=\"RIC\" >Richmond, VA - RIC</option>");
     document.write("<option value=\"ROC\" >Rochester, NY - ROC</option>");
     document.write("<option value=\"SMF\" >Sacramento, CA - SMF</option>");
     document.write("<option value=\"SLC\" >Salt Lake City, UT - SLC</option>");
     document.write("<option value=\"SAT\" >San Antonio, TX - SAT</option>");
     document.write("<option value=\"SAN\" >San Diego, CA - SAN</option>");
     document.write("<option value=\"SFO\" >San Francisco, CA - SFO</option>");
     document.write("<option value=\"SJC\" >San Jose, CA - SJC</option>");
     document.write("<option value=\"SAV\" >Savannah, GA - SAV</option>");
     document.write("<option value=\"SEA\" >Seattle, WA - SEA</option>");
     document.write("<option value=\"SHV\" >Shreveport, LA - SHV</option>");
     document.write("<option value=\"FSD\" >Sioux Falls, SD - FSD</option>");
     document.write("<option value=\"GEG\" >Spokane, WA - GEG</option>");
     document.write("<option value=\"STL\" >St. Louis, MO - STL</option>");
     document.write("<option value=\"SYR\" >Syracuse, NY - SYR</option>");
     document.write("<option value=\"TPA\" >Tampa, FL - TPA</option>");
     document.write("<option value=\"TUS\" >Tucson, AZ - TUS</option>");
     document.write("<option value=\"TUL\" >Tulsa, OK - TUL</option>");
     document.write("<option value=\"DCA\" >Washington, DC (National) - DCA</option>");
     document.write("<option value=\"IAD\" >Washington, DC (Dulles) - IAD</option>");
     document.write("<option value=\"PBI\" >West Palm Beach, FL - PBI</option>");
     document.write("<option value=\"ICT\" >Wichita, KS - ICT</option>");
 document.write("</select>");
 document.write("</form></center>");
 x1llll1111l111l(false); //ShowFlightBoxBottom
 xlll11ll111lll1 (varName_fv_req_prod, -1); //setVarValuesByName (varName_fv_req_prod, -1);
}

// fv_Bottom
function xl11ll11l11l111() // fv.html calls the function to display pages
{                                                                
 document.write("<br>");
 xlllll1111ll11l(fv_txt_set4[6], "- <a class=WxNav4 href=\"GoTo: Customize\" onClick=\"javascript:SetReqProduct(UserReqShowCustomFv);return false\">"+fv_txt_set1[4]+"</a>&nbsp;&nbsp;"); //ShowMyFlightBoxTop

 document.write("<center><table width=100% cellpadding=1 cellspacing=0 border=0>");
 document.write("<tr valign=TOP><td width=33%>");
 document.write("<input onClick=\"javascript:SetReqProduct(UserReqAirportStatus);return false\" onmouseover=\"this.className='FvMenuButton2';this.style.cursor='hand'\" onmouseout=\"this.className='FvMenuButton1'\" type=button class=FvMenuButton1 value='"+fv_txt_set7[4]+"'>");
 if (fv_def_site_fv_lang==0) {
  document.write("<input onClick=\"javascript:x1l1l1lllllll1l(xl11lllll1lllll,4.1);return false\" onmouseover=\"this.className='FvMenuButton2';this.style.cursor='hand'\" onmouseout=\"this.className='FvMenuButton1'\" type=button class=FvMenuButton1 value='"+fv_txt_set7[0]+"'>");
 }
 document.write("<input onClick=\"javascript:x1l1l1lllllll1l(xl11lllll1lllll,6.1);return false\" onmouseover=\"this.className='FvMenuButton2';this.style.cursor='hand'\" onmouseout=\"this.className='FvMenuButton1'\" type=button class=FvMenuButton1 value='"+fv_txt_set7[3]+"'>");
 if (fv_def_site_fv_lang==1) {
 document.write("<input onClick=\"javascript:x1l1l1lllllll1l(xl11lllll1lllll,8.1);return false\" onmouseover=\"this.className='FvMenuButton2';this.style.cursor='hand'\" onmouseout=\"this.className='FvMenuButton1'\" type=button class=FvMenuButton1 value='"+fv_txt_set7[2]+"'>");
 }
 document.write("</td><td width=33%>");
 document.write("<input onClick=\"javascript:ShowOnTimeStatByYear(0);return false\" onmouseover=\"this.className='FvMenuButton2';this.style.cursor='hand'\" onmouseout=\"this.className='FvMenuButton1'\" type=button class=FvMenuButton1 value='"+fv_txt_set7[5]+"'>");
 document.write("<input onClick=\"javascript:x1l1l1lllllll1l(xl11lllll1lllll,5.1);return false\" onmouseover=\"this.className='FvMenuButton2';this.style.cursor='hand'\" onmouseout=\"this.className='FvMenuButton1'\" type=button class=FvMenuButton1 value='"+fv_txt_set7[7]+"'>");
 if (fv_def_site_fv_lang==0) {
 document.write("<input onClick=\"javascript:x1l1l1lllllll1l(xl11lllll1lllll,8.1);return false\" onmouseover=\"this.className='FvMenuButton2';this.style.cursor='hand'\" onmouseout=\"this.className='FvMenuButton1'\" type=button class=FvMenuButton1 value='"+fv_txt_set7[2]+"'>");
 }
 document.write("</td><td width=33%>");
 document.write("<input onClick=\"javascript:SetReqProduct(UserReqAirlineLinks);return false\" onmouseover=\"this.className='FvMenuButton2';this.style.cursor='hand'\" onmouseout=\"this.className='FvMenuButton1'\" type=button class=FvMenuButton1 value='"+fv_txt_set7[6]+"'>");
 if (fv_def_site_fv_lang==0) {
  document.write("<input onClick=\"javascript:x1l1l1lllllll1l(xl11lllll1lllll,7.1);return false\" onmouseover=\"this.className='FvMenuButton2';this.style.cursor='hand'\" onmouseout=\"this.className='FvMenuButton1'\" type=button class=FvMenuButton1 value='"+fv_txt_set7[1]+"'>");
 }
 document.write("<input onClick=\"javascript:SetReqProduct(UserReqTellFriend);return false\" onmouseover=\"this.className='FvMenuButton2';this.style.cursor='hand'\" onmouseout=\"this.className='FvMenuButton1'\" type=button class=FvMenuButton1 value='"+fv_txt_set7[8]+"'>");
 document.write("</td></tr>");
 document.write("</table></center><br>");

 fv10101111l1(); 

 x1llll1111l111l(true); //ShowFlightBoxBottom
}

function SaveFlightSearch(TheForm)
{
  ValueFvSchFlnumber = TheForm.Flnumber.value; //store searched flight number
  ValueFvSchAirline = TheForm.Alcode.value.toUpperCase();
  ValueFvSchdepdate = TheForm.Depdate.value;
  if (ValueFvSchFlnumber.length < 1) {
      alert (fv_txt_warning[0]);
      return false;
  } else if (ValueFvSchAirline.length == "") {
      ValueFvSchAirline = TheForm.Airline.value;
      if (ValueFvSchAirline.length == "") {
          alert (fv_txt_warning[1]);
          return false;
      }
  }
  xlll11ll111lll1 (varName_fv_selected_al, ValueFvSchAirline);
  return true;
}
function SaveFlightSearchCity(TheForm)
{
  ValueFvSchdepap = TheForm.DepApCode.value.toUpperCase();
  ValueFvScharrap = TheForm.ArrApCode.value.toUpperCase();
  if (ValueFvSchdepap.length == "") {
     ValueFvSchdepap = TheForm.DepAirport.value;
     if (ValueFvSchdepap.length == "") {
         alert (fv_txt_warning[2]);
         return false;
     }
  }
  xlll11ll111lll1 (varName_fv_selected_ap1, ValueFvSchdepap);
  if (ValueFvScharrap.length == "") {
     ValueFvScharrap = TheForm.ArrAirport.value;
     if (ValueFvScharrap.length == "") {
         alert (fv_txt_warning[3]);
         return false;
     }
  }

  xlll11ll111lll1 (varName_fv_selected_ap2, ValueFvScharrap);
  if (TheForm.WhenArrDep[0].checked) {
     ValueFvSchdepdate = TheForm.Depdate.value;
     ValueFvSchdephour = TheForm.TimeOfDay.value;
     ValueFvScharrdate = "";
     ValueFvScharrhour = "";
  } else {
     ValueFvScharrdate = TheForm.Depdate.value;
     ValueFvScharrhour = TheForm.TimeOfDay.value;
     ValueFvSchdepdate = "";
     ValueFvSchdephour = "";
  }
  return true;
}
function x11lll1ll111111(FlightNo, Airline, DepDate, DepAp) //function FlightListSearch(FlightNo, Airline, DepDate, DepAp)
{
 xlll11ll111lll1 (varName_fv_req_prod, UserReqSearchFlight); //setVarValuesByName (varName_fv_req_prod, UserReqSearchFlight);
 xlll11ll111lll1 (varName_fv_sch_flnumber, FlightNo); //setVarValuesByName (varName_fv_sch_flnumber, FlightNo);
 xlll11ll111lll1 (varName_fv_sch_airline, Airline); //setVarValuesByName (varName_fv_sch_airline, Airline);
 xlll11ll111lll1 (varName_fv_sch_depdate, DepDate.replace(/\-/g,"")); //setVarValuesByName (varName_fv_sch_depdate, DepDate.replace(/\-/g,"")); /* Need to remove dashes */
 xlll11ll111lll1 (varName_fv_sch_depap, DepAp);

 FvLoadFlightPage();
}
function ShowOnTimeStatByYear(StatYear)
{
 xlll11ll111lll1 (varName_fv_req_prod, UserReqOnTimeStat); //setVarValuesByName (varName_fv_req_prod, UserReqOnTimeStat);
 xlll11ll111lll1 (varName_fv_year, StatYear); //setVarValuesByName (varName_fv_year, StatYear);
 FvLoadFlightPage();
}
function x1l1l1lllllll1l(ArticleType, ReqArticle)
{
 xlll11ll111lll1 (varName_fv_req_prod, ArticleType); //setVarValuesByName (varName_fv_req_prod, ArticleType);
 xlll11ll111lll1 (varName_fv_req_article, ReqArticle); //setVarValuesByName (varName_fv_req_article, ReqArticle);
 FvLoadFlightPage();
}
function SetReqProduct(ReqProduct)
{
 xlll11ll111lll1 (varName_fv_req_prod, ReqProduct); //setVarValuesByName (varName_fv_req_prod, ReqProduct);
 FvLoadFlightPage();
}
function SetReqSearch(ReqSearch)
{
 xlll11ll111lll1 (varName_fv_req_search, ReqSearch); //setVarValuesByName (varName_fv_req_search, ReqSearch);
 FvLoadFlightPage();
}
function GoToFlightSearch()
{
// STEP 3. save search flight into cookie (also save into cookie for the search request as flight product)
 xlll11ll111lll1 (varName_fv_req_prod, UserReqSearchFlight); //setVarValuesByName (varName_fv_req_prod, UserReqSearchFlight);
 xlll11ll111lll1 (varName_fv_sch_flnumber, ValueFvSchFlnumber); //setVarValuesByName (varName_fv_sch_flnumber, ValueFvSchFlnumber);
 xlll11ll111lll1 (varName_fv_sch_airline, ValueFvSchAirline); //setVarValuesByName (varName_fv_sch_airline, ValueFvSchAirline);
 xlll11ll111lll1 (varName_fv_sch_depdate, ValueFvSchdepdate); //setVarValuesByName (varName_fv_sch_depdate, ValueFvSchdepdate);

// STEP 4. will reload the page here
 FvLoadFlightPage();
}
function GoToFlightSearchCity()
{
 xlll11ll111lll1 (varName_fv_req_prod, UserReqSearchCity); //setVarValuesByName (varName_fv_req_prod, UserReqSearchCity);
 xlll11ll111lll1 (varName_fv_sch_depap, ValueFvSchdepap); //setVarValuesByName (varName_fv_sch_depap, ValueFvSchdepap);
 xlll11ll111lll1 (varName_fv_sch_arrap, ValueFvScharrap); //setVarValuesByName (varName_fv_sch_arrap, ValueFvScharrap);
 xlll11ll111lll1 (varName_fv_sch_depdate, ValueFvSchdepdate); //setVarValuesByName (varName_fv_sch_depdate, ValueFvSchdepdate);
 xlll11ll111lll1 (varName_fv_sch_arrdate, ValueFvScharrdate); //setVarValuesByName (varName_fv_sch_arrdate, ValueFvScharrdate);
 xlll11ll111lll1 (varName_fv_sch_dephr, ValueFvSchdephour); //setVarValuesByName (varName_fv_sch_dephr, ValueFvSchdephour);
 xlll11ll111lll1 (varName_fv_sch_arrhr, ValueFvScharrhour); //setVarValuesByName (varName_fv_sch_arrhr, ValueFvScharrhour);

 FvLoadFlightPage();
}
function DeleteUsersLocation(UserLoc)
{
 ReadSavedUserFlight();
 if (ValueCookieSavedFlightStr.indexOf(UserLoc)==-1) {
  return;
 }
 var IndexFv=0;
 ValueCookieSavedFlightStr = "";
 for (IndexFv=0;IndexFv<NumUserFlight;IndexFv++)
 {
  if (ValueSavedFlightArray[IndexFv] != UserLoc) {
   ValueCookieSavedFlightStr = ValueCookieSavedFlightStr+ValueSavedFlightArray[IndexFv]+";";
  } else {
    if (UserLoc == ValueDefaultFlight) {
        xlll11ll111lll1 (varName_fv_user_def_flight, ""); //setVarValuesByName (varName_fv_user_def_flight, "");
    }
  }
 }
 xlll11ll111lll1 (varName_fv_user_flight, ValueCookieSavedFlightStr); //setVarValuesByName (varName_fv_user_flight, ValueCookieSavedFlightStr);
}
function FvLocMoveUp(UpLocIndex)
{
 if (UpLocIndex == 0) {
  alert ("Could not move up the first location.");
  return;
 }

 ReadSavedUserFlight();
 var IndexFv=0;
 ValueCookieSavedFlightStr = "";
 for (IndexFv=0;IndexFv<NumUserFlight;IndexFv++)
 {
  if (IndexFv == UpLocIndex-1) {
   ValueCookieSavedFlightStr = ValueCookieSavedFlightStr+ValueSavedFlightArray[UpLocIndex]+";";
  } else if (IndexFv == UpLocIndex) {
   ValueCookieSavedFlightStr = ValueCookieSavedFlightStr+ValueSavedFlightArray[UpLocIndex-1]+";";
  } else {
   ValueCookieSavedFlightStr = ValueCookieSavedFlightStr+ValueSavedFlightArray[IndexFv]+";";
  }
 }
 xlll11ll111lll1 (varName_fv_user_flight, ValueCookieSavedFlightStr); //setVarValuesByName (varName_fv_user_flight, ValueCookieSavedFlightStr);
 FvLoadFlightPage();
}
function FvLocMoveDown(DownLocIndex)
{
 ReadSavedUserFlight();
 if (DownLocIndex == NumUserFlight-1) {
  alert ("Could not move down the last location.");
  return;
 }
 var IndexFv=0;
 var IndexDownLoc=parseInt(DownLocIndex);
 ValueCookieSavedFlightStr = "";
 for (IndexFv=0;IndexFv<NumUserFlight;IndexFv++)
 {
  if (IndexFv == IndexDownLoc) {
   ValueCookieSavedFlightStr = ValueCookieSavedFlightStr+ValueSavedFlightArray[IndexFv+1]+";";
  } else if (IndexFv == IndexDownLoc+1) {
   ValueCookieSavedFlightStr = ValueCookieSavedFlightStr+ValueSavedFlightArray[IndexFv-1]+";";
  } else {
   ValueCookieSavedFlightStr = ValueCookieSavedFlightStr+ValueSavedFlightArray[IndexFv]+";";
  }
 }
 xlll11ll111lll1 (varName_fv_user_flight, ValueCookieSavedFlightStr); //setVarValuesByName (varName_fv_user_flight, ValueCookieSavedFlightStr);
 FvLoadFlightPage();
}

function FvLocDelete(UserLoc)
{
  DeleteUsersLocation(UserLoc);
  FvLoadFlightPage();
}

function SaveAsDefaultFlight(UserFlight)
{
 fv1010101011(UserFlight);
 
 xlll11ll111lll1 (varName_fv_user_def_flight, UserFlight); //setVarValuesByName (varName_fv_user_def_flight, UserFlight);
 FvLoadFlightPage();
}

function fv1010101011(UserFlight)
{
 ReadSavedUserFlight();
 if (ValueCookieSavedFlightStr.indexOf(UserFlight)>=0) {
  return;
 }
 if (NumUserFlight<MaxUserFlight) {
     xlll11ll111lll1 (varName_fv_user_flight, ValueCookieSavedFlightStr+UserFlight+";"); //setVarValuesByName (varName_fv_user_flight, ValueCookieSavedFlightStr+UserFlight+";");
     fvl0OlO11O1O1(UserFlight);
 } else {
     alert ("You can save up to "+MaxUserLocations+" locations. Please delete an existing location to save new locations.");
     return;
 }
}
function ReadSavedUserFlight()
{
 ValueCookieSavedFlightStr = getVarValuesByName(varName_fv_user_flight);
 ValueSavedFlightArray = ValueCookieSavedFlightStr.split(";", MaxUserFlight);
 ValueDefSiteFlightArray = fv_def_site_fv_flight.split(";", MaxUserFlight);
 NumUserFlight = ValueSavedFlightArray.length-1;
 NumFvLocations = ValueDefSiteFlightArray.length;
}
function fvO01l1011O0(FvLocIndex)
{
 var IndexStr = FvLocIndex+1;
 document.write (IndexStr+". <a class=WxNav href=\"GoTo: Search\" onClick=\"javascript:fvl0OlO11O1O1('"+ValueDefSiteFlightArray[FvLocIndex]+"');return false\">"+ValueDefSiteFlightArray[FvLocIndex].substring(0,ValueDefSiteFlightArray[FvLocIndex].indexOf("["))+"</a><br>");
}
function fv10101111l1() // Show Saved Flight Searches
{
 ReadSavedUserFlight();
 var IndexFv=0;
 var IndexStr;

 document.write("<center><table width=100% cellspacing=0 cellpadding=0 border=0>");
 document.write("<tr><td class=WxBorder>");
 document.write("<table width=100% cellspacing=1 cellpadding=0 border=0>");
 document.write("<tr><td align=CENTER colspan=2 class=TdWxBlank>&nbsp;<b>");
 showTodaysDate();
 document.write("</b></td></tr>");
 document.write("<tr><td align=LEFT colspan=2 class=WxTitle>&nbsp;<b>"+fv_txt_set4[7]+"</b> <span class=WxUpdtTxt>("+fv_txt_set4[9]+")</span></td></tr>");

 while (ValueSavedFlightArray[IndexFv])
 {
  IndexStr = IndexFv+1;
  document.write("<tr valign=MIDDLE><td width=75% align=LEFT class=TdWx>&nbsp;");

  if (ValueDefaultFlight != "" && ValueSavedFlightArray[IndexFv].indexOf(ValueDefaultFlight) >= 0) {
   document.write (IndexStr+". <a class=WxNavBold href=\"GoTo: Search\" onClick=\"javascript:fvl0OlO11O1O1('"+ValueSavedFlightArray[IndexFv]+"');return false\">"+ValueSavedFlightArray[IndexFv].substring(0,ValueSavedFlightArray[IndexFv].indexOf("["))+"</a> - <b>"+fv_txt_set1[9]+"</b>");
  } else {
   document.write (IndexStr+". <a class=WxNav href=\"GoTo: Search\" onClick=\"javascript:fvl0OlO11O1O1('"+ValueSavedFlightArray[IndexFv]+"');return false\">"+ValueSavedFlightArray[IndexFv].substring(0,ValueSavedFlightArray[IndexFv].indexOf("["))+"</a>");
  }
  document.write("</td><td width=25% align=CENTER class=TdWx>");
  document.write ("<a onMouseover=\"javascript:return overlib('<div align=center class=hintdiv>"+fv_txt_set12[0]+"</div>',WIDTH,'170',BORDER,'0')\" onmouseout=\"return nd();\" class=WxNav href=\"GoTo: Up\" onClick=\"javascript:FvLocMoveUp('"+IndexFv+"');return false\"><img class=WxLocIcon border=0 src=\""+tinbu_fv_server+"/imgs_fv/imgs"+ValueColorSet+"/moveup.png\"></a>&nbsp;");
  document.write ("<a onMouseover=\"javascript:return overlib('<div align=center class=hintdiv>"+fv_txt_set12[1]+"</div>',WIDTH,'170',BORDER,'0')\" onmouseout=\"return nd();\" class=WxNav href=\"GoTo: Down\" onClick=\"javascript:FvLocMoveDown('"+IndexFv+"');return false;return false\"><img class=WxLocIcon border=0 src=\""+tinbu_fv_server+"/imgs_fv/imgs"+ValueColorSet+"/movedown.png\"></a>&nbsp;");
  document.write ("<a onMouseover=\"javascript:return overlib('<div align=center class=hintdiv>"+fv_txt_set12[2]+"</div>',WIDTH,'170',BORDER,'0')\" onmouseout=\"return nd();\" class=WxNav href=\"GoTo: Delete\" onClick=\"javascript:FvLocDelete('"+ValueSavedFlightArray[IndexFv]+"');return false\"><img class=WxLocIcon border=0 src=\""+tinbu_fv_server+"/imgs_fv/imgs"+ValueColorSet+"/delete.png\"></a>&nbsp;");
  document.write ("<a onMouseover=\"javascript:return overlib('<div align=center class=hintdiv>"+fv_txt_set12[3]+"</div>',WIDTH,'170',BORDER,'0')\" onmouseout=\"return nd();\" class=WxNav href=\"GoTo: Default\" onClick=\"javascript:SaveAsDefaultFlight('"+ValueSavedFlightArray[IndexFv]+"');return false\"><img class=WxLocIcon src=\""+tinbu_fv_server+"/imgs_fv/imgs"+ValueColorSet+"/favorite.png\"></a>");
  document.write("</td></tr>");
  IndexFv++;
 }

 document.write("<tr><td align=left colspan=2 class=WxTitle>&nbsp;<b>"+fv_txt_other[2]+"</b> <span class=WxUpdtTxt> &nbsp; ");
 ValueShowFvLoc = getVarValuesByName (varName_fv_show_fv);
 var ShowFvLoc = false;
 if (ValueShowFvLoc == "" || ValueShowFvLoc == 1) {
  document.write("[<a class=WxNav href=\"GoTo: Flight\" onClick=\"javascript:fv0lO1O01O1O1(0);return false\">"+fv_txt_other[1]+"</a>]");
  ShowFvLoc = true;
 } else {
  document.write("[<a class=WxNav href=\"GoTo: Flight\" onClick=\"javascript:fv0lO1O01O1O1(1);return false\">"+fv_txt_other[0]+"</a>]");
 }
 document.write("</span></td></tr>");
 if (ShowFvLoc) {
  document.write("<tr><td align=center class=TdWx colspan=2><table cellpadding=3 border=0 width=100%><tr valign=top align=left><td class=TdWx width=50%>");
  if (NumFvLocations > 10) {
   for (IndexFv = 0; IndexFv < 10; IndexFv++)
   {
    fvO01l1011O0(IndexFv);
   }
   document.write("</td><td class=TdWx width=50%>");
   for (IndexFv = 10; IndexFv < NumFvLocations; IndexFv++)
   {
    fvO01l1011O0(IndexFv);
   }
  } else {
   for (IndexFv = 0; IndexFv < NumFvLocations; IndexFv++)
   {
    fvO01l1011O0(IndexFv);
   }
   document.write("</td><td class=TdWx width=50%>&nbsp;");
  }
  document.write("</td></tr></table></td></tr>");
 }
 document.write("</table>");
 document.write("</td></tr>");
 document.write("</table></center>");
}
function SetUserQuery(FvQuery) // ShowSavedQuery
{
  var DateObj = new Date(); 
  var today_year = DateObj.getFullYear();
  var today_month = DateObj.getMonth()+1;
  var today_date = DateObj.getDate();
  var IndexFv=0;
  FvQuery = FvQuery.substring(FvQuery.indexOf("[")+1,FvQuery.indexOf("]"));
  ValueSearchFlightArray = FvQuery.split(":", MaxUserFlight);

  if (today_month < 10) {
   today_month="0"+today_month;
  }
  if (today_date < 10) {
   today_date="0"+today_date;
  }

  /* Values are set in fv_find_flight.cpp */
  if (ValueSearchFlightArray[IndexFv] == "0") {
      xlll11ll111lll1 (varName_fv_req_prod, UserReqSearchFlight); //setVarValuesByName (varName_fv_req_prod, UserReqSearchFlight);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_airline, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_airline, ValueSearchFlightArray[IndexFv]);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_flnumber, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_flnumber, ValueSearchFlightArray[IndexFv]);
      IndexFv++;
      if (IndexFv < ValueSearchFlightArray.length) {
         xlll11ll111lll1 (varName_fv_sch_depap, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_depap, ValueSearchFlightArray[IndexFv]);
      }
      xlll11ll111lll1 (varName_fv_sch_depdate, ""+today_year+today_month+today_date+""); //setVarValuesByName (varName_fv_sch_depdate, ""+today_year+today_month+today_date+"");
  } else if (ValueSearchFlightArray[IndexFv] == "1") {
      xlll11ll111lll1 (varName_fv_req_prod, UserReqSearchCity); //setVarValuesByName (varName_fv_req_prod, UserReqSearchCity);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_depap, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_depap, ValueSearchFlightArray[IndexFv]);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_arrap, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_arrap, ValueSearchFlightArray[IndexFv]);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_dephr, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_dephr, ValueSearchFlightArray[IndexFv]);
      xlll11ll111lll1 (varName_fv_sch_depdate, ""+today_year+today_month+today_date+""); //setVarValuesByName (varName_fv_sch_depdate, ""+today_year+today_month+today_date+"");
  } else if (ValueSearchFlightArray[IndexFv] == "2") {
      xlll11ll111lll1 (varName_fv_req_prod, UserReqSearchCity); //setVarValuesByName (varName_fv_req_prod, UserReqSearchCity);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_depap, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_depap, ValueSearchFlightArray[IndexFv]);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_arrap, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_arrap, ValueSearchFlightArray[IndexFv]);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_arrhr, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_arrhr, ValueSearchFlightArray[IndexFv]);
      xlll11ll111lll1 (varName_fv_sch_arrdate, ""+today_year+today_month+today_date+""); //setVarValuesByName (varName_fv_sch_arrdate, ""+today_year+today_month+today_date+"");
  } else if (ValueSearchFlightArray[IndexFv] == "3") {
      xlll11ll111lll1 (varName_fv_req_prod, UserReqSearchCity); //setVarValuesByName (varName_fv_req_prod, UserReqSearchCity);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_depap, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_depap, ValueSearchFlightArray[IndexFv]);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_arrap, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_arrap, ValueSearchFlightArray[IndexFv]);
      xlll11ll111lll1 (varName_fv_sch_depdate, ""+today_year+today_month+today_date+""); //setVarValuesByName (varName_fv_sch_depdate, ""+today_year+today_month+today_date+"");
  } else if (ValueSearchFlightArray[IndexFv] == "4") {
      xlll11ll111lll1 (varName_fv_req_prod, UserReqSearchCity); //setVarValuesByName (varName_fv_req_prod, UserReqSearchCity);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_depap, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_depap, ValueSearchFlightArray[IndexFv]);
      IndexFv++;
      xlll11ll111lll1 (varName_fv_sch_arrap, ValueSearchFlightArray[IndexFv]); //setVarValuesByName (varName_fv_sch_arrap, ValueSearchFlightArray[IndexFv]);
      xlll11ll111lll1 (varName_fv_sch_arrdate, ""+today_year+today_month+today_date+""); //setVarValuesByName (varName_fv_sch_arrdate, ""+today_year+today_month+today_date+"");
  } else {
    return;
  }
}
function fvl0OlO11O1O1(FvQuery) // ShowSavedQuery
{
  SetUserQuery(FvQuery);
  FvLoadFlightPage();
}
function ShowFvCustomize()
{
document.write("<form name=FormFvCustom action=\"javascript:CompleteFvCustomization(this)\" onsubmit=\"return SaveFvCustomization(this)\">");
xlllll1111ll11l(fv_txt_set1[4], ""); //ShowMyFlightBoxTop
document.write("<table width=100% cellspacing=1 cellpadding=0 border=0>");
document.write("<tr valign=TOP><td colspan=2 align=CENTER class=TdWx><br>");
document.write("<center><table width=95% cellspacing=0 cellpadding=1 border=0>");
document.write("<tr align=LEFT><td colspan=5 class=TdWx2 bgcolor=D4D4D4>&nbsp;<b>"+fv_txt_pref[0]+"</b></td></tr>");
document.write("<tr valign=MIDDLE align=CENTER><td height=60 width=20%><div style=\"width:17px;height:17px;background:#A3B6E4\"></div><input CHECKED type=RADIO name=fvclr value=\"01\"></td>");
document.write("<td width=20%><div style=\"width:17px;height:17px;background:#DBC1B4\"></div><input type=RADIO name=fvclr value=\"02\"></td>");
document.write("<td width=20%><div style=\"width:17px;height:17px;background:#F6E29E\"></div><input type=RADIO name=fvclr value=\"03\"></td>");
document.write("<td width=20%><div style=\"width:17px;height:17px;background:#F6C39E\"></div><input type=RADIO name=fvclr value=\"04\"></td>");
document.write("<td width=20%><div style=\"width:17px;height:17px;background:#D0CFCF\"></div><input type=RADIO name=fvclr value=\"05\"></td></tr>");
document.write("<tr valign=MIDDLE align=CENTER><td height=60><div style=\"width:17px;height:17px;background:#FFD2E4\"></div><input type=RADIO name=fvclr value=\"06\"></td>");
document.write("<td><div style=\"width:17px;height:17px;background:#E5A6A6\"></div><input type=RADIO name=fvclr value=\"07\"></td>");
document.write("<td><div style=\"width:17px;height:17px;background:#BBE3B9\"></div><input type=RADIO name=fvclr value=\"08\"></td>");
document.write("<td><div style=\"width:17px;height:17px;background:#AB9CE7\"></div><input type=RADIO name=fvclr value=\"09\"></td>");
document.write("<td><div style=\"width:17px;height:17px;background:#C7A6C7\"></div><input type=RADIO name=fvclr value=\"10\"></td></tr>");
document.write("<tr align=LEFT><td colspan=5 class=TdWx2 bgcolor=D4D4D4>&nbsp;<b>"+fv_txt_pref[1]+"</b></td></tr>");
document.write("<tr align=LEFT><td colspan=5 class=TdWx>");
document.write("<tr><td colspan=5 align=left>");
document.write("<select class=FvInput name=Airline>");
writeAirline();
document.write("</select>");
document.write("<br>&nbsp;</td></tr>");
document.write("<tr align=LEFT><td colspan=5 class=TdWx2 bgcolor=D4D4D4>&nbsp;<b>"+fv_txt_pref[2]+"</b></td></tr>");
document.write("<tr align=LEFT><td colspan=5 class=TdWx>");
document.write("<select onChange=\"javascript:SaveSelectedAp(this,0)\" class=FvInput name=Airport>");
writeAirport(0);
document.write("<br>&nbsp;</td></tr>");
document.write("<tr align=LEFT><td colspan=5 class=TdWx>");
document.write("<center><input style=\"width:80px\" type=submit value=\""+fv_txt_set12[5]+"\" name=Submit></center>");
document.write("</td></tr>");
document.write("</table></center>");
document.write("</td></tr>");
document.write("</table>");
x1llll1111l111l(false); //ShowFlightBoxBottom
document.write("</form>");
}
function SaveSelectedAirline(AirlineSel)
{
    xlll11ll111lll1 (varName_fv_selected_al, AirlineSel.value);
}
function SaveSelectedAp(ApSel, ApIndex)
{
    if (ApIndex == 0) {
        xlll11ll111lll1 (varName_fv_selected_ap0, ApSel.value);
    } else if (ApIndex == 1) {
        xlll11ll111lll1 (varName_fv_selected_ap1, ApSel.value);
    } else if (ApIndex == 2) {
        xlll11ll111lll1 (varName_fv_selected_ap2, ApSel.value);
    }
}
function CompleteFvCustomization(CustomForm)
{
  FvLoadFlightPage();
}
function SaveFvCustomization(CustomForm)
{
 var RadioIndex;
 for (RadioIndex=0;RadioIndex<CustomForm.fvclr.length;RadioIndex++)
 {
  if (CustomForm.fvclr[RadioIndex].checked) {
   ValueColorSet = CustomForm.fvclr[RadioIndex].value;
   break;
  }
 }
 xlll11ll111lll1 (varName_fv_user_color, ValueColorSet); //setVarValuesByName (varName_fv_user_color, ValueColorSet);
 xlll11ll111lll1 (varName_fv_user_airline, CustomForm.Airline.value); //setVarValuesByName (varName_fv_user_airline, CustomForm.Airline.value);
 xlll11ll111lll1 (varName_fv_user_airport, CustomForm.Airport.value); //setVarValuesByName (varName_fv_user_airport, CustomForm.Airport.value);
 xlll11ll111lll1 (varName_fv_req_prod, UserReqSearchFlight); //setVarValuesByName (varName_fv_req_prod, UserReqSearchFlight);
}
function fv0lO1O01O1O1(ShowHideSiteLoc) // Show Hide Site Locations
{
 xlll11ll111lll1 (varName_fv_show_fv, ShowHideSiteLoc); //setVarValuesByName (varName_fv_show_fv, ShowHideSiteLoc);
 FvLoadFlightPage();
}
function ShowStatistics()
{
    xlllll1111ll11l(fv_txt_set7[5], ""); //ShowMyFlightBoxTop
       document.write("<p>Statistics </p>");
    x1llll1111l111l(false); //ShowFlightBoxBottom
}

function ShowAirlineLinks()
{
 document.write("<script language=javascript src='"+tinbu_fv_server+"/js/articles/airline_links.js'></script>");
}

function ShowTellFriend()
{
 xlllll1111ll11l(fv_txt_set7[8], ""); //ShowMyFlightBoxTop
 document.write("<form name=FORM1 method=\"POST\" action=\"http://www.lottostrategies.com/script/feed_flight_tellfriend\">");
 document.write("<center><img src=\""+tinbu_fv_server+"/imgs_fv/airplane.jpg\"></center><br>");
 document.write("<center><table width=400 border=0 cellspacing=1 cellpadding=1>");
 document.write("<tr><td class=TdWx>&nbsp;<b>"+fv_email_list[0]+"</b></td></tr>");
 document.write("<tr><td class=TdWx>");
 document.write("<table border=0 cellpadding=2 cellspacing=1 width=100%%>");
 document.write("<tr><td class=TdWx width=50%%>"+fv_email_list[1]+" (1)</td>");
 document.write("<td class=TdWx width=59%%><input type=TEXT size=25 maxlength=40 name=fmail1 value=\"\" class=FvInput></td></tr>");
 document.write("<tr><td class=TdWx width=50%%>"+fv_email_list[1]+" (2)</td>");
 document.write("<td class=TdWx width=59%%><input type=TEXT size=25 maxlength=40 name=fmail2 value=\"\" class=FvInput></td></tr>");
 document.write("<tr><td class=TdWx width=50%%>"+fv_email_list[1]+" (3)</td>");
 document.write("<td class=TdWx width=59%%><input type=TEXT size=25 maxlength=40 name=fmail3 value=\"\" class=FvInput></td></tr>");
 document.write("<tr><td class=TdWx>"+fv_email_list[2]+"</td>");
 document.write("<td class=TdWx><input type=TEXT size=25 maxlength=40 name=myname value=\"\" class=FvInput></td></tr>");
 document.write("<tr><td class=TdWx>"+fv_email_list[3]+"</td>");
 document.write("<td class=TdWx><input type=TEXT size=25 maxlength=40 name=mymail value=\"\" class=FvInput></td></tr>");
 document.write("<tr><td align=CENTER class=TdWx colspan=2>");
 document.write("<input type=SUBMIT value=\""+fv_email_list[4]+"\" name=btn class=FvInput>&nbsp; &nbsp;");
 document.write("<input type=RESET value=\""+fv_email_list[5]+"\" name=btn class=FvInput><div align=left>");
 document.write(fv_email_list[7]);
 document.write("</div></td></tr></table></td></tr></table></center>");
 document.write("</form>");

 x1llll1111l111l(false); //ShowFlightBoxBottom
}

function writeHours()
{
    document.write("<option selected value=\"\">Time is?</option>");
    document.write("<option value=\"06\" >6:00 AM</option>");
    document.write("<option value=\"07\" >7:00 AM</option>");
    document.write("<option value=\"08\" >8:00 AM</option>");
    document.write("<option value=\"09\" >9:00 AM</option>");
    document.write("<option value=\"10\" >10:00 AM</option>");
    document.write("<option value=\"11\" >11:00 AM</option>");
    document.write("<option value=\"12\" >12:00 PM</option>");
    document.write("<option value=\"13\" >1:00 PM</option>");
    document.write("<option value=\"14\" >2:00 PM</option>");
    document.write("<option value=\"15\" >3:00 PM</option>");
    document.write("<option value=\"16\" >4:00 PM</option>");
    document.write("<option value=\"17\" >5:00 PM</option>");
    document.write("<option value=\"18\" >6:00 PM</option>");
    document.write("<option value=\"19\" >7:00 PM</option>");
    document.write("<option value=\"20\" >8:00 PM</option>");
    document.write("<option value=\"21\" >9:00 PM</option>");
    document.write("<option value=\"22\" >10:00 PM</option>");
    document.write("<option value=\"23\" >11:00 PM</option>");
    document.write("<option value=\"00\" >12:00 AM</option>");
    document.write("<option value=\"01\" >1:00 AM</option>");
    document.write("<option value=\"02\" >2:00 AM</option>");
    document.write("<option value=\"03\" >3:00 AM</option>");
    document.write("<option value=\"04\" >4:00 AM</option>");
    document.write("<option value=\"05\" >5:00 AM</option>");
    document.write("</select>");
}
function writeSingleAirport(AirportValue, AirportString)
{
   var ThisAirportID = "";
   if (ValueFvCurrApIndex == 0) {
       ThisAirportID = getVarValuesByName (varName_fv_selected_ap0);
   } else if (ValueFvCurrApIndex == 1) {
       ThisAirportID = getVarValuesByName (varName_fv_selected_ap1);
   } else if (ValueFvCurrApIndex == 2) {
       ThisAirportID = getVarValuesByName (varName_fv_selected_ap2);
   }

   if (ThisAirportID == "") {
     ThisAirportID = ValueDefaultAirport;
   }

   if (AirportValue == ThisAirportID) {
     document.write("<option selected value="+AirportValue+">"+AirportString+"</option>");
   } else {
     document.write("<option value="+AirportValue+">"+AirportString+"</option>");
   }
}
function writeAirport(ApIndex)
{
     ValueFvCurrApIndex = ApIndex;
     writeSingleAirport("", fv_txt_search[1]);
     writeSingleAirport("ACA", "Acapulco, Mexico - ACA");
     writeSingleAirport("CAK", "Akron-Canton, OH - CAK");
     writeSingleAirport("ALB", "Albany, NY - ALB");
     writeSingleAirport("ABQ", "Albuquerque, NM - ABQ");
     writeSingleAirport("AMA", "Amarillo, TX - AMA");
     writeSingleAirport("ANC", "Anchorage, AK - ANC");
     writeSingleAirport("ATL", "Atlanta, GA - ATL");
     writeSingleAirport("ACY", "Atlantic City, NJ - ACY");
     writeSingleAirport("AUS", "Austin, TX - AUS");
     writeSingleAirport("BWI", "Baltimore, MD - BWI");
     writeSingleAirport("BGR", "Bangor, ME - BGR");
     writeSingleAirport("BTR", "Baton Rouge, LA - BTR");
     writeSingleAirport("BIL", "Billings, MT - BIL");
     writeSingleAirport("BHM", "Birmingham, AL - BHM");
     writeSingleAirport("BIS", "Bismarck, ND - BIS");
     writeSingleAirport("BOI", "Boise, ID - BOI");
     writeSingleAirport("BOS", "Boston, MA - BOS");
     writeSingleAirport("BZN", "Bozeman, MT - BZN");
     writeSingleAirport("BUF", "Buffalo, NY - BUF");
     writeSingleAirport("BUR", "Burbank, CA - BUR");
     writeSingleAirport("BTV", "Burlington, VT - BTV");
     writeSingleAirport("YYC", "Calgary, AB - YYC");
     writeSingleAirport("CUN", "Cancun, Mexico (International) - CUN");
     writeSingleAirport("CPR", "Casper, WY - CPR");
     writeSingleAirport("CID", "Cedar Rapids, IA - CID");
     writeSingleAirport("CRW", "Charleston, WV - CRW");
     writeSingleAirport("CHS", "Charleston, SC - CHS");
     writeSingleAirport("CLT", "Charlotte, NC - CLT");
     writeSingleAirport("CHA", "Chattanooga, TN - CHA");
     writeSingleAirport("ORD", "Chicago, IL (O'Hare) - ORD");
     writeSingleAirport("MDW", "Chicago, IL (Midway) - MDW");
     writeSingleAirport("CVG", "Cincinnati, OH - CVG");
     writeSingleAirport("CLE", "Cleveland, OH - CLE");
     writeSingleAirport("COS", "Colorado Springs, CO - COS");
     writeSingleAirport("CAE", "Columbia, SC - CAE");
     writeSingleAirport("CMH", "Columbus, OH - CMH");
     writeSingleAirport("CRP", "Corpus Christi, TX - CRP");
     writeSingleAirport("CZM", "Cozumel, Mexico - CZM");
     writeSingleAirport("DFW", "Dallas, TX (Dallas/Fort Worth) - DFW");
     writeSingleAirport("DAL", "Dallas, TX (Love Field) - DAL");
     writeSingleAirport("DAY", "Dayton, OH - DAY");
     writeSingleAirport("DEN", "Denver, CO - DEN");
     writeSingleAirport("DSM", "Des Moines, IA - DSM");
     writeSingleAirport("DTW", "Detroit, MI - DTW");
     writeSingleAirport("DIK", "Dickinson, ND - DIK");
     writeSingleAirport("DUB", "Dublin, Ireland - DUB");
     writeSingleAirport("DGO", "Durango, Mexico - DGO");
     writeSingleAirport("YEG", "Edmonton, AB - YEG");
     writeSingleAirport("ELP", "El Paso, TX - ELP");
     writeSingleAirport("FAR", "Fargo, ND - FAR");
     writeSingleAirport("FLL", "Fort Lauderdale, FL - FLL");
     writeSingleAirport("RSW", "Fort Myers, FL - RSW");
     writeSingleAirport("FWA", "Fort Wayne, IN - FWA");
     writeSingleAirport("FRA", "Frankfurt, Germany - FRA");
     writeSingleAirport("FAT", "Fresno, CA - FAT");
     writeSingleAirport("FNL", "Ft. Collins/Loveland, CO - FNL");
     writeSingleAirport("YQX", "Gander, NF - YQX");
     writeSingleAirport("GJT", "Grand Junction, CO - GJT");
     writeSingleAirport("GRR", "Grand Rapids, MI - GRR");
     writeSingleAirport("GSO", "Greensboro, NC - GSO");
     writeSingleAirport("GSP", "Greenville, SC - GSP");
     writeSingleAirport("GDL", "Guadalajara, Mexico - GDL");
     writeSingleAirport("GPT", "Gulfport, MS - GPT");
     writeSingleAirport("YHZ", "Halifax, NS - YHZ");
     writeSingleAirport("YHM", "Hamilton, ON - YHM");
     writeSingleAirport("HRL", "Harlingen/S Padre Island, TX - HRL");
     writeSingleAirport("MDT", "Harrisburg, PA - MDT");
     writeSingleAirport("BDL", "Hartford, CT - BDL");
     writeSingleAirport("ITO", "Hilo, HI - ITO");
     writeSingleAirport("HNL", "Honolulu, HI - HNL");
     writeSingleAirport("HOU", "Houston, TX (Hobby) - HOU");
     writeSingleAirport("IAH", "Houston, TX (Intercontinental) - IAH");
     writeSingleAirport("HSV", "Huntsville, AL - HSV");
     writeSingleAirport("IND", "Indianapolis, IN - IND");
     writeSingleAirport("ISP", "Islip, NY - ISP");
     writeSingleAirport("JAN", "Jackson, MS - JAN");
     writeSingleAirport("JAC", "Jackson Hole, WY - JAC");
     writeSingleAirport("JAX", "Jacksonville, FL - JAX");
     writeSingleAirport("OGG", "Kahului, Maui, HI - OGG");
     writeSingleAirport("KOA", "Kailua-Kona, HI - KOA");
     writeSingleAirport("MCI", "Kansas City, MO - MCI");
     writeSingleAirport("YLW", "Kelowna, BC - YLW");
     writeSingleAirport("TYS", "Knoxville, TN - TYS");
     writeSingleAirport("TVL", "Lake Tahoe, NV - TVL");
     writeSingleAirport("LAN", "Lansing, MI - LAN");
     writeSingleAirport("LAS", "Las Vegas, NV - LAS");
     writeSingleAirport("LEX", "Lexington, KY - LEX");
     writeSingleAirport("LIH", "Lihue, Kauai, HI - LIH");
     writeSingleAirport("LNK", "Lincoln, NE - LNK");
     writeSingleAirport("LIT", "Little Rock, AR - LIT");
     writeSingleAirport("LGW", "London, UK (Gatwick) - LGW");
     writeSingleAirport("YXU", "London, ON - YXU");
     writeSingleAirport("LHR", "London, UK (Heathrow) - LHR");
     writeSingleAirport("LGB", "Long Beach, CA - LGB");
     writeSingleAirport("LAX", "Los Angeles, CA - LAX");
     writeSingleAirport("SJD", "Los Cabos, Mexico - SJD");
     writeSingleAirport("SDF", "Louisville, KY - SDF");
     writeSingleAirport("LBB", "Lubbock, TX - LBB");
     writeSingleAirport("MSN", "Madison, WI - MSN");
     writeSingleAirport("MHT", "Manchester, NH - MHT");
     writeSingleAirport("MFE", "McAllen, TX - MFE");
     writeSingleAirport("MEM", "Memphis, TN - MEM");
     writeSingleAirport("MEX", "Mexico City - MEX");
     writeSingleAirport("MIA", "Miami, FL - MIA");
     writeSingleAirport("MAF", "Midland, TX - MAF");
     writeSingleAirport("MKE", "Milwaukee, WI - MKE");
     writeSingleAirport("MSP", "Minneapolis, MN - MSP");
     writeSingleAirport("CNY", "Moab, UT - CNY");
     writeSingleAirport("MOB", "Mobile, AL - MOB");
     writeSingleAirport("YQM", "Moncton, NB - YQM");
     writeSingleAirport("YUL", "Montreal, QC - YUL");
     writeSingleAirport("YMX", "Montreal/Mirabel, PQ - YMX");
     writeSingleAirport("MYR", "Myrtle Beach, SC - MYR");
     writeSingleAirport("BNA", "Nashville, TN - BNA");
     writeSingleAirport("MSY", "New Orleans, LA - MSY");
     writeSingleAirport("LGA", "New York, NY (LaGuardia) - LGA");
     writeSingleAirport("JFK", "New York, NY - JFK");
     writeSingleAirport("EWR", "Newark, NJ - EWR");
     writeSingleAirport("PHF", "Newport News/Williamsburg, VA - PHF");
     writeSingleAirport("ORF", "Norfolk, VA - ORF");
     writeSingleAirport("OAK", "Oakland, CA - OAK");
     writeSingleAirport("VPS", "Okaloosa County, FL - VPS");
     writeSingleAirport("OKC", "Oklahoma City, OK - OKC");
     writeSingleAirport("OMA", "Omaha, NE - OMA");
     writeSingleAirport("ONT", "Ontario, CA - ONT");
     writeSingleAirport("SNA", "Orange County, CA - SNA");
     writeSingleAirport("MCO", "Orlando, FL - MCO");
     writeSingleAirport("YOW", "Ottawa, ON - YOW");
     writeSingleAirport("CDG", "Paris, France (Charles DeGaulle) - CDG");
     writeSingleAirport("PNS", "Pensacola, FL - PNS");
     writeSingleAirport("PHL", "Philadelphia, PA - PHL");
     writeSingleAirport("PHX", "Phoenix, AZ - PHX");
     writeSingleAirport("PIT", "Pittsburgh, PA - PIT");
     writeSingleAirport("PDX", "Portland, OR - PDX");
     writeSingleAirport("PWM", "Portland, ME - PWM");
     writeSingleAirport("YXS", "Prince George, BC - YXS");
     writeSingleAirport("PVD", "Providence, RI - PVD");
     writeSingleAirport("PVR", "Puerto Vallarta, Mexico - PVR");
     writeSingleAirport("RDU", "Raleigh Durham, NC - RDU");
     writeSingleAirport("RAP", "Rapid City, SD - RAP");
     writeSingleAirport("YQR", "Regina, SK - YQR");
     writeSingleAirport("RNO", "Reno, NV - RNO");
     writeSingleAirport("RIC", "Richmond, VA - RIC");
     writeSingleAirport("ROC", "Rochester, NY - ROC");
     writeSingleAirport("SMF", "Sacramento, CA - SMF");
     writeSingleAirport("SLC", "Salt Lake City, UT - SLC");
     writeSingleAirport("SAT", "San Antonio, TX - SAT");
     writeSingleAirport("SAN", "San Diego, CA - SAN");
     writeSingleAirport("SFO", "San Francisco, CA - SFO");
     writeSingleAirport("SJC", "San Jose, CA - SJC");
     writeSingleAirport("SJD", "San Jose del Cabo, Mexico - SJD");
     writeSingleAirport("SJU", "San Juan, PR - SJU");
     writeSingleAirport("SRQ", "Sarasota, FL - SRQ");
     writeSingleAirport("YAM", "Sault Ste. Marie, ON - YAM");
     writeSingleAirport("SAV", "Savannah, GA - SAV");
     writeSingleAirport("SEA", "Seattle, WA - SEA");
     writeSingleAirport("SHV", "Shreveport, LA - SHV");
     writeSingleAirport("FSD", "Sioux Falls, SD - FSD");
     writeSingleAirport("YXL", "Sioux Lookout, ON - YXL");
     writeSingleAirport("GEG", "Spokane, WA - GEG");
     writeSingleAirport("YYT", "St Johns, NF - YYT");
     writeSingleAirport("STL", "St. Louis, MO - STL");
     writeSingleAirport("YSB", "Sudbury, ON - YSB");
     writeSingleAirport("SUN", "Sun Valley, ID - SUN");
     writeSingleAirport("SYR", "Syracuse, NY - SYR");
     writeSingleAirport("TPA", "Tampa, FL - TPA");
     writeSingleAirport("TAM", "Tampico, Mexico - TAM");
     writeSingleAirport("YQT", "Thunder Bay, ON - YQT");
     writeSingleAirport("YYZ", "Toronto, ON - YYZ");
     writeSingleAirport("YTZ", "Toronto, ON (City Centre) - YTZ");
     writeSingleAirport("TRI", "Tri-City, TN/VA (Tri-City) - TRI");
     writeSingleAirport("TUS", "Tucson, AZ - TUS");
     writeSingleAirport("TUL", "Tulsa, OK - TUL");
     writeSingleAirport("YVR", "Vancouver, BC - YVR");
     writeSingleAirport("VEL", "Vernal, UT - VEL");
     writeSingleAirport("YYJ", "Victoria, BC - YYJ");
     writeSingleAirport("DCA", "Washington, DC (National) - DCA");
     writeSingleAirport("IAD", "Washington, DC (Dulles) - IAD");
     writeSingleAirport("PBI", "West Palm Beach, FL - PBI");
     writeSingleAirport("HPN", "White Plains, NY - HPN");
     writeSingleAirport("ICT", "Wichita, KS - ICT");
     writeSingleAirport("ISN", "Williston, ND - ISN");
     writeSingleAirport("YWG", "Winnipeg, MB - YWG");
     writeSingleAirport("ORH", "Worcester, MA - ORH");
     document.write("</select>&nbsp;");
}
function showTodaysDate()
{
   var DateObj = new Date(); 
   var today_year = DateObj.getFullYear();
   var today_month = DateObj.getMonth()+1;
   var today_date = DateObj.getDate();
   var today_dow = DateObj.getDay();
   if (today_month < 10) {
    today_month="0"+today_month;
   }
   if (today_date < 10) {
    today_date="0"+today_date;
   }
   document.write(""+fv_txt_dow_short[today_dow]+", "+today_year+"-"+today_month+"-"+today_date+"");
   document.write("<span id=fv_clock>&nbsp;</span>");
}
function writeSingleAirline(AirlineValue, AirlineString)
{
   var ThisAirlineID = getVarValuesByName (varName_fv_selected_al);
   if (ThisAirlineID == "") {
     ThisAirlineID = ValueDefaultAirline;
   }

   if (AirlineValue == ThisAirlineID) {
     document.write("<option selected value="+AirlineValue+">"+AirlineString+"</option>");
   } else {
     document.write("<option value="+AirlineValue+">"+AirlineString+"</option>");
   }
}
function writeAirline()
{
     writeSingleAirline("", fv_txt_search[3]);
     writeSingleAirline("EI", "Aer Lingus - EI");
     writeSingleAirline("AM", "Aeromexico - AM");
     writeSingleAirline("9A", "Air Atlantic - 9A");
     writeSingleAirline("AC", "Air Canada - AC");
     writeSingleAirline("CA", "Air China - CA");
     writeSingleAirline("AF", "Air France - AF");
     writeSingleAirline("3H", "Air Inuit - 3H");
     writeSingleAirline("JM", "Air Jamaica - JM");
     writeSingleAirline("IJ", "Air Liberte - IJ");
     writeSingleAirline("NZ", "Air New Zealand - NZ");
     writeSingleAirline("FL", "Air Tran - FL");
     writeSingleAirline("TS", "Air Transat (Canada) - TS");
     writeSingleAirline("GB", "Airborne Express - GB");
     writeSingleAirline("AS", "Alaska Airlines - AS");
     writeSingleAirline("AZ", "Alitalia - AZ");
     writeSingleAirline("NH", "All Nippon Airways - NH");
     writeSingleAirline("G4", "Allegiant Air - G4");
     writeSingleAirline("AQ", "Aloha Airlines - AQ");
     writeSingleAirline("AA", "American Airlines - AA");
     writeSingleAirline("AV", "Avianca - AV");
     writeSingleAirline("UP", "Bahamasair - UP");
     writeSingleAirline("JV", "Bearskin Airlines - JV");
     writeSingleAirline("GQ", "Big Sky Airways - GQ");
     writeSingleAirline("BU", "Braathens - BU");
     writeSingleAirline("BA", "British Airways - BA");
     writeSingleAirline("BD", "British Midland - BD");
     writeSingleAirline("ED", "CCAir - ED");
     writeSingleAirline("C6", "CanJet - C6");
     writeSingleAirline("5T", "Canadian North - 5T");
     writeSingleAirline("CX", "Cathay Pacific - CX");
     writeSingleAirline("MU", "China Eastern Airlines - MU");
     writeSingleAirline("CZ", "China Southern Airlines - CZ");
     writeSingleAirline("CO", "Continental Airlines - CO");
     writeSingleAirline("DL", "Delta Air Lines - DL");
     writeSingleAirline("7H", "ERA Aviation - 7H");
     writeSingleAirline("BR", "EVA Airways - BR");
     writeSingleAirline("U2", "Easyjet - U2");
     writeSingleAirline("LY", "El Al Israel Airlines - LY");
     writeSingleAirline("E0", "Eos Airlines - E0");
     writeSingleAirline("XE", "ExpressJet Airlines - XE");
     writeSingleAirline("AY", "Finnair - AY");
     writeSingleAirline("7F", "First Air - 7F");
     writeSingleAirline("RF", "Florida West Airlines - RF");
     writeSingleAirline("F9", "Frontier Airlines - F9");
     writeSingleAirline("GA", "Garuda - GA");
     writeSingleAirline("HQ", "Harmony Airways - HQ");
     writeSingleAirline("HA", "Hawaiian Airlines - HA");
     writeSingleAirline("IB", "Iberia - IB");
     writeSingleAirline("FI", "Icelandair - FI");
     writeSingleAirline("IC", "Indian Airlines - IC");
     writeSingleAirline("IR", "Iran Air - IR");
     writeSingleAirline("JD", "Japan Air System - JD");
     writeSingleAirline("JL", "Japan Airlines - JL");
     writeSingleAirline("QJ", "Jet Airways - QJ");
     writeSingleAirline("B6", "JetBlue Airways - B6");
     writeSingleAirline("KL", "KLM Royal Dutch Airlines - KL");
     writeSingleAirline("KE", "Korean Air Lines - KE");
     writeSingleAirline("WJ", "Labrador Airways LTD - WJ");
     writeSingleAirline("LH", "Lufthansa - LH");
     writeSingleAirline("MY", "MAXjet - MY");
     writeSingleAirline("MH", "Malaysia Airlines - MH");
     writeSingleAirline("YV", "Mesa Airlines - YV");
     writeSingleAirline("MX", "Mexicana - MX");
     writeSingleAirline("GL", "Miami Air Intl. - GL");
     writeSingleAirline("YX", "Midwest Airlines - YX");
     writeSingleAirline("NW", "Northwest Airlines - NW");
     writeSingleAirline("OA", "Olympic Airways - OA");
     writeSingleAirline("KS", "Penair - KS");
     writeSingleAirline("PR", "Philippine Airlines - PR");
     writeSingleAirline("PO", "Polar Air - PO");
     writeSingleAirline("QF", "Qantas Airways - QF");
     writeSingleAirline("SN", "Sabena - SN");
     writeSingleAirline("S6", "Salmon Air - S6");
     writeSingleAirline("SV", "Saudi Arabian Airlines - SV");
     writeSingleAirline("SK", "Scandinavian Airlines (SAS) - SK");
     writeSingleAirline("YR", "Scenic Airlines - YR");
     writeSingleAirline("S5", "Shuttle America - S5");
     writeSingleAirline("SQ", "Singapore Airlines - SQ");
     writeSingleAirline("SX", "Skybus Airlines - SX");
     writeSingleAirline("5G", "Skyservice - 5G");
     writeSingleAirline("SA", "South African Airways - SA");
     writeSingleAirline("WN", "Southwest Airlines - WN");
     writeSingleAirline("JK", "Spanair - JK");
     writeSingleAirline("NK", "Spirit Airlines - NK");
     writeSingleAirline("SY", "Sun Country Airlines - SY");
     writeSingleAirline("LX", "Swiss Int'l Airllines - LX");
     writeSingleAirline("TG", "Thai Airways - TG");
     writeSingleAirport("TIJ", "Tijuana, Mexico - TIJ");
     writeSingleAirline("TK", "Turkish Airlines - TK");
     writeSingleAirline("US", "US Airways - US");
     writeSingleAirline("U5", "USA3000 - U5");
     writeSingleAirline("UA", "United Airlines - UA");
     writeSingleAirline("VP", "VASP - VP");
     writeSingleAirline("RG", "Varig - RG");
     writeSingleAirline("VX", "Virgin America - VX");
     writeSingleAirline("VS", "Virgin Atlantic - VS");
     writeSingleAirline("WS", "WestJet Airlines - WS");
     writeSingleAirline("MF", "Xiamen Airlines - MF");
     writeSingleAirline("Z4", "Zoom Airlines - Z4");
}
function addZero(Number)
{
  if (Number < 10) {
     return "0"+Number;
  } else {
     return Number;
  }
}

function x11ll1l1111111l()  // fv_SearchBar
{
ValueReqFvSearch= getVarValuesByName (varName_fv_req_search);
ValueDefaultAirline = getVarValuesByName (varName_fv_user_airline);
ValueDefaultAirport = getVarValuesByName (varName_fv_user_airport);
var oneDay = 1000 * 24 * 60 * 60;
var DateObj = new Date(); 
var today_year = DateObj.getFullYear();
var today_month = DateObj.getMonth()+1;
var today_date = DateObj.getDate();
var today_dow = DateObj.getDay();
var DateVal = DateObj.valueOf();
var yesterday = DateVal-oneDay;
DateObj.setTime(yesterday);
var yesterday_year = DateObj.getFullYear();
var yesterday_month = DateObj.getMonth()+1;
var yesterday_date = DateObj.getDate();
var yesterday_dow = DateObj.getDay();
DateVal = DateObj.valueOf();
var tomorrow = DateVal+2*oneDay;
DateObj.setTime(tomorrow);
var tomorrow_year = DateObj.getFullYear();
var tomorrow_month = DateObj.getMonth()+1;
var tomorrow_date = DateObj.getDate();
var tomorrow_dow = DateObj.getDay();
if (ValueDefaultAirline == "") {
    ValueDefaultAirline = fv_def_fv_airline;
}
if (ValueDefaultAirport == "") {
    ValueDefaultAirport = fv_def_fv_airport;
}

 document.write("<center><table width=400 border=0 cellpadding=0 cellspacing=0>");
 document.write("<tr align=center>");
 if (ValueReqFvSearch==UserReqSearchFlight) {
     document.write("<td class=tab_active width=37%>"+fv_txt_search[0]+"</td>");
     document.write("<td class=tab_noactive width=37%><a href=\"GoTo: By Airport\" onClick=\"javascript:SetReqSearch(UserReqSearchCity);return false\" onMouseover=\"javascript:return overlib('<div align=center class=hintdiv>"+fv_txt_search[1]+"</div>',WIDTH,'120',BORDER,'0')\" onmouseout=\"return nd();\" class=WxNav4>"+fv_txt_search[1]+"</a></td>");
     document.write("<td align=right class=tab_empty width=26%><img height=18 src=\""+tinbu_fv_server+"/imgs_fv/plane.gif\">&nbsp;</td></tr>");
     document.write("<tr align=left><td class=tab_content colspan=3><br>");
     document.write("<form name=FormFvSearch action=\"javascript:GoToFlightSearch()\" onsubmit=\"return SaveFlightSearch(this)\"><table class=WxSearchTbl border=0 cellspacing=0 cellpadding=3 ><tr align=left class=WxSearchBar><td align=right width=35%>"+fv_txt_search[2]+"</td>");
     document.write("<td colspan=2><select onChange=\"javascript:SaveSelectedAirline(this)\" class=FvInput name=Airline>");
     writeAirline();
     document.write("</select></td></tr>");
     document.write("<tr align=left class=WxSearchBar><td align=right><b>"+fv_txt_search[4]+"</b>&nbsp;"+fv_txt_search[5]+"</td><td colspan=2><input class=FvInput type=text class=textinput size=4 name=Alcode value=\"\"></td></tr>");
     document.write("<tr align=left class=WxSearchBar><td height=1 colspan=3><img height=1 width=100% src=\""+tinbu_fv_server+"/imgs_fv/graydot.png\"></td></tr>");
     document.write("<tr align=left class=WxSearchBar><td align=right>"+fv_txt_search[6]+"</td><td colspan=2><input class=FvInput type=text class=textinput size=5 name=Flnumber value=\"\"></td></tr>");
     document.write("<tr align=left class=WxSearchBar><td align=right>"+fv_txt_search[7]+"</td><td>");
     document.write("<select class=FvInput name=Depdate>");
     document.write("<option value='"+yesterday_year+addZero(yesterday_month)+addZero(yesterday_date)+"'>"+fv_txt_dow_short[yesterday_dow]+", "+fv_txt_mon_short[yesterday_month]+"&nbsp;"+yesterday_date+"</option>");
     document.write("<option selected value='"+today_year+addZero(today_month)+addZero(today_date)+"'>"+fv_txt_dow_short[today_dow]+", "+fv_txt_mon_short[today_month-1]+"&nbsp;"+today_date+"</option>");
     document.write("<option value='"+tomorrow_year+addZero(tomorrow_month)+addZero(tomorrow_date)+"'>"+fv_txt_dow_short[tomorrow_dow]+", "+fv_txt_mon_short[tomorrow_month]+"&nbsp;"+tomorrow_date+"</option>");
     document.write("</select></td>"); 
     document.write("<td align=right><input class=FvInput style=\"width:100px\" type=submit name=Search value=\""+fv_txt_search[8]+"\"></td></tr>");
     document.write("</table></form>");
 } else  {
     document.write("<td class=tab_noactive width=37%><a href=\"GoTo: By Flight\" onClick=\"javascript:SetReqSearch(UserReqSearchFlight);return false\" onMouseover=\"javascript:return overlib('<div align=center class=hintdiv>"+fv_txt_search[0]+"</div>',WIDTH,'120',BORDER,'0')\" onmouseout=\"return nd();\" class=WxNav4>"+fv_txt_search[0]+"</a></td>");
     document.write("<td class=tab_active width=37%>"+fv_txt_search[1]+"</td>");
     document.write("<td align=right class=tab_empty width=26%><img height=18 src=\""+tinbu_fv_server+"/imgs_fv/airport40x18.png\">&nbsp;</td></tr>");
     document.write("<tr align=left><td class=tab_content colspan=3><br>");
     document.write("<form name=FormFvSearchCity action=\"javascript:GoToFlightSearchCity()\" onsubmit=\"return SaveFlightSearchCity(this)\"><table border=0 class=WxSearchTbl cellspacing=0 cellpadding=3 ><tr align=left class=WxSearchBar><td align=right>"+fv_txt_search[10]+"</td>");
     document.write("<td colspan=2><select onChange=\"javascript:SaveSelectedAp(this,1)\" class=FvInput name=DepAirport>");
     writeAirport(1);
     document.write("</select></td></tr>");
     document.write("<tr align=left class=WxSearchBar><td align=right><b>"+fv_txt_search[4]+"</b>&nbsp;"+fv_txt_search[13]+"</td><td colspan=2><input class=FvInput type=text class=textinput size=4 name=DepApCode value=\"\"></td></tr>");
     document.write("<tr align=left class=WxSearchBar><td width=35% align=right>"+fv_txt_search[11]+"</td>");
     document.write("<td colspan=2><select onChange=\"javascript:SaveSelectedAp(this,2)\" class=FvInput name=ArrAirport>");
     writeAirport(2);
     document.write("</select></td></tr>");
     document.write("<tr align=left class=WxSearchBar><td align=right><b>"+fv_txt_search[4]+"</b>&nbsp;"+fv_txt_search[13]+"</td><td colspan=2><input class=FvInput type=text class=textinput size=4 name=ArrApCode value=\"\"></td></tr>");
     document.write("<tr align=left class=WxSearchBar><td colspan=2 align=center><input type=radio name=WhenArrDep value=\"dep\" checked=1>"+fv_txt_set2[0]+"&nbsp;&nbsp;&nbsp;");
     document.write("<input type=radio name=WhenArrDep value=\"arr\">"+fv_txt_set2[1]+"</td>");

     document.write("<td>"+fv_txt_search[12]+"&nbsp;<select class=FvInput name=TimeOfDay>");
     writeHours();
     document.write("</select></td></tr>");
     document.write("<tr align=left class=WxSearchBar><td align=right>"+fv_txt_search[7]+"</td><td>");
     document.write("<select class=FvInput name=Depdate>");
     document.write("<option value='"+yesterday_year+addZero(yesterday_month)+addZero(yesterday_date)+"'>"+fv_txt_dow_short[yesterday_dow]+", "+fv_txt_mon_short[yesterday_month]+"&nbsp;"+yesterday_date+"</option>");
     document.write("<option selected value='"+today_year+addZero(today_month)+addZero(today_date)+"'>"+fv_txt_dow_short[today_dow]+", "+fv_txt_mon_short[today_month-1]+"&nbsp;"+today_date+"</option>");
     document.write("<option value='"+tomorrow_year+addZero(tomorrow_month)+addZero(tomorrow_date)+"'>"+fv_txt_dow_short[tomorrow_dow]+", "+fv_txt_mon_short[tomorrow_month]+"&nbsp;"+tomorrow_date+"</option>");
     document.write("</select></td>"); 
     document.write("<td align=right><input class=FvInput style=\"width:100px\" type=submit name=Search value=\""+fv_txt_search[8]+"\"></td></tr>");
     document.write("</table></form>");
 }
 document.write("</td></tr></table></center><br>");
}

function xlllll1111ll11l(MyFvTitle, MyFvLink) //ShowMyFlightBoxTop
{
 document.write("<center><table width="+fv_def_width+" cellspacing=0 cellpadding=0 border=0>");
 document.write("<tr><td>");
 document.write("<table width=100% cellspacing=0 cellpadding=0 border=0>");
 document.write("<tr><td height=24 class=tbltopleft><img width=10 src=\""+tinbu_fv_server+"/imgs_fv/blank.png\"></td>");
 document.write("<td align=LEFT width=100% class=tbltopmid><span class=titletext><b>"+MyFvTitle+"</b></span>&nbsp; "+MyFvLink+"</td>");
 document.write("<td class=tbltopright><img width=10 src=\""+tinbu_fv_server+"/imgs_fv/blank.png\"></td></tr></table></td></tr>");
 document.write("<tr><td><table width=100% cellspacing=0 cellpadding=0 border=0>");
 document.write("<tr><td width=7 class=tblmidleft><img height=1 width=7 src=\""+tinbu_fv_server+"/imgs_fv/blank.png\"></td>");
 document.write("<td class=tblmidmid align=CENTER valign=TOP width=100%>");
 document.write("<table width=100% cellspacing=0 cellpadding=0 border=0>");
 document.write("<tr><td class=WxBorder>");
 document.write("<table width=100%% cellspacing=1 cellpadding=0 border=0><tr><td class=TdWx>");
}

function x1llll1111l111l(ShowLogos) //ShowFlightBoxBottom
{
if (ShowLogos) {
document.write("<table width=100%><tr align=left><td><img border=0 src=\""+tinbu_fv_server+"/imgs_fv/FV_logo.png\"></td><td align=right>");
document.write("<a target=_blank href=\"http://www.tinbu.com\"><img border=0 src=\"http://www.tinbu.com/images/poweredby.png\"></a></td></tr></table>");
}
document.write("</td></tr></table>");
document.write("</td></tr></table>");
document.write("</td><td width=7 class=tblmidright><img width=7 src=\""+tinbu_fv_server+"/imgs_fv/blank.png\"></td></tr>");
document.write("</table></td></tr>");
document.write("<tr><td><table width=100%% cellspacing=0 cellpadding=0 border=0>");
document.write("<tr><td height=6 class=tblbtmleft><img height=6 width=10 src=\""+tinbu_fv_server+"/imgs_fv/blank.png\"></td>");
document.write("<td width=100%% class=tblbtmmid><img width=1 height=6 width=1 src=\""+tinbu_fv_server+"/imgs_fv/blank.png\"></td>");
document.write("<td class=tblbtmright><img width=10 height=6 src=\""+tinbu_fv_server+"/imgs_fv/blank.png\"></td></tr></table></td></tr>");
document.write("</table></center>");
}
function ShowFlightArticle(ArticleID)
{
 var ArticleBaseURL1 = unescape("%3C%73%63%72%69%70%74%20%6C%61%6E%67%75%61%67%65%3D%6A%61%76%61%73%63%72%69%70%74%20%73%72%63%3D%27");
 var ArticleBaseURL2 = unescape("%2F%6A%73%2F%61%72%74%69%63%6C%65%73%2F");
 var ArticleBaseURL3 = unescape("%27%3E%3C%2F%73%63%72%69%70%74%3E");
 if (fv_def_site_fv_lang==1) {
  ArticleBaseURL2 = unescape("%2F%6A%73%2F%61%72%74%69%63%6C%65%73%5F%73%70%61%2F");
 }
 if (ArticleID == 4.1) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"plane_talk_1.js"+ArticleBaseURL3);
 } else if (ArticleID == 4.2) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"plane_talk_2.js"+ArticleBaseURL3);
 } else if (ArticleID == 4.3) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"plane_talk_3.js"+ArticleBaseURL3);
 } else if (ArticleID == 4.4) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"plane_talk_4.js"+ArticleBaseURL3);
 } else if (ArticleID == 4.5) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"plane_talk_5.js"+ArticleBaseURL3);
 } else if (ArticleID == 4.6) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"plane_talk_6.js"+ArticleBaseURL3);
 } else if (ArticleID == 4.7) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"plane_talk_7.js"+ArticleBaseURL3);
 } else if (ArticleID == 4.8) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"plane_talk_8.js"+ArticleBaseURL3);
 } else if (ArticleID == 4.9) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"plane_talk_9.js"+ArticleBaseURL3);
 } else if (ArticleID == 5.1) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"security_1.js"+ArticleBaseURL3);
 } else if (ArticleID == 5.2) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"security_2.js"+ArticleBaseURL3);
 } else if (ArticleID == 5.3) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"security_3.js"+ArticleBaseURL3);
 } else if (ArticleID == 5.4) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"security_4.js"+ArticleBaseURL3);
 } else if (ArticleID == 5.5) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"security_5.js"+ArticleBaseURL3);
 } else if (ArticleID == 5.6) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"security_6.js"+ArticleBaseURL3);
 } else if (ArticleID == 5.7) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"security_7.js"+ArticleBaseURL3);
 } else if (ArticleID == 5.8) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"security_8.js"+ArticleBaseURL3);
 } else if (ArticleID == 6.1) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"children_1.js"+ArticleBaseURL3);
 } else if (ArticleID == 6.2) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"children_2.js"+ArticleBaseURL3);
 } else if (ArticleID == 6.3) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"children_3.js"+ArticleBaseURL3);
 } else if (ArticleID == 6.4) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"children_4.js"+ArticleBaseURL3);
 } else if (ArticleID == 8.1) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"atc_1.js"+ArticleBaseURL3);
 } else if (ArticleID == 8.2) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"atc_2.js"+ArticleBaseURL3);
 } else if (ArticleID == 7.1) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"baggage_1.js"+ArticleBaseURL3);
 } else if (ArticleID == 7.2) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"baggage_2.js"+ArticleBaseURL3);
 } else if (ArticleID == 7.3) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"baggage_3.js"+ArticleBaseURL3);
 } else if (ArticleID == 7.4) {
  document.write(ArticleBaseURL1+tinbu_fv_server+ArticleBaseURL2+"baggage_4.js"+ArticleBaseURL3);
 }
}
function SaveFlightSearchLeadIn(TheFlight)
{
  if (TheFlight.length < 1) {
   alert (fv_txt_set13[0]);
   return;
  }
  var DateObj = new Date(); 
  var today_year = DateObj.getFullYear();
  var today_month = DateObj.getMonth()+1;
  var today_date = DateObj.getDate();
  ValueFvSchdepdate = today_year+addZero(today_month)+addZero(today_date);
  TheFlight = TheFlight.toUpperCase();
  var ALIndex;
  var ALCode, FLNo;
  var FoundAirline = 0;
  for (ALIndex = 0; ALIndex<ValueFvAirlines.length; ALIndex++)
  {
    if (TheFlight.indexOf(ValueFvAirlines[ALIndex], 0) == 0) {
     ALCode = ValueFvAirlines[ALIndex];
     FLNo = TheFlight.substring(ALCode.length);
     FoundAirline = 1;
     break;
    }
  }

  xlll11ll111lll1 (varName_fv_req_prod, UserReqSearchFlight); //setVarValuesByName (varName_fv_req_prod, UserReqSearchFlight);
  xlll11ll111lll1 (varName_fv_selected_al, ALCode);
  xlll11ll111lll1 (varName_fv_sch_flnumber, FLNo); //setVarValuesByName (varName_fv_sch_flnumber, ValueFvSchFlnumber);
  xlll11ll111lll1 (varName_fv_sch_airline, ALCode); //setVarValuesByName (varName_fv_sch_airline, ValueFvSchAirline);
  xlll11ll111lll1 (varName_fv_sch_depdate, ValueFvSchdepdate); //setVarValuesByName (varName_fv_sch_depdate, ValueFvSchdepdate);
  window.location.href = fv_def_fv_url;
}
function xl1l111111l1111 () // Show Lead-In-Search
{
  document.write ("<table width=100% border=0 cellpadding=0 cellspacing=0>");
  document.write("<form name=FormLeadFindFlightSearch>");
  document.write ("<tr align=right><td class=TdWx width=40%><input type=text class=FvInput size=6 name=tbflt value=\"\"></td>");
  document.write ("<td align=left class=TdWx width=60%><input onClick=\"javascript:SaveFlightSearchLeadIn(this.form.tbflt.value)\" type=button class=FvMenuButton value=\""+fv_def_find_txt+"\"></td></tr>");
  document.write("</form>");
  document.write ("</table>");
}

