var baseURL='';function correctPNG(){if(!xIE4Up)return;for(var i=0;i<document.images.length;i++){var aa=document.images[i];var ba=aa.src.toUpperCase();if(ba.substring(ba.length-3,ba.length)=="PNG"){aa.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+aa.src+")";aa.src="//dem5xqcn61lj8.cloudfront.net/spacer.gif";}}}
function isIE7orUp(){if(xIE4Up&&(window.XMLHttpRequest!=undefined))return true;else return false;}
function selectAllTextInField(ca){ca.focus();ca.select();}
function submitenter(da,e){var ea;if(window.event)ea=window.event.keyCode;else if(e)ea=e.which;else return true;if(ea==13){da.form.submit();return false;}
else return true;}
var popUpWindow=null;function popUp(fa,ga,w,h,ha,ia,ja){popUpWindow=showPopupWindow(popUpWindow,fa,ga,w,h,ha,ia,ja);}
function showPopupWindow(ka,la,ma,w,h,na,oa,pa){if(w==null){w=457;}
if(h==null){h=450;}
var qa;if(na==null)qa="yes";else if(na==true)qa="yes";else qa="no";var ra;if(oa==null)ra="yes";else if(oa==true)ra="no";else ra="yes";var sa;if(pa==null)sa="no";else if(pa==true)sa="yes";else sa="no";var ta;ta='scrollbars='+qa+',menubar=no,resizable='+ra+',status='+sa+',width='+w+',height='+h+',top=30,left=40';if(ka==null){ka=window.open(la,ma,ta);ka.focus();self.name="mainWin";}
else if(ka.closed){ka=window.open(la,ma,ta);ka.focus();self.name="mainWin";}
else{ka.close();ka=window.open(la,ma,ta);ka.focus();}
return ka;}
function setDefaultDates(ua,va,wa,xa){var ya=ua.options[ua.selectedIndex].value;var za=new Date();za=new Date(za.getFullYear(),za.getMonth(),za.getDate(),0,0,0);var Aa=0;var Ba=false;var Ca=1;for(i=(va*-1);i<=wa;i++){var Da=new Date();Da.setDate(za.getDate()+i);var Ea=formatDate(Da,xa);var Fa=formatDate(Da,'yyyy-MM-dd');ua.options[Aa]=new Option(Ea,Fa);if(Fa==ya){ua.options[Aa].selected=true;Ba=true;}
if(i==0)Ca=Aa;Aa++;}
if(!Ba)ua.options[Ca].selected=true;}
function setDefaultMonths(Ga,Ha,Ia,Ja){var Ka=Ga.options[Ga.selectedIndex].value;var La=new Date();La=new Date(La.getFullYear(),La.getMonth(),La.getDate(),0,0,0);var Ma=0;var Na=false;var Oa=1;for(i=(Ha*-1);i<=Ia;i++){var Pa=new Date();Pa.setMonth(La.getMonth()+i);var Qa=formatDate(Pa,Ja);var Ra=formatDate(Pa,'yyyy-MM');Ga.options[Ma]=new Option(Qa,Ra);if(Ra==Ka){Ga.options[Ma].selected=true;Na=true;}
if(i==0)Oa=Ma;Ma++;}
if(!Na)Ga.options[Oa].selected=true;}
function getCurrentDate(){var Sa=new Date();Sa=new Date(Sa.getFullYear(),Sa.getMonth(),Sa.getDate(),0,0,0);return formatDate(theDay,'yyyy-MM-dd');}
function popUpFlightTrackerForFlight(id,Ta,Ua){url="/go/FlightTracker/flightTracker.do?id="+id+"&airlineCode="+Ta+"&flightNumber="+Ua;window.open(url,"_blank","scrollbars=no,menubar=no,resizable=no,status=no,width=780,height=637");}
function popUpFlightTracker(){window.open("/go/FlightTracker/flightTracker.do","_blank","scrollbars=no,menubar=no,resizable=no,status=no,width=780,height=637");}
function changeImages(Va,Wa){var Xa=Va.src;Xa=Xa.replace(/;.*/,'');Xa=Xa.replace('_on.gif','');Xa=Xa.replace('_off.gif','');if(Wa==1)Va.src=Xa+'_on.gif';else Va.src=Xa+'_off.gif';}
function AutoSuggestControl(Ya,Za,$a,ab,bb,cb,db,eb,fb,gb){this.cur=-1;this.layer=null;this.iframe=null;this.parent=eb;if(null==this.parent)this.parent=document.body;this.provider=Za;this.textbox=Ya;this.showSuggestionsCallback=$a;this.hideSuggestionsCallback=ab;this.numSuggestions=0;this.numberOfSuggestionsToShow=10;if(null!=fb)this.numberOfSuggestionsToShow=fb;this.secure=false;if(null!=gb)this.secure=gb;this.left=bb;this.top=cb;this.width=db;this.hasFocus=false;this.timeout=null;this.typeAhead=false;this.init();}
AutoSuggestControl.prototype.init=function(){var hb=this;this.textbox.setAttribute("autocomplete","off");this.textbox.onkeyup=function(ib){if(!ib)ib=window.event;return hb.handleKeyUp(ib.keyCode);};this.textbox.onkeydown=function(jb){if(!jb)jb=window.event;return hb.handleKeyDown(jb);};this.textbox.onmouseup=function(){if(0!=this.selectionStart){var kb=this;setTimeout(function(){selectAllTextInField(kb);},100);}};this.textbox.onfocus=function(){hb.hasFocus=true;};this.textbox.onblur=function(){hb.hasFocus=false;hb.hideSuggestions();};this.createDropDown();}
AutoSuggestControl.prototype.createDropDown=function(){var lb=this;this.layer=document.createElement("div");this.layer.className="suggestions";this.layer.style.visibility="hidden";if(this.width==null)this.layer.style.width=this.textbox.offsetWidth;else this.layer.style.width=this.width+"px";this.layer.style.height="1px";this.layer.style.left=this.getLeft()+"px";this.layer.style.top=(this.getTop()+this.textbox.offsetHeight)+"px";this.layer.onmousedown=this.layer.onmouseup=this.layer.onmouseover=function(mb){mb=mb||window.event;oTarget=mb.target||mb.srcElement;if(mb.type=="mousedown"){if(oTarget.firstChild.nodeValue!=null){lb.textbox.value=oTarget.firstChild.nodeValue;}
lb.hideSuggestions();}
else if(mb.type=="mouseover")lb.highlightSuggestion(oTarget);else lb.textbox.focus();};if(xIE4Up){this.iframe=document.createElement("iframe");this.iframe.className="suggestions";this.iframe.style.visibility=this.layer.style.visibility;this.iframe.style.width=this.layer.style.width;this.iframe.style.height=this.layer.offsetHeight;this.iframe.style.left=this.layer.style.left;this.iframe.style.top=this.layer.style.top;this.iframe.src='javascript:false';this.parent.appendChild(this.iframe);}
this.parent.appendChild(this.layer);}
AutoSuggestControl.prototype.autosuggest=function(nb,ob){this.numSuggestions=nb.length;if(nb.length>0){if(this.hasFocus)this.showSuggestions(nb);}
else this.clearSuggestions();}
AutoSuggestControl.prototype.clearSuggestions=function(){this.hideSuggestions();this.layer.innerHTML="";this.cur=-1;}
AutoSuggestControl.prototype.showSuggestions=function(pb){var qb=null;this.layer.innerHTML="";this.layer.style.height="";for(var i=0;i<pb.length;i++){qb=document.createElement("div");if(i==0)qb.className="current";else qb.className="normal";qb.appendChild(document.createTextNode(pb[i]));this.layer.appendChild(qb);}
this.cur=0;this.layer.style.left=this.getLeft()+"px";this.layer.style.top=(this.getTop()+this.textbox.offsetHeight)+"px";this.layer.style.visibility="visible";if(null!=this.iframe){this.iframe.style.width=this.layer.style.width;this.iframe.style.left=this.layer.style.left;this.iframe.style.top=this.layer.style.top;this.iframe.style.visibility=this.layer.style.visibility;this.iframe.style.width=this.layer.offsetWidth;this.iframe.style.height=this.layer.offsetHeight;}
if(null!=this.showSuggestionsCallback)this.showSuggestionsCallback.call(this);}
AutoSuggestControl.prototype.getLeft=function(){if(this.left!=null)return this.left;var rb=this.textbox;var sb=0;while((null!=rb)&&(rb.tagName!="BODY")){sb+=rb.offsetLeft;rb=rb.offsetParent;}
return sb;}
AutoSuggestControl.prototype.getTop=function(){if(this.top!=null)return this.top;var tb=this.textbox;var ub=0;while((null!=tb)&&(tb.tagName!="BODY")){ub+=tb.offsetTop;tb=tb.offsetParent;}
return ub;}
AutoSuggestControl.prototype.handleKeyDown=function(vb){switch(vb.keyCode){case 38:this.previousSuggestion();break;case 40:this.nextSuggestion();break;case 13:if(this.layer.style.visibility!="hidden"){this.getSuggestion();this.hideSuggestions();}
else{this.textbox.form.submit()}
return false;break;}}
AutoSuggestControl.prototype.getSuggestions=function(wb){var xb=this;function delayed(){if(!wb)xb.provider.requestSuggestions(xb,xb.typeAhead,xb.numberOfSuggestionsToShow,xb.secure);xb.timeout=null;};if(xb.timeout)clearTimeout(xb.timeout);else if(wb)xb.provider.requestSuggestions(xb,xb.typeAhead,xb.numberOfSuggestionsToShow,xb.secure);xb.timeout=setTimeout(delayed,200);}
AutoSuggestControl.prototype.handleKeyUp=function(yb){this.typeAhead=false;if(yb==8||yb==46){if(this.textbox.value.length==0)this.clearSuggestions();else this.getSuggestions(false);}
else if(yb==13)return false;else if(yb<32||(yb>=33&&yb<46)||(yb>=112&&yb<=123)){}
else{this.typeAhead=true;this.getSuggestions(false);}}
AutoSuggestControl.prototype.hideSuggestions=function(){this.layer.style.visibility="hidden";if(null!=this.iframe)this.iframe.style.visibility="hidden";if(null!=this.hideSuggestionsCallback)this.hideSuggestionsCallback.call(this);}
AutoSuggestControl.prototype.highlightSuggestion=function(zb){for(var i=0;i<this.layer.childNodes.length;i++){var Ab=this.layer.childNodes[i];if(Ab==zb)Ab.className="current";else if(Ab.className=="current")Ab.className="normal";}}
AutoSuggestControl.prototype.nextSuggestion=function(){var Bb=this.layer.childNodes;if(Bb.length>0&&this.cur<Bb.length-1){var Cb=Bb[++this.cur];this.highlightSuggestion(Cb);this.textbox.value=Cb.firstChild.nodeValue;}}
AutoSuggestControl.prototype.previousSuggestion=function(){var Db=this.layer.childNodes;if(Db.length>0&&this.cur>0){var Eb=Db[--this.cur];this.highlightSuggestion(Eb);this.textbox.value=Eb.firstChild.nodeValue;}}
AutoSuggestControl.prototype.getSuggestion=function(){if(this.cur==-1)return;var Fb=this.layer.childNodes;var Gb=Fb[this.cur];this.textbox.value=Gb.firstChild.nodeValue;}
AutoSuggestControl.prototype.selectRange=function(Hb,Ib){if(this.textbox.createTextRange){var Jb=this.textbox.createTextRange();Jb.moveStart("character",Hb);Jb.moveEnd("character",Ib-this.textbox.value.length);Jb.select();}
else if(this.textbox.setSelectionRange)this.textbox.setSelectionRange(Hb,Ib);this.textbox.focus();}
AutoSuggestControl.prototype.typeAhead=function(Kb){if(this.textbox.createTextRange||this.textbox.setSelectionRange){var Lb=this.textbox.value.length;this.textbox.value=Kb;this.selectRange(Lb,Kb.length);}}
function RemoteAirlineSuggestions(Mb){this.baseURL='';if(Mb)this.baseURL=Mb;}
RemoteAirlineSuggestions.prototype.getHTTPRequest=function(){var Nb=null;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest();else if(typeof ActiveXObject!="undefined"){try{return new ActiveXObject("Msxml2.XMLHTTP");}
catch(exception){try{return new ActiveXObject("Microsoft.XMLHTTP");}
catch(exception2){}}}
return null;}
RemoteAirlineSuggestions.prototype.requestSuggestions=function(Ob,Pb,Qb,Rb){var Sb=this.getHTTPRequest();if(Sb==null)return;var Tb=null;if((null!=Rb)&&(Rb))Tb=this.baseURL+"/go/Suggest/airlineSuggestSecure.do";else Tb=this.baseURL+"/go/Suggest/airlineSuggest.do";Tb+="?desiredResults="+Qb+"&searchSubstring="+encodeURIComponent(Ob.textbox.value);Sb.open("get",Tb,true);Sb.onreadystatechange=function(){if(Sb.readyState==4){if(null==Sb.responseXML)return;var Ub=[];var Vb=Sb.responseXML.getElementsByTagName("airline");for(var Wb=0;Wb<Vb.length;Wb++){var Xb=Vb[Wb].getAttribute("name");var Yb=Vb[Wb].getAttribute("code");Xb='('+Yb+') '+Xb;Ub.push(Xb);}
Ob.autosuggest(Ub,Pb);}};Sb.send(null);}
function RemoteAirportSuggestions(Zb){this.baseURL='';if(Zb)this.baseURL=Zb;}
RemoteAirportSuggestions.prototype.getHTTPRequest=function(){var $b=null;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest();else if(typeof ActiveXObject!="undefined"){try{return new ActiveXObject("Msxml2.XMLHTTP");}
catch(exception){try{return new ActiveXObject("Microsoft.XMLHTTP");}
catch(exception2){}}}
return null;}
RemoteAirportSuggestions.prototype.requestSuggestions=function(ac,bc,cc,dc){var ec=this.getHTTPRequest();if(ec==null)return;var fc=null;if((null!=dc)&&(dc))fc=this.baseURL+"/go/Suggest/airportSuggestSecure.do";else fc=this.baseURL+"/go/Suggest/airportSuggest.do";fc+="?desiredResults="+cc+"&searchSubstring="+encodeURIComponent(ac.textbox.value);ec.open("get",fc,true);ec.onreadystatechange=function(){if(ec.readyState==4){if(null==ec.responseXML)return;var gc=[];var hc=ec.responseXML.getElementsByTagName("airport");for(var ic=0;ic<hc.length;ic++){var jc=hc[ic].getAttribute("code");var kc=hc[ic].getAttribute("name");var lc=hc[ic].getAttribute("city");kc=kc.replace("International Airport","International");kc=kc.replace("International","Intl");kc='('+jc+') '+kc+', ';if(-1==kc.indexOf(lc))kc+=lc+', ';var mc=hc[ic].getAttribute("stateCode");if(null!=mc)kc+=mc+', ';kc+=hc[ic].getAttribute("countryCode");gc.push(kc);}
ac.autosuggest(gc,bc);}};ec.send(null);}
function RemoteCountrySuggestions(){}
RemoteCountrySuggestions.prototype.getHTTPRequest=function(){var nc=null;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest();else if(typeof ActiveXObject!="undefined"){try{return new ActiveXObject("Msxml2.XMLHTTP");}
catch(exception){try{return new ActiveXObject("Microsoft.XMLHTTP");}
catch(exception2){}}}
return null;}
RemoteCountrySuggestions.prototype.requestSuggestions=function(oc,pc,qc,rc){var sc=this.getHTTPRequest();if(sc==null)return;var tc=null;if((null!=rc)&&(rc))tc="/go/Suggest/countrySuggestSecure.do";else tc="/go/Suggest/countrySuggest.do";tc+="?desiredResults="+qc+"&searchSubstring="+encodeURIComponent(oc.textbox.value);sc.open("get",tc,true);sc.onreadystatechange=function(){if(sc.readyState==4){if(null==sc.responseXML)return;var uc=[];var vc=sc.responseXML.getElementsByTagName("country");for(var wc=0;wc<vc.length;wc++){var xc=vc[wc].getAttribute("code");var yc=vc[wc].getAttribute("name");yc='('+xc+') '+yc;var zc=vc[wc].getAttribute("region");if(null!=zc)yc+=', '+zc;uc.push(yc);}
oc.autosuggest(uc,pc);}};sc.send(null);}
var pageTracker=null;function trackEvent(Ac,Bc,Cc,Dc){if(null!=pageTracker){pageTracker._trackEvent(Ac,Bc,Cc,Dc);}}
