var browserType1;var loadX=0;var loadY=0;var isMCS=false;function setSafariXY(xf,yf,xs,ys){if(browserType1=="Safari"){loadX=xs;loadY=ys;}else{loadX=xf;loadY=yf;}}function Sarissa(){}Sarissa.PARSED_OK="Document contains no parsing errors";Sarissa.IS_ENABLED_TRANSFORM_NODE=false;Sarissa.IS_ENABLED_XMLHTTP=false;Sarissa.IS_ENABLED_SELECT_NODES=false;var _sarissa_iNsCounter=0;var _SARISSA_IEPREFIX4XSLPARAM="";var _SARISSA_HAS_DOM_IMPLEMENTATION=document.implementation&&true;var _SARISSA_HAS_DOM_CREATE_DOCUMENT=_SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.createDocument;var _SARISSA_HAS_DOM_FEATURE=_SARISSA_HAS_DOM_IMPLEMENTATION&&document.implementation.hasFeature;var _SARISSA_IS_MOZ=_SARISSA_HAS_DOM_CREATE_DOCUMENT&&_SARISSA_HAS_DOM_FEATURE;var _SARISSA_IS_SAFARI=(navigator.userAgent&&navigator.vendor&&(navigator.userAgent.toLowerCase().indexOf("applewebkit")!=-1||navigator.vendor.indexOf("Apple")!=-1));var _SARISSA_IS_IE=document.all&&window.ActiveXObject&&navigator.userAgent.toLowerCase().indexOf("msie")>-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1;if(!window.Node||!window.Node.ELEMENT_NODE){var Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};}if(_SARISSA_IS_IE){_SARISSA_IEPREFIX4XSLPARAM="xsl:";var _SARISSA_DOM_PROGID="";var _SARISSA_XMLHTTP_PROGID="";pickRecentProgID=function(idList,enabledList){var bFound=false;for(var i=0;i<idList.length&&!bFound;i++){try{var oDoc=new ActiveXObject(idList[i]);o2Store=idList[i];bFound=true;for(var j=0;j<enabledList.length;j++){if(i<=enabledList[j][1]){Sarissa["IS_ENABLED_"+enabledList[j][0]]=true;}}}catch(objException){}}if(!bFound){throw"Could not retreive a valid progID of Class: "+idList[idList.length-1]+". (original exception: "+e+")";}idList=null;return o2Store;};_SARISSA_DOM_PROGID=pickRecentProgID(["Msxml2.DOMDocument.4.0","Msxml2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"],[["SELECT_NODES",2],["TRANSFORM_NODE",2]]);_SARISSA_XMLHTTP_PROGID=pickRecentProgID(["Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],[["XMLHTTP",4]]);_SARISSA_THREADEDDOM_PROGID=pickRecentProgID(["MSXML2.FreeThreadedDOMDocument.4.0","MSXML2.FreeThreadedDOMDocument.3.0"]);_SARISSA_XSLTEMPLATE_PROGID=pickRecentProgID(["Msxml2.XSLTemplate.4.0","MSXML2.XSLTemplate.3.0"],[["XSLTPROC",2]]);pickRecentProgID=null;Sarissa.getDomDocument=function(sUri,sName){var oDoc=new ActiveXObject(_SARISSA_DOM_PROGID);if(sName){if(sUri){oDoc.loadXML("<a"+_sarissa_iNsCounter+":"+sName+" xmlns:a"+_sarissa_iNsCounter+'="'+sUri+'" />');++_sarissa_iNsCounter;}else{oDoc.loadXML("<"+sName+"/>");}}return oDoc;};Sarissa.getParseErrorText=function(oDoc){var parseErrorText=Sarissa.PARSED_OK;if(oDoc.parseError!=0){parseErrorText="XML Parsing Error: "+oDoc.parseError.reason+"\nLocation: "+oDoc.parseError.url+"\nLine Number "+oDoc.parseError.line+", Column "+oDoc.parseError.linepos+":\n"+oDoc.parseError.srcText+"\n";for(var i=0;i<oDoc.parseError.linepos;i++){parseErrorText+="-";}parseErrorText+="^\n";}return parseErrorText;};Sarissa.setXpathNamespaces=function(oDoc,sNsSet){oDoc.setProperty("SelectionLanguage","XPath");oDoc.setProperty("SelectionNamespaces",sNsSet);};XSLTProcessor=function(){this.template=new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID);this.processor=null;};XSLTProcessor.prototype.importStylesheet=function(xslDoc){var converted=new ActiveXObject(_SARISSA_THREADEDDOM_PROGID);converted.loadXML(xslDoc.xml);this.template.stylesheet=converted;this.processor=this.template.createProcessor();this.paramsSet=new Array();};XSLTProcessor.prototype.transformToDocument=function(sourceDoc){this.processor.input=sourceDoc;var outDoc=new ActiveXObject(_SARISSA_DOM_PROGID);this.processor.output=outDoc;this.processor.transform();return outDoc;};XSLTProcessor.prototype.setParameter=function(nsURI,name,value){if(nsURI){this.processor.addParameter(name,value,nsURI);}else{this.processor.addParameter(name,value);}if(!this.paramsSet[""+nsURI]){this.paramsSet[""+nsURI]=new Array();}this.paramsSet[""+nsURI][name]=value;};XSLTProcessor.prototype.getParameter=function(nsURI,name){nsURI=nsURI||"";if(nsURI in this.paramsSet&&name in this.paramsSet[nsURI]){return this.paramsSet[nsURI][name];}else{return null;}};}else{if(_SARISSA_HAS_DOM_CREATE_DOCUMENT){Sarissa.__handleLoad__=function(oDoc){if(!oDoc.documentElement||oDoc.documentElement.tagName=="parsererror"){oDoc.parseError=-1;}Sarissa.__setReadyState__(oDoc,4);};_sarissa_XMLDocument_onload=function(){Sarissa.__handleLoad__(this);};Sarissa.__setReadyState__=function(oDoc,iReadyState){oDoc.readyState=iReadyState;if(oDoc.onreadystatechange!=null&&typeof oDoc.onreadystatechange=="function"){oDoc.onreadystatechange();}};Sarissa.getDomDocument=function(sUri,sName){var oDoc=document.implementation.createDocument(sUri?sUri:"",sName?sName:"",null);oDoc.addEventListener("load",_sarissa_XMLDocument_onload,false);return oDoc;};if(window.XMLDocument){XMLDocument.prototype.onreadystatechange=null;XMLDocument.prototype.readyState=0;XMLDocument.prototype.parseError=0;var _SARISSA_SYNC_NON_IMPLEMENTED=false;XMLDocument.prototype._sarissa_load=XMLDocument.prototype.load;XMLDocument.prototype.load=function(sURI){var oDoc=document.implementation.createDocument("","",null);Sarissa.copyChildNodes(this,oDoc);this.parseError=0;Sarissa.__setReadyState__(this,1);try{if(this.async==false&&_SARISSA_SYNC_NON_IMPLEMENTED){var tmp=new XMLHttpRequest();tmp.open("GET",sURI,false);tmp.send(null);Sarissa.__setReadyState__(this,2);Sarissa.copyChildNodes(tmp.responseXML,this);Sarissa.__setReadyState__(this,3);}else{this._sarissa_load(sURI);}}catch(objException){this.parseError=-1;}finally{if(this.async==false){Sarissa.__handleLoad__(this);}}return oDoc;};}else{if(document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("LS","3.0")){Document.prototype.async=true;Document.prototype.onreadystatechange=null;Document.prototype.parseError=0;Document.prototype.load=function(sURI){var parser=document.implementation.createLSParser(this.async?document.implementation.MODE_ASYNCHRONOUS:document.implementation.MODE_SYNCHRONOUS,null);if(this.async){var self=this;parser.addEventListener("load",function(e){self.readyState=4;Sarissa.copyChildNodes(e.newDocument,self.documentElement,false);self.onreadystatechange.call();},false);}try{var oDoc=parser.parseURI(sURI);}catch(e){this.parseError=-1;}if(!this.async){Sarissa.copyChildNodes(oDoc,this.documentElement,false);}return oDoc;};Sarissa.getDomDocument=function(sUri,sName){return document.implementation.createDocument(sUri?sUri:"",sName?sName:"",null);};}}}}if(!window.DOMParser){DOMParser=function(){};if(_SARISSA_IS_SAFARI){DOMParser.prototype.parseFromString=function(sXml,contentType){if(contentType.toLowerCase()!="application/xml"){throw'Cannot handle content type: "'+contentType+'"';}var xmlhttp=new XMLHttpRequest();xmlhttp.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(str),false);xmlhttp.send(null);return xmlhttp.responseXML;};}else{if(Sarissa.getDomDocument&&Sarissa.getDomDocument()&&"loadXML" in Sarissa.getDomDocument()){DOMParser.prototype.parseFromString=function(sXml,contentType){var doc=Sarissa.getDomDocument();doc.loadXML(sXml);return doc;};}}}if(window.XMLHttpRequest){Sarissa.IS_ENABLED_XMLHTTP=true;}else{if(_SARISSA_IS_IE){XMLHttpRequest=function(){return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);};Sarissa.IS_ENABLED_XMLHTTP=true;}}if(!window.document.importNode&&_SARISSA_IS_IE){try{window.document.importNode=function(oNode,bChildren){var importNode=document.createElement("div");if(bChildren){importNode.innerHTML=Sarissa.serialize(oNode);}else{importNode.innerHTML=Sarissa.serialize(oNode.cloneNode(false));}return importNode.firstChild;};}catch(e){}}if(!Sarissa.getParseErrorText){Sarissa.getParseErrorText=function(oDoc){var parseErrorText=Sarissa.PARSED_OK;if(oDoc&&oDoc.parseError&&oDoc.parseError!=0){if(oDoc.documentElement.tagName=="parsererror"){parseErrorText=oDoc.documentElement.firstChild.data;parseErrorText+="\n"+oDoc.documentElement.firstChild.nextSibling.firstChild.data;}else{parseErrorText=Sarissa.getText(oDoc.documentElement);}}return parseErrorText;};}Sarissa.getText=function(oNode,deep){var s="";var nodes=oNode.childNodes;for(var i=0;i<nodes.length;i++){var node=nodes[i];var nodeType=node.nodeType;if(nodeType==Node.TEXT_NODE||nodeType==Node.CDATA_SECTION_NODE){s+=node.data;}else{if(deep==true&&(nodeType==Node.ELEMENT_NODE||nodeType==Node.DOCUMENT_NODE||nodeType==Node.DOCUMENT_FRAGMENT_NODE)){s+=Sarissa.getText(node,true);}}}return s;};if(window.XMLSerializer){Sarissa.serialize=function(oDoc){var s=null;if(oDoc){s=oDoc.innerHTML?oDoc.innerHTML:(new XMLSerializer()).serializeToString(oDoc);}return s;};}else{if(Sarissa.getDomDocument&&(Sarissa.getDomDocument("","foo",null)).xml){Sarissa.serialize=function(oDoc){var s=null;if(oDoc){s=oDoc.innerHTML?oDoc.innerHTML:oDoc.xml;}return s;};XMLSerializer=function(){};XMLSerializer.prototype.serializeToString=function(oNode){return oNode.xml;};}}Sarissa.stripTags=function(s){return s.replace(/<[^>]+>/g,"");};Sarissa.clearChildNodes=function(oNode){while(oNode.firstChild){oNode.removeChild(oNode.firstChild);}};Sarissa.copyChildNodes=function(nodeFrom,nodeTo,bPreserveExisting){if((!nodeFrom)||(!nodeTo)){throw"Both source and destination nodes must be provided";}if(!bPreserveExisting){Sarissa.clearChildNodes(nodeTo);}var ownerDoc=nodeTo.nodeType==Node.DOCUMENT_NODE?nodeTo:nodeTo.ownerDocument;var nodes=nodeFrom.childNodes;if(ownerDoc.importNode&&(!_SARISSA_IS_IE)){for(var i=0;i<nodes.length;i++){nodeTo.appendChild(ownerDoc.importNode(nodes[i],true));}}else{for(var i=0;i<nodes.length;i++){nodeTo.appendChild(nodes[i].cloneNode(true));}}};Sarissa.moveChildNodes=function(nodeFrom,nodeTo,bPreserveExisting){if((!nodeFrom)||(!nodeTo)){throw"Both source and destination nodes must be provided";}if(!bPreserveExisting){Sarissa.clearChildNodes(nodeTo);}var nodes=nodeFrom.childNodes;if(nodeFrom.ownerDocument==nodeTo.ownerDocument){while(nodeFrom.firstChild){nodeTo.appendChild(nodeFrom.firstChild);}}else{var ownerDoc=nodeTo.nodeType==Node.DOCUMENT_NODE?nodeTo:nodeTo.ownerDocument;if(ownerDoc.importNode&&(!_SARISSA_IS_IE)){for(var i=0;i<nodes.length;i++){nodeTo.appendChild(ownerDoc.importNode(nodes[i],true));}}else{for(var i=0;i<nodes.length;i++){nodeTo.appendChild(nodes[i].cloneNode(true));}}Sarissa.clearChildNodes(nodeFrom);}};Sarissa.xmlize=function(anyObject,objectName,indentSpace){indentSpace=indentSpace?indentSpace:"";var s=indentSpace+"<"+objectName+">";var isLeaf=false;if(!(anyObject instanceof Object)||anyObject instanceof Number||anyObject instanceof String||anyObject instanceof Boolean||anyObject instanceof Date){s+=Sarissa.escape(""+anyObject);isLeaf=true;}else{s+="\n";var itemKey="";var isArrayItem=anyObject instanceof Array;for(var name in anyObject){s+=Sarissa.xmlize(anyObject[name],(isArrayItem?'array-item key="'+name+'"':name),indentSpace+"   ");}s+=indentSpace;}return s+=(objectName.indexOf(" ")!=-1?"</array-item>\n":"</"+objectName+">\n");};Sarissa.escape=function(sXml){return sXml.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;");};Sarissa.unescape=function(sXml){return sXml.replace(/&apos;/g,"'").replace(/&quot;/g,'"').replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&");};var o_navigator=navigator.userAgent.toLowerCase();var isMacIE=(o_navigator.indexOf("msie 5")>-1&&o_navigator.indexOf("mac")>-1)?1:0;var isPCIE=(o_navigator.indexOf("msie")>-1&&!isMacIE&&o_navigator.indexOf("opera")==-1)?1:0;var isOpera=o_navigator.indexOf("opera")>-1?1:0;var isKHTML=o_navigator.indexOf("khtml")>-1?1:0;var mArray=new Array("January","February","March","April","May","June","July","August","September","October","November","December");var dArray=new Array("S","M","T","W","T","F","S");var datesArray=new Array(31,28,31,30,31,30,31,31,30,31,30,31);var today="";var yearShowFlg=false;var showYear="";if(typeof fixedateForAddPoints=="undefined"){today=new Date();}else{var fixedateForAddPointsParse=Date.parse(fixedateForAddPoints);yearShowFlg=true;today=new Date(fixedateForAddPointsParse);}var cD=today.getDay();var cT=today.getDate();var cM=today.getMonth();var cMDs=datesArray[cM];var cY=today.getFullYear();var newT=cT;var newM=cM;var newY=cY;var newDs=cMDs;var newD=cD;var numCalendars=2;var calDirection="";var calopen=0;var o_windowparent=top;var o_input=0;var o_month=0;var o_date=0;var o_iframecal=0;var o_from;var o_to;var v_from;var v_to;var d_makefrom=0;var d_maketo=0;var s_lang="us";var o_currentDate=false;var i_firstMonth=cM;var i_sfirstYear=cY;var i_sfirstMonth=cM;var i_ofirstYear=cY;var i_ofirstMonth=cM;var b_calinit=0;var o_row=null;var i_numcal=0;var o_calbody=null;var s_jscall=(isPCIE)?"parent.":"";var s_closecal="";var b_date331=0;var a_input=0;var o_parent;var s_inputtype="object";var a_v_input=null;var FieldClicked=null;var departDate="";var flgDorR="";var flgRetName="";var flgDateDisable="";var chk="";var chkExccessbags="true";var TOTALBAGSDEP=0;var TotalSelectValue=0;var TotalSelectValueRet=0;var TotalSubDep=0;var TotalSubRet=0;var TotalDepRet=0;var guestsize=0;var chkAjaxDiv;var chkAjaxDivSecond;var secondDiv;var pointsDivId;var showPointsDivId;var addFieldId="";var discontinue=0;var callErrorFun=0;var excessBagsString="";var excessBagsStringRet="";var tempguestBag=0;var guestHaveExcessBags=0;var allowFree_Bags=0;var xmlhttp=new XMLHttpRequest();var chkxmlhttp=new XMLHttpRequest();var iswap=0;var X=0;var Y=0;var linkCnt=0;var maxheight=240;var c1;var c2;var thisobj="undefined";var checkval="undefined";var depLeg1Guest="";var depLeg2Guest="";var retLeg1Guest="";var retLeg2Guest="";var depLeg1Seat="";var depLeg2Seat="";var retLeg1Seat="";var retLeg2Seat="";var guestArray=new Array();var seatArray=new Array();var seatDepConnectArray=new Array();var guestArrayRet=new Array();var seatArrayRet=new Array();var seatRetConnectArray=new Array();var gnum="";var gnumRet="";var ajaxDiv;var alreadyCheckedInDep="false";var alreadyCheckedInRet="false";var mywindow;var mywindowForHtml;var wichSelected;var tabVal="";var ajaxDiv;var seatMapAjaxDiv;var activatedTab="";var tabSelect="1";var tbSelect="1";var logInVal="Email, Alias or Elevate#";var loginModuleOrRest="login";var holdInnerHtml="";var expiredays=0;var FrmToSubmit="";var buttonURL="";var flgMsg=false;var xAxis="";var yAxis="";var X1=0;var Y1=0;var disableIds=0;var rUInRegistrationProcess="No";var movex=0;var movey=0;var xdiff=0;var ydiff=0;var ystart=0;var xstart=0;var a=0;var isScroll="Yes";var positionDivFare;var actualDiv;var checkSearchTypeLink;var imgObj;var fltStatusErrorsRequired="To find the flight you need, we need a valid flight number or city pair.";var fltStatusErrorsUnknown="Unknown error: Contact admin";var fltStatusErrorsServiceRequired="No data matches your selection criteria.";var fltStatusErrorsInValidFltNo="The flight number you have chosen does not fly on this date.  Please choose another day.";var fltStatusErrorsInValidFltNoNotNum="Flight numbers must be numeric only.";var fltStatusErrorsInValidCityPair="The city pair you have selected does not match the correct flight number. Please double check them and try again.";var fltStatusErrorsNoFltGivenDate="Sorry, there are not any flights for the date you have requested.";var fltStatuserrorsnoData="No Data Available for this date or selected City Pair.";var IsNumber=true;function addElement(parentId,eleType,eleName,eleValue){var parentObj=document.getElementById(parentId);var element=document.createElement("input");element.setAttribute("type",eleType);element.setAttribute("value",eleValue);element.setAttribute("name",eleName);parentObj.appendChild(element);}function getAnchorPosition(anchorname){var useWindow=false;var coordinates=new Object();var x=0,y=0;var use_gebi=false,use_css=false,use_layers=false;if(document.getElementById){use_gebi=true;}else{if(document.all){use_css=true;}else{if(document.layers){use_layers=true;}}}if(use_gebi&&document.all){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else{if(use_gebi){var o=document.getElementById(anchorname);x=AnchorPosition_getPageOffsetLeft(o);y=AnchorPosition_getPageOffsetTop(o);}else{if(use_css){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else{if(use_layers){var found=0;for(var i=0;i<document.anchors.length;i++){if(document.anchors[i].name==anchorname){found=1;break;}}if(found==0){coordinates.x=0;coordinates.y=0;return coordinates;}x=document.anchors[i].x;y=document.anchors[i].y;}else{coordinates.x=0;coordinates.y=0;return coordinates;}}}}coordinates.x=x;coordinates.y=y;return coordinates;}function getAnchorWindowPosition(anchorname){var coordinates=getAnchorPosition(anchorname);var x=0;var y=0;if(document.getElementById){if(isNaN(window.screenX)){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop;}else{x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}}else{if(document.all){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop;}else{if(document.layers){x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}}}coordinates.x=x;coordinates.y=y;return coordinates;}function AnchorPosition_getPageOffsetLeft(el){var ol=el.offsetLeft;while((el=el.offsetParent)!=null){ol+=el.offsetLeft;}return ol;}function AnchorPosition_getWindowOffsetLeft(el){return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;}function AnchorPosition_getPageOffsetTop(el){var ot=el.offsetTop;while((el=el.offsetParent)!=null){ot+=el.offsetTop;}return ot;}function AnchorPosition_getWindowOffsetTop(el){return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;}function findFirstDay(){firstDay=new Date();firstDay.setDate(1);firstDay.setMonth(newM);firstDay.setFullYear(newY);return firstDay.getDay();}function setDateLimit(DateLimit1){fixedConfiguratedDate=DateLimit1;}function check331(d_date){var b_check331;ConParseDate=Date.parse(fixedConfiguratedDate);ConfiguratedDate=new Date(ConParseDate);if(ConfiguratedDate>d_date){b_check331=0;}else{b_check331=1;}return b_check331;}function vm_setupCal(){i_numcal=0;vm_makeCal(cM);}function preventClose(evt){if(isKHTML||isOpera){evt.stopPropagation();}}function ty_makeDate(which){d_makedate=new Date(newY,newM,which);b_date331=check331(d_makedate);if((flgDorR=="Return_date.gif"||flgRetName=="flightSearch.returnDateMC.MMDDYYYY")&&flgDateDisable!=""){var flgDateDisableDay=flgDateDisable.getDate();var flgDateDisableMonth=flgDateDisable.getMonth();var flgDateDisableYear=flgDateDisable.getFullYear();if((flgDateDisableDay>which&&flgDateDisableMonth==newM&&flgDateDisableYear==newY)||b_date331){s_makeDate="<td class='calDateOff' width='18' height='16'>&nbsp;";s_makeDate+=which;}else{if(d_makefrom||d_maketo){if(flgDorR=="Return_date.gif"||flgRetName=="flightSearch.returnDateMC.MMDDYYYY"){d_makefrom=d_maketo;}if(d_makedate.toString()==d_makefrom.toString()){s_makeDate="<td class='calDateSel' width='18' height='16'>";}else{if(d_makedate>d_makefrom&&d_makedate<d_maketo&&d_makefrom){s_makeDate="<td class='calDateOff' width='18' height='16'>";}else{s_makeDate="<td class='calDate' width='18' height='16'>";}}}else{s_makeDate="<td class='calDate' width='18' height='16'>";}if(d_makedate.toString()==d_makefrom.toString()){s_makeDate+="<a href='#' id='idmake_Date' onclick='"+s_jscall+"ty_setDate("+newM+","+which+",this.parentNode,"+newY+");return false;' style='color:#FFFFFF;TEXT-DECORATION: none;'>";}else{s_makeDate+="&nbsp;<a href='#' id='idmake_Date1' onclick='"+s_jscall+"ty_setDate("+newM+","+which+",this.parentNode,"+newY+");return false;' class='calDateA'>";}s_makeDate+=which;s_makeDate+="</a>";}}else{if((cT>which&&cM==newM&&cY==newY)||b_date331){s_makeDate="<td class='calDateOff' width='18' height='16'>&nbsp;";s_makeDate+=which;}else{if(d_makefrom||d_maketo){if(flgDorR=="Return_date.gif"||flgRetName=="flightSearch.returnDateMC.MMDDYYYY"){d_makefrom=d_maketo;}if(d_makedate.toString()==d_makefrom.toString()){s_makeDate="<td class='calDateSel' width='18' height='16'>";}else{if(d_makedate>d_makefrom&&d_makedate<d_maketo&&d_makefrom){s_makeDate="<td class='calDateOff' width='18' height='16'>";}else{s_makeDate="<td class='calDate' width='18' height='16'>";}}}else{s_makeDate="<td class='calDate' width='18' height='16'>";}if(d_makedate.toString()==d_makefrom.toString()){s_makeDate+="<a href='#' id='idmake_Date2' onclick='"+s_jscall+"ty_setDate("+newM+","+which+",this.parentNode,"+newY+");return false;' style='color:#FFFFFF;TEXT-DECORATION: none;'>";}else{s_makeDate+="&nbsp;<a href='#' id='idmake_Date3' onclick='"+s_jscall+"ty_setDate("+newM+","+which+",this.parentNode,"+newY+");return false;' class='calDateA'>";}s_makeDate+=which;s_makeDate+="</a>";}}s_makeDate+="</td>";return s_makeDate;}function ty_maketr(what){s_tr="<tr>";s_tr+=what;s_tr+="</tr>";return s_tr;}function ty_changeMonths(which){calopen=0;i_numcal=0;o_calbody.innerHTML="";if(which<0){which=11;newY--;}vm_makeCal(which);setTimeout("calopen = 1",100);}var o_cal1="",o_cal2="";var tableOpen1="<tr><td width='303'  colspan='3' align='left' valign='top'><table width='100%'  border='0' cellpadding='0' cellspacing='0'><tr><td width='5'  rowspan='2' align='left' valign='top' background='images/calender_lt.gif' style='background-repeat:repeat-y;'><img src='images/spacer.gif' width='5' height='8' /></td><td height='3' align='left' valign='top' ><img src='images/spacer.gif' width='15' height='3' /></td><td width='7'  rowspan='2' align='left' valign='top' background='images/calender_rt.gif' style='background-repeat:repeat-y;'><img src='images/spacer.gif' width='7' height='8' /></td></tr><tr><td align='left' valign='top' ><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='142' align='left' valign='top' >";var tableClose1="</td></tr></table></td></tr><tr><td width='303' height='10' colspan='3' align='left' valign='top'><img src='images/calender_base.gif' width='303' height='10' /></td></tr></table>";var tdFor3rdTable="</td><td width='7' height='19' align='left' valign='top'><img src='images/spacer.gif' width='7' height='96' /></td><td width='142' align='left' valign='top' >";function vm_makeCal(whichMonth){b_calinit=1;o_cal="";o_caltr="";o_caltd="";newM=whichMonth;if(newM<cM){newY=newY;}if(newY<cY){newY=cY;}if(newM>=12){newM=whichMonth-12;newY++;}if(i_numcal==0){i_firstMonth=newM;switch(s_inputtype){case"object":i_ofirstMonth=newM;i_ofirstYear=newY;break;default:i_sfirstMonth=newM;i_sfirstYear=newY;}}newDs=datesArray[newM];isLeap=(newY%4==0&&(newY%100!=0||newY%400==0))?1:0;if(newM==1){newDs=newDs+isLeap;}newD=findFirstDay();countDay=newD;s_calclass=(calDirection=="vertical")?"calTableH":"calTableH";var changeTDTOTABLEValue="";o_cal+="<table month='"+newM+"' year='"+newY+"' width='142' border='0' cellspacing='0' cellpadding='0'><tr>";o_caltr+="<tr>";o_caltd+="<td height='19' align='left' valign='top' background='images/month_bg.gif' colspan=7>";changeTDTOTABLEValue=mArray[newM];o_caltd+="RWTCMT";o_caltd+="</td>";o_caltr+=o_caltd;o_caltr+="</tr>";o_cal+=o_caltr;o_caltd="";o_caltd+="<td height='19' align='left' valign='top' colspan=7 ><table width='142' border='0' cellspacing='0' cellpadding='0'><tr><td width='142' height='19' align='left' valign='top' ><img src='images/day_name.gif' width='142' height='19' /></td></tr></table></td>";o_caltd+="<tr><td ></td><td colspan=5><img src='images/spacer.gif'></td><td></td>";o_caltr=ty_maketr(o_caltd);o_cal+=o_caltr;o_caltd="";i_calRows=0;for(d=1;d<=newDs;d++){if(d==1){for(bd=0;bd<newD;bd++){o_caltd+="<td width='18' height='16' align='left' valign='top'><img src='images/spacer.gif' width='18' height='16' /></td>";}}o_caltd+=ty_makeDate(d);countDay++;if(countDay==7){countDay=0;o_caltr=ty_maketr(o_caltd);o_cal+=o_caltr;o_caltd="";i_calRows++;}if(d==newDs&&countDay!=0){for(bd=countDay;bd<7;bd++){o_caltd+="<td width='18' height='16' align='left' valign='top'><img src='images/spacer.gif' width='18' height='16' /></td>";}o_caltr=ty_maketr(o_caltd);o_cal+=o_caltr;o_caltd="";i_calRows++;}}if(i_calRows<6){o_caltd="";for(bd=0;bd<7;bd++){o_caltd+="<td width='18' height='16' align='left' valign='top'><img src='images/spacer.gif' width='18' height='16' /></td>";}o_caltr=ty_maketr(o_caltd);o_cal+=o_caltr;}o_cal+="</table>";if(i_numcal==0){if(newM==cM&&newY==cY){o_cal1="";}else{o_cal1="<a href='#' id='idcal1' onclick='"+s_jscall+"ty_changeMonths("+i_firstMonth+"-1);"+s_jscall+"preventClose(event);return false;'><img src='images/calender_prev.gif' width='16' height='19' border='0' /></a>";}}else{}o_calbody.innerHTML+=o_cal;i_numcal++;if(i_numcal==numCalendars&&!b_date331){o_cal2="<a href='#' id='idcal2' onclick='"+s_jscall+"ty_changeMonths("+i_firstMonth+"+1);"+s_jscall+"preventClose(event);return false;'><img src='images/calender_nxt.gif' width='16' height='19' border='0' /></a>";}else{o_cal2="";}var monthtable1="<table width='142' border='0' cellspacing='0' cellpadding='0'><tr><td align='left' valign='top' width='5' height='19'><img src='images/spacer.gif' width='5' height='19' border='0' /></td><td width='16' align='left' valign='top'>";var monthtable2="</td><td width='5' align='center' valign='middle' class='style9'><img src='images/spacer.gif' width='5' height='19' border='0' /></td></tr></table>";if(i_numcal<numCalendars){changeTDTOTABLEValue=monthtable1+o_cal1+"</td><td align='center' valign='middle' class='style9'>"+changeTDTOTABLEValue+"</td><td width='16' align='center' valign='middle' class='style9'>&nbsp;"+monthtable2;o_cal1=o_calbody.innerHTML;o_calbody.innerHTML="";o_cal1=o_cal1.replace("RWTCMT",changeTDTOTABLEValue);}else{changeTDTOTABLEValue=monthtable1+"&nbsp;</td><td align='center' valign='middle' class='style9'>"+changeTDTOTABLEValue+"</td><td width='16' align='center' valign='middle' class='style9'>"+o_cal2+monthtable2;o_cal2=o_calbody.innerHTML;o_cal2=o_cal2+"</td></tr></table>";o_calbody.innerHTML="";o_cal2=o_cal2.replace("RWTCMT",changeTDTOTABLEValue);}if(i_numcal<numCalendars){vm_makeCal(newM+1);zzzz++;}else{if(i_firstMonth>newM){newY--;}}if(zzzz%2==0){o_calbody.innerHTML=s_closecal+tableOpen1+o_cal1+tdFor3rdTable+o_cal2+tableClose1;zzzz=1;}}var zzzz=1;function ty_setDate(whatMonth,whatDate,whatTD,whatYear){o_currentDate=whatTD;o_currentDate.className="calDateSel";if(typeof (o_input)=="object"){o_input.value=(s_lang=="us")?(whatMonth+1)+"/"+whatDate+"/"+whatYear:whatDate+"/"+(whatMonth+1)+"/"+whatYear;}else{document.getElementById(a_v_input[0]).selectedIndex=whatMonth;document.getElementById(a_v_input[1]).selectedIndex=whatDate-1;}closeCal();}function hideCalendar(){o_caldiv.style.display="none";if(o_parent){o_parent.className="cbrow";}}function splitDate(s_input,s_mode){this.delimitor=(s_input.indexOf("/")>-1)?"/":(s_input.indexOf(".")>-1)?".":(s_input.indexOf("-")>-1)?"-":(s_input.indexOf(",")>-1)?",":"/";a_input=s_input.split(this.delimitor);this.date=-1;this.month=-1;this.year=-1;if(a_input.length==3&&!isNaN(a_input[0])&&!isNaN(a_input[1])&&!isNaN(a_input[2])){this.month=(s_mode=="us")?parseInt(a_input[0],10)-1:parseInt(a_input[1],10)-1;this.date=(s_mode=="us")?parseInt(a_input[1],10):parseInt(a_input[0],10);this.year=a_input[2];if(this.month>11||this.month<0){this.month=-1;}if(this.date>31||this.month<0){this.date=-1;}i_yrlength=this.year.toString().length;if(i_yrlength==2){this.year="20"+this.year;}if(i_yrlength<1||i_yrlength==3||this.year<cY){this.year=-1;}}}var o_caldiv=0;var t_calcloser=null;function buildDate(s_monthdate){a_monthdate=s_monthdate.split("|");bd_oMonth=document.getElementById(a_monthdate[0]);bd_oDate=document.getElementById(a_monthdate[1]);i_month=bd_oMonth.selectedIndex+1;i_date=bd_oDate.selectedIndex+1;s_date="";s_date=i_month+"/"+i_date+"/";s_date+=(i_month-1<cM)?cY+1:cY;return s_date;}var s_lastinputtype=null;function makeCalendar(v_input,s_from,s_to,s_mode){o_input=v_input;if(document.getElementById(s_from).value==""||document.getElementById(s_from).value=="mm/dd/yyyy"){call_from_date_month=new Date().getMonth()+1;call_from_date_date=new Date().getDate();call_from_date_year=new Date().getFullYear();document.getElementById(s_from).value=call_from_date_month+"/"+call_from_date_date+"/"+call_from_date_year;}if(isPCIE){document.getElementById("calbox").innerHTML='<iframe id="calframe" src="javascript:\'calendar\'" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" src="SSLIframeFixed.html"></iframe>';s_iecalcss="<link rel='STYLESHEET' type='text/css' href='"+document.getElementById("calendarcss").href+"' />";o_califrame=document.getElementById("calframe");calframe.document.open();calframe.document.write("<html><head>"+s_iecalcss+"</head><body id='calbox' class='calendar'></body></html>");calframe.document.close();}i_numcal=0;if(isPCIE){document.getElementById("calframe").className="calframe";}o_calbody=(isPCIE)?calframe.document.getElementById("calbox"):document.getElementById("calbox");o_calbody.innerHTML="";o_udate=(typeof (o_input)=="object")?new splitDate(o_input.value,"us"):new splitDate(buildDate(o_input),"us");a_from=s_from.split("|");v_from=(a_from.length==1)?new splitDate(document.getElementById(s_from).value,s_mode):new splitDate(buildDate(s_from),s_mode);a_to=s_to.split("|");v_to=(a_to.length==2)?new splitDate(buildDate(s_to),s_mode):(document.getElementById(s_to))?new splitDate(document.getElementById(s_to).value,s_mode):new splitDate("",s_mode);d_makefrom=(v_from.month!=-1)?new Date(v_from.year,v_from.month,v_from.date):0;d_maketo=(v_to.month!=-1)?new Date(v_to.year,v_to.month,v_to.date):0;switch(b_calinit){case 0:if(o_udate.month!=-1&&o_udate.year!=-1&&o_udate.date!=-1){newY=o_udate.year;newM=o_udate.month;newD=o_udate.date;vm_makeCal(o_udate.month);}else{if(o_udate!=document.getElementById(s_from)&&d_makefrom){newY=v_from.year;newM=v_from.month;newD=v_from.date;vm_makeCal(v_from.month);}else{if(o_udate!=document.getElementById(s_to)&&d_maketo){newY=v_to.year;newM=v_to.month;newD=v_to.date;vm_makeCal(v_to.month);}else{newY=cY;newM=cM;newD=cD;vm_makeCal(cM);}}}break;default:switch(s_inputtype){case"object":newM=i_ofirstMonth;newY=i_ofirstYear;break;default:newM=i_sfirstMonth;newY=i_sfirstYear;}vm_makeCal(newM);}s_lastinputtype=typeof (o_input);}var p,EX1,EX2,EY1,EY2;function openCal(v_input,s_from,s_to,s_cal,s_parent,s_mode,s_caldir,pos1,pos2,imageName){flgDorR=imageName;flgRetName=s_from;var retLocalVar=s_from;var dpDtStr="";cM=today.getMonth();cY=today.getFullYear();if(document.flightSearchRTForm){for(i=0;i<document.flightSearchRTForm.elements.length;i++){if(document.flightSearchRTForm.elements[i].name=="flightSearch.depDate.MMDDYYYY"){dpDtStr=document.flightSearchRTForm.elements[i].value;}}}if(imageName=="Return_date.gif"||(retLocalVar=="flightSearch.returnDateMC.MMDDYYYY")){if(dpDtStr==""||dpDtStr=="mm/dd/yyyy"){i_ofirstMonth=new Date().getMonth();flgDateDisable=new Date();}else{flgDateDisable=new Date(dpDtStr);i_ofirstMonth=new Date(dpDtStr).getMonth();cM=i_ofirstMonth;cY=flgDateDisable.getFullYear();}}s_closecal="<table width='303' border='0' cellpadding='0' cellspacing='0'><tr><td width='280' height='22' align='left' valign='top' ><img src='images/"+imageName+"' width='280' height='22' /></td><td width='16' align='left' valign='top' ><a href='#' id='idclose' onclick='"+s_jscall+"closeCal();return false;'><img src='images/view_cross_bt.gif' width='16' height='22' border='0'/></a></td><td width='7' align='left' valign='top' ><img src='images/depart_date_rt.gif' width='7' height='22' /></td></tr>";FieldClicked=v_input.name;displayImage=imageName;if(o_parent){o_parent.className="cbrow";}clearTimeout(t_calcloser);s_inputtype=typeof (v_input);a_v_input=null;calopen=0;o_caldiv=document.getElementById(s_cal);o_caldiv.style.display="block";o_caldiv.className="calboxon";makeCalendar(v_input,s_from,s_to,s_mode);o_inputright=v_input;o_parent=document.getElementById(s_parent);o_cal=document.getElementById(s_cal);o_parent.className+=" cbrowon";i_calx=parseInt(o_inputright.offsetLeft)+parseInt(o_inputright.offsetWidth);i_caly=parseInt(o_parent.offsetTop)+(parseInt(o_parent.offsetHeight)/2)-(parseInt(o_cal.offsetHeight)/2);p=getXandY(v_input);EX1=p.x;EX2=(v_input.offsetWidth-pos1+EX1)+"px";EY1=p.y;EY2=EY1;o_cal.style.left=EX2;o_cal.style.top=(EY2+pos2-23)+"px";setTimeout("calopen = 1",100);}function closeCal(){if(o_caldiv&&calopen){t_calcloser=setTimeout("hideCalendar()",100);if(FieldClicked=="flightSearch.depDate.MMDDYYYY"&&document.flightSearchOWForm!=null&&document.flightSearchMCForm!=null){dateRT();}else{if(FieldClicked=="flightSearch.returnDate.MMDDYYYY"&&document.flightSearchMCForm!=null){dateReturnRT();}else{if(FieldClicked=="flightSearch.depDateOW.MMDDYYYY"&&document.flightSearchRTForm!=null&&document.flightSearchMCForm!=null){dateOW();}else{if(FieldClicked=="flightSearch.depDateMC.MMDDYYYY"&&document.flightSearchRTForm!=null&&document.flightSearchOWForm!=null){dateMC();}else{if(FieldClicked=="flightSearch.depDateMC.MMDDYYYY"&&document.flightSearchRTForm!=null&&document.flightSearchOWForm!=null){dateMC();}else{if(FieldClicked=="flightSearch.returnDateMC.MMDDYYYY"&&document.flightSearchRTForm!=null){dateReturnMC();}else{}}}}}}}calopen=0;}window.onclick=closeCal;window.document.onclick=closeCal;function chkBagsAction(chkBtn){if(chk!="cancelAction"){ShowCheckBags();}else{onBackShowPnrHome();}document.getElementById("bagAddition").style.display="none";}function showPopUp(chkBtn){chk="cancelAction";document.getElementById("bagAddition").style.display="block";showLoadingImageOpen("continue");}function showPopUpContinue(thisId){if(chkExccessbags=="true"){var X;var Y;var c=getAnchorPosition(thisId.id);X=c.x;Y=c.y-30;document.getElementById("bagAddition").style.left=X-150;document.getElementById("bagAddition").style.top=Y;document.getElementById("bagAddition").style.display="block";}else{ShowCheckBags();}}function disable(tabId){document.getElementById(tabId).innerHTML="<img src='images/Travel_mng_red.gif'>";}function hide(arg){document.getElementById(arg).style.display="none";}function show(arg1){document.getElementById(arg1).style.display="block";}function setFreeBags(Free_Bags){allowFree_Bags=Free_Bags;}function getTotalSubDep(totalSubDep){TotalSubDep=TotalSubDep;}function getTotalSelectValue(TSV){TotalSelectValue=TSV;}function getTotalSelectValueRet(TSV){TotalSelectValueRet=TSV;}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"");};var ajaxDepTotal="";function callCalCulateAmountURL(chkURL,totalGuests,OandDInd,cabinClass){var guestNos;var guestBags="";var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();if(chkURL=="depURL"){var guestNos=totalGuests;for(loop=0;loop<totalGuests;loop++){objname="checkInTotalBags1.totalBags"+"["+loop+"]";objvalue=document.checkInExtraPayForm.elements[objname].value;guestBags=guestBags+","+objvalue;}}if(chkURL=="retURL"){var guestNos=totalGuests;for(loop=0;loop<totalGuests;loop++){objname="checkInTotalBags1.bags["+OandDInd+"].bagsName["+loop+"]";objvalue=document.checkInExtraPayForm.elements[objname].value;guestBags=guestBags+","+objvalue;}}var myurl="calulateTotalBagAmount.do?method=calCulateAmount&totalGuest="+guestNos+"&totalBags="+guestBags+"&chkUrl="+chkURL+"&cabinClass="+cabinClass+"&OandDInd="+OandDInd;myurl=myurl+"&dummy="+dummy;xmlhttp.open("GET",myurl,true);xmlhttp.onreadystatechange=handleResponseForAmount;xmlhttp.send("");window.focus();}function handleResponseForAmount(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){if((xmlhttp.responseText).trim()=="AjaxSessionTimeOut"){window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{if((xmlhttp.responseText).indexOf("Error_Bar_v1.gif")==-1){document.getElementById("loadingDiv").style.display="none";document.getElementById("travelupdate").innerHTML=xmlhttp.responseText;document.getElementById("errorOnChkInBags").style.display="none";document.getElementById("conBtnShow").style.display="block";document.getElementById("conBtnHide").style.display="none";}else{document.getElementById("loadingDiv").style.display="none";document.getElementById("errorOnChkInBags").innerHTML=xmlhttp.responseText;document.getElementById("errorOnChkInBags").style.display="block";if(document.checkInExtraPayForm.elements["checkInTotalBags1.totalBags[0]"]){for(loop=0;loop<10;loop++){objname="checkInTotalBags1.totalBags"+"["+loop+"]";if(document.checkInExtraPayForm.elements[objname]){document.checkInExtraPayForm.elements[objname].options[0].selected="selected";}}}if(document.checkInExtraPayForm.elements["checkInTotalBags1.totalBags1[0]"]){for(loop=0;loop<10;loop++){objname="checkInTotalBags1.totalBags1"+"["+loop+"]";if(document.checkInExtraPayForm.elements[objname]){document.checkInExtraPayForm.elements[objname].options[0].selected="selected";}}}document.getElementById("conBtnShow").style.display="none";document.getElementById("conBtnHide").style.display="block";}}}}}var checkval="undefined";function ShowCheckBags_updated(){checkInExtraPayForm.submit();document.getElementById("conBtnShow").style.display="none";document.getElementById("conBtnHide").style.display="block";}function setDefaultTab(tabID){hide("divVI");hide("divCHF");hide("divCF");show(tabID);}var redid="";function setDefTab(redid){if(redid=="tripid"){document.getElementById(redid).src="images/your_trip_red.gif";}if(redid=="chid"){document.getElementById(redid).src="images/change_flight_red.gif";}if(redid=="canid"){document.getElementById(redid).src="images/cancel_flight_red.gif";}}var tripid1="";var chid1="";var canid1="";function changePIC(tripid1,chid1,canid1){document.getElementById(tripid1).src="images/your_trip_grey.gif";document.getElementById(chid1).src="images/change_flight_grey.gif";document.getElementById(canid1).src="images/cancel_flight_grey.gif";}function setDiv(divID){document.getElementById("tripid").style.display="none";document.getElementById("chid").style.display="none";document.getElementById("canid").style.display="none";document.getElementById(divID).style.display="block";}function onBackShowPnrHome(){document.checkInExtraPayForm.method.value="managePnr";document.checkInExtraPayForm.action="yourTrip.do";document.checkInExtraPayForm.submit();}function originRT(){for(i=0;i<document.flightSearchRTForm.elements.length;i++){elementName=document.flightSearchRTForm.elements[i].name;if(elementName=="flightSearch.origin"){for(j=0;j<document.flightSearchOWForm.elements.length;j++){elementName2=document.flightSearchOWForm.elements[j].name;if(elementName2=="flightSearch.origin"){document.flightSearchOWForm.elements[j].selectedIndex=document.flightSearchRTForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.origin"){document.flightSearchMCForm.elements[k].selectedIndex=document.flightSearchRTForm.elements[i].selectedIndex;break;}}break;}}}function DestinationRT(){for(i=0;i<document.flightSearchRTForm.elements.length;i++){elementName=document.flightSearchRTForm.elements[i].name;if(elementName=="flightSearch.destination"){for(j=0;j<document.flightSearchOWForm.elements.length;j++){elementName2=document.flightSearchOWForm.elements[j].name;if(elementName2=="flightSearch.destination"){document.flightSearchOWForm.elements[j].selectedIndex=document.flightSearchRTForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.destination"){document.flightSearchMCForm.elements[k].selectedIndex=document.flightSearchRTForm.elements[i].selectedIndex;break;}}break;}}}function originOW(){for(i=0;i<document.flightSearchOWForm.elements.length;i++){elementName=document.flightSearchOWForm.elements[i].name;if(elementName=="flightSearch.origin"){for(j=0;j<document.flightSearchRTForm.elements.length;j++){elementName2=document.flightSearchRTForm.elements[j].name;if(elementName2=="flightSearch.origin"){document.flightSearchRTForm.elements[j].selectedIndex=document.flightSearchOWForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.origin"){document.flightSearchMCForm.elements[k].selectedIndex=document.flightSearchOWForm.elements[i].selectedIndex;break;}}break;}}}function DestinationOW(){for(i=0;i<document.flightSearchOWForm.elements.length;i++){elementName=document.flightSearchOWForm.elements[i].name;if(elementName=="flightSearch.destination"){for(j=0;j<document.flightSearchRTForm.elements.length;j++){elementName2=document.flightSearchRTForm.elements[j].name;if(elementName2=="flightSearch.destination"){document.flightSearchRTForm.elements[j].selectedIndex=document.flightSearchOWForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.destination"){document.flightSearchMCForm.elements[k].selectedIndex=document.flightSearchOWForm.elements[i].selectedIndex;break;}}break;}}}function originMC(){for(i=0;i<document.flightSearchMCForm.elements.length;i++){elementName=document.flightSearchMCForm.elements[i].name;if(elementName=="flightSearch.origin"){for(j=0;j<document.flightSearchOWForm.elements.length;j++){elementName2=document.flightSearchOWForm.elements[j].name;if(elementName2=="flightSearch.origin"){document.flightSearchOWForm.elements[j].selectedIndex=document.flightSearchMCForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchRTForm.elements.length;k++){elementName3=document.flightSearchRTForm.elements[k].name;if(elementName3=="flightSearch.origin"){document.flightSearchRTForm.elements[k].selectedIndex=document.flightSearchMCForm.elements[i].selectedIndex;break;}}break;}}}function DestinationMC(){for(i=0;i<document.flightSearchMCForm.elements.length;i++){elementName=document.flightSearchMCForm.elements[i].name;if(elementName=="flightSearch.destination"){for(j=0;j<document.flightSearchOWForm.elements.length;j++){elementName2=document.flightSearchOWForm.elements[j].name;if(elementName2=="flightSearch.destination"){document.flightSearchOWForm.elements[j].selectedIndex=document.flightSearchMCForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchRTForm.elements.length;k++){elementName3=document.flightSearchRTForm.elements[k].name;if(elementName3=="flightSearch.destination"){document.flightSearchRTForm.elements[k].selectedIndex=document.flightSearchMCForm.elements[i].selectedIndex;break;}}break;}}}function dateRT(){for(i=0;i<document.flightSearchRTForm.elements.length;i++){elementName=document.flightSearchRTForm.elements[i].name;if(elementName=="flightSearch.depDate.MMDDYYYY"){for(j=0;j<document.flightSearchOWForm.elements.length;j++){elementName2=document.flightSearchOWForm.elements[j].name;if(elementName2=="flightSearch.depDateOW.MMDDYYYY"){document.flightSearchOWForm.elements[j].value=document.flightSearchRTForm.elements[i].value;break;}}for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.depDateMC.MMDDYYYY"){document.flightSearchMCForm.elements[k].value=document.flightSearchRTForm.elements[i].value;break;}}break;}}}function dateReturnRT(){for(i=0;i<document.flightSearchRTForm.elements.length;i++){elementName=document.flightSearchRTForm.elements[i].name;if(elementName=="flightSearch.returnDate.MMDDYYYY"){for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.returnDateMC.MMDDYYYY"){document.flightSearchMCForm.elements[k].value=document.flightSearchRTForm.elements[i].value;break;}}break;}}}function dateReturnMC(){for(i=0;i<document.flightSearchRTForm.elements.length;i++){elementName=document.flightSearchMCForm.elements[i].name;if(elementName=="flightSearch.returnDateMC.MMDDYYYY"){for(k=0;k<document.flightSearchRTForm.elements.length;k++){elementName3=document.flightSearchRTForm.elements[k].name;if(elementName3=="flightSearch.returnDate.MMDDYYYY"){document.flightSearchRTForm.elements[k].value=document.flightSearchMCForm.elements[i].value;break;}}break;}}}function dateOW(){for(i=0;i<document.flightSearchOWForm.elements.length;i++){elementName=document.flightSearchOWForm.elements[i].name;if(elementName=="flightSearch.depDateOW.MMDDYYYY"){for(j=0;j<document.flightSearchRTForm.elements.length;j++){elementName2=document.flightSearchRTForm.elements[j].name;if(elementName2=="flightSearch.depDate.MMDDYYYY"){document.flightSearchRTForm.elements[j].value=document.flightSearchOWForm.elements[i].value;break;}}for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.depDateMC.MMDDYYYY"){document.flightSearchMCForm.elements[k].value=document.flightSearchOWForm.elements[i].value;break;}}break;}}}function dateMC(){for(i=0;i<document.flightSearchMCForm.elements.length;i++){elementName=document.flightSearchMCForm.elements[i].name;if(elementName=="flightSearch.depDateMC.MMDDYYYY"){for(j=0;j<document.flightSearchOWForm.elements.length;j++){elementName2=document.flightSearchOWForm.elements[j].name;if(elementName2=="flightSearch.depDateOW.MMDDYYYY"){document.flightSearchOWForm.elements[j].value=document.flightSearchMCForm.elements[i].value;break;}}for(k=0;k<document.flightSearchRTForm.elements.length;k++){elementName3=document.flightSearchRTForm.elements[k].name;if(elementName3=="flightSearch.depDate.MMDDYYYY"){document.flightSearchRTForm.elements[k].value=document.flightSearchMCForm.elements[i].value;break;}}break;}}}function adultRT(){for(i=0;i<document.flightSearchRTForm.elements.length;i++){elementName=document.flightSearchRTForm.elements[i].name;if(elementName=="flightSearch.adults"){for(j=0;j<document.flightSearchOWForm.elements.length;j++){elementName2=document.flightSearchOWForm.elements[j].name;if(elementName2=="flightSearch.adults"){document.flightSearchOWForm.elements[j].selectedIndex=document.flightSearchRTForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.adults"){document.flightSearchMCForm.elements[k].selectedIndex=document.flightSearchRTForm.elements[i].selectedIndex;break;}}break;}}}function adultOW(){for(i=0;i<document.flightSearchOWForm.elements.length;i++){elementName=document.flightSearchOWForm.elements[i].name;if(elementName=="flightSearch.adults"){for(j=0;j<document.flightSearchRTForm.elements.length;j++){elementName2=document.flightSearchRTForm.elements[j].name;if(elementName2=="flightSearch.adults"){document.flightSearchRTForm.elements[j].selectedIndex=document.flightSearchOWForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.adults"){document.flightSearchMCForm.elements[k].selectedIndex=document.flightSearchOWForm.elements[i].selectedIndex;break;}}break;}}}function adultMC(){for(i=0;i<document.flightSearchMCForm.elements.length;i++){elementName=document.flightSearchMCForm.elements[i].name;if(elementName=="flightSearch.adults"){for(j=0;j<document.flightSearchOWForm.elements.length;j++){elementName2=document.flightSearchOWForm.elements[j].name;if(elementName2=="flightSearch.adults"){document.flightSearchOWForm.elements[j].selectedIndex=document.flightSearchMCForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchRTForm.elements.length;k++){elementName3=document.flightSearchRTForm.elements[k].name;if(elementName3=="flightSearch.adults"){document.flightSearchRTForm.elements[k].selectedIndex=document.flightSearchMCForm.elements[i].selectedIndex;break;}}break;}}}function childRT(){for(i=0;i<document.flightSearchRTForm.elements.length;i++){elementName=document.flightSearchRTForm.elements[i].name;if(elementName=="flightSearch.kids"){for(j=0;j<document.flightSearchOWForm.elements.length;j++){elementName2=document.flightSearchOWForm.elements[j].name;if(elementName2=="flightSearch.kids"){document.flightSearchOWForm.elements[j].selectedIndex=document.flightSearchRTForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.kids"){document.flightSearchMCForm.elements[k].selectedIndex=document.flightSearchRTForm.elements[i].selectedIndex;break;}}break;}}}function childOW(){for(i=0;i<document.flightSearchOWForm.elements.length;i++){elementName=document.flightSearchOWForm.elements[i].name;if(elementName=="flightSearch.kids"){for(j=0;j<document.flightSearchRTForm.elements.length;j++){elementName2=document.flightSearchRTForm.elements[j].name;if(elementName2=="flightSearch.kids"){document.flightSearchRTForm.elements[j].selectedIndex=document.flightSearchOWForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchMCForm.elements.length;k++){elementName3=document.flightSearchMCForm.elements[k].name;if(elementName3=="flightSearch.kids"){document.flightSearchMCForm.elements[k].selectedIndex=document.flightSearchOWForm.elements[i].selectedIndex;break;}}break;}}}function childMC(){for(i=0;i<document.flightSearchMCForm.elements.length;i++){elementName=document.flightSearchMCForm.elements[i].name;if(elementName=="flightSearch.kids"){for(j=0;j<document.flightSearchOWForm.elements.length;j++){elementName2=document.flightSearchOWForm.elements[j].name;if(elementName2=="flightSearch.kids"){document.flightSearchOWForm.elements[j].selectedIndex=document.flightSearchMCForm.elements[i].selectedIndex;break;}}for(k=0;k<document.flightSearchRTForm.elements.length;k++){elementName3=document.flightSearchRTForm.elements[k].name;if(elementName3=="flightSearch.kids"){document.flightSearchRTForm.elements[k].selectedIndex=document.flightSearchMCForm.elements[i].selectedIndex;break;}}break;}}}function Get_Cookie(name){var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if((!start)&&(name!=document.cookie.substring(0,name.length))){return null;}if(start==-1){return null;}var end=document.cookie.indexOf(";",len);if(end==-1){end=document.cookie.length;}return unescape(document.cookie.substring(len,end));}function Set_Cookie(name,value,expires,path,domain,secure){var today=new Date();today.setTime(today.getTime());if(expires){expires=expires*1000*60*60*24;}var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+((expires)?";expires="+expires_date.toGMTString():"")+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+((secure)?";secure":"");}function Delete_Cookie(name,path,domain){if(Get_Cookie(name)){document.cookie=name+"="+((path)?";path="+path:"")+((domain)?";domain="+domain:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT";}}function discookie(){var gg=Get_Cookie("cv");}function test(name){if(X==0){var c=getAnchorPosition(name);X=c.x;Y=c.y+25;}}function winresize(){if(document.getElementById("BF_middle").style.display=="block"){X=0;}else{var c=getAnchorPosition("tab1");X=c.x;Y=c.y+25;var x=document.getElementById("travel_id");x.style.left=X;x.style.top=Y;x.style.position="absolute";}}function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++){x.src=x.oSrc;}}function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p){d.MM_p=new Array();}var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++){if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}}function MM_findObj(n,d){var p,i,x;if(!d){d=document;}if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}if(!(x=d[n])&&d.all){x=d.all[n];}for(i=0;!x&&i<d.forms.length;i++){x=d.forms[i][n];}for(i=0;!x&&d.layers&&i<d.layers.length;i++){x=MM_findObj(n,d.layers[i].document);}if(!x&&d.getElementById){x=d.getElementById(n);}return x;}function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3){if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc){x.oSrc=x.src;}x.src=a[i+2];}}}function divhideFunction(divID,arg1,frmVal,timeVal){if(document.getElementById("fltStatusvalidationErrorDiv")){document.getElementById("fltStatusvalidationErrorDiv").style.display="none";}if(disableIds==0){var x=document.getElementById(divID);if(x.style.display=="block"){document.getElementById("promo").style.display="block";document.getElementById("spacerrow").style.display="none";document.getElementById("homeErrorMessageDiv").style.display="none";if(document.getElementById("main_validation_msg_panel")){stopBlink("main_validation_msg_panel");}maxheight=240;c2=setInterval("hideLayerSmooth('"+divID+"',"+frmVal+")",timeVal);iswap=0;}else{if(x.style.display=="none"||x.style.display==""){x.style.display="block";document.getElementById("travel_id").style.display="none";document.getElementById("travelmanager").src="images/travelMananger.gif";document.getElementById("flightstatus").src="images/flightstatus_head_default.gif";document.getElementById("spacerrow").style.display="block";document.getElementById("colExp").src="images/bookflight_head_default_dow.gif";document.getElementById("homeErrorMessageDiv").style.display="block";document.getElementById("flightstatus_id").style.display="none";if(document.getElementById("travelvalidationErrorDiv")){document.getElementById("travelvalidationErrorDiv").style.display="none";}maxheight=240;linkCnt=1;if(arg1!="errorOnPage"){document.getElementById(divID).style.height=1;document.getElementById(divID).style.overflow="hidden";c1=setInterval("showLayerSmooth('"+divID+"',"+frmVal+")",timeVal);}else{document.getElementById(divID).style.height=240;document.getElementById(divID).style.overflow="visible";document.getElementById("promo").style.display="none";}iswap=1;}}}}function showLayerSmooth(divID,jumpFrameValue){var height=parseInt(document.getElementById(divID).style.height);if(height>=maxheight){clearInterval(c1);if(divID=="BF_middle"){document.getElementById(divID).style.overflow="visible";document.getElementById(divID).style.height=240;document.getElementById("promo").style.display="none";}maxheight=1;}else{linkCnt+=jumpFrameValue;document.getElementById(divID).style.height=linkCnt;}}function hideLayerSmooth(divID,jumpFrameValue){height=parseInt(document.getElementById(divID).style.height);if(divID=="BF_middle"){document.getElementById("colExp").src="images/bookflight_head_default.gif";}if(divID=="travel_id"){document.getElementById("travelmanager").src="images/travelMananger.gif";}if(divID=="flightstatus_id"){document.getElementById("flightstatus").src="images/flightstatus_head_default.gif";}if(height<=1){document.getElementById(divID).style.display="none";clearInterval(c2);}else{if(divID=="BF_middle"){document.getElementById(divID).style.overflow="hidden";}document.getElementById(divID).style.height=linkCnt;linkCnt-=jumpFrameValue;if(linkCnt<=0){linkCnt=1;}}}function divhideTravel(divTravel,arg1,frmVal,timeVal){if(document.getElementById("fltStatusvalidationErrorDiv")){document.getElementById("fltStatusvalidationErrorDiv").style.display="none";}document.getElementById("flightstatus").src="images/flightstatus_head_default.gif";if(disableIds==0){var x=document.getElementById(divTravel);if(x.style.display=="block"){maxheight=282;linkCnt=282;c2=setInterval("hideLayerSmooth('"+divTravel+"',"+frmVal+")",timeVal);if(document.getElementById("travelvalidationErrorDiv")){document.getElementById("travelvalidationErrorDiv").style.display="none";}}else{document.getElementById("travelmanager").src="images/travelMananger_roll.gif";if(document.getElementById("BF_middle").style.display=="block"){document.getElementById("BF_middle").style.display="none";document.getElementById("promo").style.display="block";document.getElementById("spacerrow").style.display="none";document.getElementById("colExp").src="images/bookflight_head_default.gif";document.getElementById("homeErrorMessageDiv").style.display="none";if(document.getElementById("main_validation_msg_panel")){stopBlink("main_validation_msg_panel");}iswap=0;}document.getElementById("flightstatus_id").style.display="none";x.style.display="block";maxheight=282;linkCnt=1;if(arg1!="errorOnPage"){document.getElementById(divTravel).style.height=1;c1=setInterval("showLayerSmooth('"+divTravel+"',"+frmVal+")",timeVal);}else{document.getElementById(divTravel).style.height=285;}if(document.getElementById("travelvalidationErrorDiv")){document.getElementById("travelvalidationErrorDiv").style.display="block";}}}}function divHideFlightStatus(divFlightStatus,arg1,frmVal,timeVal){document.getElementById("travelmanager").src="images/travelMananger.gif";if(disableIds==0){var x=document.getElementById(divFlightStatus);if(x.style.display=="block"){maxheight=225;linkCnt=225;c2=setInterval("hideLayerSmooth('"+divFlightStatus+"',"+frmVal+")",timeVal);if(document.getElementById("fltStatusvalidationErrorDiv")){document.getElementById("fltStatusvalidationErrorDiv").style.display="none";}}else{document.getElementById("flightstatus").src="images/flightstatus_head_roll.gif";if(document.getElementById("BF_middle").style.display=="block"){document.getElementById("BF_middle").style.display="none";document.getElementById("homeErrorMessageDiv").style.display="none";document.getElementById("promo").style.display="block";document.getElementById("spacerrow").style.display="none";document.getElementById("colExp").src="images/bookflight_head_default.gif";iswap=0;}if(document.getElementById("travelvalidationErrorDiv")){document.getElementById("travelvalidationErrorDiv").style.display="none";}document.getElementById("travel_id").style.display="none";x.style.display="block";maxheight=225;linkCnt=1;if(arg1!="errorOnPage"){document.getElementById(divFlightStatus).style.height=1;c1=setInterval("showLayerSmooth('"+divFlightStatus+"',"+frmVal+")",timeVal);}else{document.getElementById(divFlightStatus).style.height=285;document.getElementById("flightstatus").src="images/flightstatus_head_roll.gif";}if(document.getElementById("fltStatusvalidationErrorDiv")){document.getElementById("fltStatusvalidationErrorDiv").style.display="block";}}}}function loadswapvar(th){if(disableIds==0){MakeCursor(th);if(iswap==0){MM_swapImage("bookflight","","images/bf_head_roll_arrow_down.gif",1);}}}function chkChange(divID,th){if(disableIds==0){var x=document.getElementById(divID);if(x.style.display=="none"||x.style.display==""){MM_swapImgRestore();}else{if(x.style.display=="block"){MM_swapImage("bookflight","","images/bookflight_head_default_dow.gif",1);}}}SS_MakeCursor(th);}function flightStatusMouseOver(th){if(disableIds==0){MakeCursor(th);var x=document.getElementById("flightstatus_id");if(x.style.display=="none"||x.style.display==""){MM_swapImage("flightstatus","","images/flightstatus_head_roll.gif",1);}}}function flightStatusMouseout(divID){if(disableIds==0){if(document.getElementById("flightstatus_id").style.display!="block"){MM_swapImgRestore();}}}function travelMouseOver(divID){if(disableIds==0){var x=document.getElementById(divID);if(x.style.display=="none"||x.style.display==""){document.getElementById("travelmanager").src="images/travelMananger_roll.gif";}}}function travelMouseOut(divID){if(disableIds==0){var x=document.getElementById(divID);if(x.style.display=="none"||x.style.display==""){document.getElementById("travelmanager").src="images/travelMananger.gif";}}}__flashVisible=true;__errorVisible=false;__isMacFirefox=(navigator.userAgent.indexOf("Firefox")>=0&&navigator.platform.indexOf("Mac")>=0);__isMacSafari=(navigator.vendor!=null&&navigator.vendor.indexOf("Apple")>=0);__isPCIE=(navigator.userAgent.indexOf("MSIE")>=0);var __layerArr=new Array(["bookflights",241,false],["flightstatus",208,false],["travelmanager",265,false]);if(navigator.userAgent.indexOf("Firefox")!=-1){__layerArr[2][1]=261;}function toggleFlash(turnOff,layerNum){var flashPiece=document.getElementById("flashPiece");var flashHide=document.getElementById("flashHide");if(turnOff&&__flashVisible==true){flashHide.style.display="block";flashHide.style.opacity=0;flashHide.style.filter="alpha(opacity=0)";if(__isMacSafari){new Rico.Effect.FadeTo("flashHide",1,0,1,{complete:function(){flashPiece.style.display="none";}});}else{if(__isMacFirefox){flashHide.style.display="none";flashPiece.style.display="none";}else{new Rico.Effect.FadeTo("flashHide",1,200,5,{complete:function(){flashPiece.style.display="none";flashPiece.style.height="0px";flashPiece.style.top="400px";}});}}__flashVisible=false;}else{if(!turnOff&&__flashVisible==false){flashPiece.style.top="240px";flashPiece.style.height="228px";if(__isMacFirefox){turnOnFlashAnim();}else{if(__isMacSafari){setTimeout("turnOnFlash()",0);}else{if(__isPCIE&&layerNum==0){flashPiece.style.display="block";new Rico.Effect.FadeTo("flashHide",0,0,1,{complete:function(){flashHide.style.display="none";}});}else{flashPiece.style.display="block";new Rico.Effect.FadeTo("flashHide",0,200,5,{complete:function(){flashHide.style.display="none";}});}}}__flashVisible=true;}}}function turnOnFlashAnim(){var flashPiece=document.getElementById("flashPiece");var flashHide=document.getElementById("flashHide");flashPiece.style.display="block";new Rico.Effect.FadeTo("flashHide",0,200,5,{complete:function(){flashHide.style.display="none";}});}function turnOnFlash(){var flashPiece=document.getElementById("flashPiece");var flashHide=document.getElementById("flashHide");flashHide.style.display="none";flashPiece.style.display="block";}function toggleLayer(layerNum,layerLink){layerLink.blur();toggleFlash(true,layerNum);layerName=__layerArr[layerNum][0];layerHeight=__layerArr[layerNum][1];layerIsExpanded=__layerArr[layerNum][2];if(layerIsExpanded){contractLayer(layerNum,layerName,layerHeight);}else{var delay=300;if(areLayersRetracted()==false||__isMacSafari){delay=0;}setTimeout("expandLayer('"+layerNum+"', '"+layerName+"', '"+layerHeight+"')",delay);}}function contractLayer(layerNum,layerName,height){new Rico.Effect.Size(layerName+"content",null,1,200,10);__layerArr[layerNum][2]=false;if(areLayersRetracted()){setTimeout("toggleFlash(false,'"+layerNum+"')",300);}}function expandLayer(layerNum,layerName,height){new Rico.Effect.Size(layerName+"content",null,height,200,10);__layerArr[layerNum][2]=true;if(document.getElementById("homeErrorMessageDiv")&&layerNum==0){document.getElementById("homeErrorMessageDiv").style.display="block";}if(document.getElementById("travelvalidationErrorDiv")&&layerNum==2){document.getElementById("travelvalidationErrorDiv").style.display="block";}if(document.getElementById("fltStatusvalidationErrorDiv")&&layerNum==1){document.getElementById("fltStatusvalidationErrorDiv").style.display="block";}for(i=0;i<__layerArr.length;i++){layerIsExpanded=__layerArr[i][2];if(i!=layerNum&&layerIsExpanded){layerName=__layerArr[i][0];new Rico.Effect.Size(layerName+"content",null,1,200,10);__layerArr[i][2]=false;}}}function areLayersRetracted(){numberRetracted=0;for(i=0;i<__layerArr.length;i++){if(__layerArr[i][2]==false){numberRetracted++;}}return(numberRetracted>=__layerArr.length);}function toggleError(){if(__errorVisible==false){new Rico.Effect.Size("errormessage",null,1,200,10);}}function moveBottomLayers(yAmt){new Rico.Effect.Position(__layerArr[1][0],null,yAmt,200,10);new Rico.Effect.Position(__layerArr[2][0],null,yAmt,200,10);}function checkform(formCheck){hasError=false;errorHTML="";elem=formCheck.elements;for(var i=0;i<elem.length;i++){field_header=document.getElementById("roundtrip_"+elem[i].name);outline_div=document.getElementById(elem[i].name+"_outline");if(elem[i].value.length<=0){errorHTML+=elem[i].name.toUpperCase()+" field is required, ";outline_div.className="outlineOn";if(__isMacSafari&&elem[i].type.indexOf("text")>=0){outline_div.style.height="18px";outline_div.style.width="177px";}else{if(__isMacSafari){outline_div.style.height="15px";}}elem[i].style.color="#73308F";field_header.style.color="#73308F";field_header.style.backgroundImage='url("images/error_callout.gif")';hasError=true;}else{outline_div.className="outlineOff";field_header.style.color="#000000";elem[i].style.color="#d10103";field_header.style.backgroundImage="none";}}errorYOffset=0;if(hasError){errorYOffset=28;__layerArr[0][1]=241+errorYOffset;error_area=document.getElementById("errormessage_txt");error_area.innerHTML=errorHTML.substring(0,errorHTML.length-2);__errorVisible=true;}else{__layerArr[0][1]=241;__errorVisible=false;}new Rico.Effect.Size("errormessage",null,errorYOffset,200,10);new Rico.Effect.Size("bookflightscontent",null,__layerArr[0][1],200,10);moveBottomLayers(422+errorYOffset);}__error_area=null;__incrError=1;__errorOpac=100;function glowError(){if(__error_area==null){__error_area=document.getElementById("errormessage_txt");}__error_area.style.opacity=__errorOpac/100;__error_area.style.filter="alpha(opacity="+__errorOpac+")";if(__errorOpac+3>=100){__incrError=-3;}if(__errorOpac-3<=50){__incrError=3;}__errorOpac+=__incrError;setTimeout("glowError()",75);}function checkClick(lyrName){if((document.getElementById(lyrName).style.display=="none")||(document.getElementById(lyrName).style.display=="")){document.getElementById(lyrName).style.display="block";}if(((lyrName=="travelmanagercontent")||(lyrName=="flightstatuscontent"))&&document.getElementById("homeErrorMessageDiv")){document.getElementById("homeErrorMessageDiv").style.display="none";}if(((lyrName=="bookflightscontent")||(lyrName=="flightstatuscontent"))&&document.getElementById("travelvalidationErrorDiv")){document.getElementById("travelvalidationErrorDiv").style.display="none";}if(((lyrName=="bookflightscontent")||(lyrName=="travelmanagercontent"))&&document.getElementById("fltStatusvalidationErrorDiv")){document.getElementById("fltStatusvalidationErrorDiv").style.display="none";}if((lyrName=="bookflightscontent")&&document.getElementById(lyrName).style.display=="block"){document.getElementById("imgbookFlight").src="images/bookflight_head_default_dow.gif";}if((lyrName=="flightstatuscontent")&&document.getElementById(lyrName).style.display=="block"){document.getElementById("imgFlightStatus").src="images/flightstatus_head_roll.gif";}if((lyrName=="travelmanagercontent")&&document.getElementById(lyrName).style.display=="block"){document.getElementById("imgTrvMng").src="images/travelMananger_rollN.gif";}}function showRolloverImageInd(imgId,imgName,lyrName1){if((document.getElementById(lyrName1).style.display=="none")||(document.getElementById(lyrName1).style.display=="")){imgId.src="images/"+imgName;}}function restoreImageInd(imgId,imgName,lyrName1){if((document.getElementById(lyrName1).style.display=="none")||(document.getElementById(lyrName1).style.display=="")){imgId.src="images/"+imgName;}}function waitPreloadPage(){if(document.getElementById){document.getElementById("prepage").style.visibility="hidden";}else{if(document.layers){document.prepage.visibility="hidden";}else{document.all.prepage.style.visibility="hidden";}}}function changeURL(){if(self!=top){top.location.replace(window.location.href);}}function submitFormForChangeSeat(indxNum){window.location.href="showChangeSeatMap.do?method=showSeatMapForChange&arrayIndex="+indxNum+"&whichFlightOpen="+document.getElementById("flightStatusArrayForChangeSeat").value+"&whichFlightOpenNotOpen="+document.getElementById("flightStatusArrayForChangeSeatUpdated").value;}function replaceAll(st){var i=st.length;for(var m=0;m<i;m++){if(st.indexOf("/")!=-1){st=st.replace("/","'");}if(st.indexOf("?")!=-1){st=st.replace("?",'"');}}return st;}function printBoardingPassCheckInConfirm(btnId,whichSegment,whichlegNo,selFltNo,ffNumber){var top=10;var left=180;var width=845;var height=700;var guestname;if(btnId.indexOf("/")!=-1){guestname=replaceAll(btnId);}else{if(btnId.indexOf("?")!=-1){guestname=replaceAll(btnId);}else{guestname=btnId;}}var urls="checkInPrintBoardingPassSSL.do?method=printBoardingPass&indexNum="+guestname+"&segmentId="+whichSegment+"&legNo="+whichlegNo+"&flightNo="+selFltNo+"&ffNumber="+ffNumber;mywindow=window.open("/va/html/Virgin_America_Boarding_Pass.html","BoardingPass","toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=no, top="+top+", left="+left+", width="+width+",height="+height);ajaxToGeneratePdf(urls);}function showPrintWindow(){var p=self.print();return p;}var OSDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS";},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1){return data[i].identity;}}else{if(dataProp){return data[i].identity;}}}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1){return ;}return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};function callPBPassForHTML(btnId,oandDId,whichlegNo,flightNo,ffNumber,numberInParty,onHome){var top=10;var left=180;var width=845;var height=700;OSDetect.init();var guestname;var urls="";if(btnId.indexOf("/")!=-1){guestname=replaceAll(btnId);}else{if(btnId.indexOf("?")!=-1){guestname=replaceAll(btnId);}else{guestname=btnId;}}var osdetect=OSDetect.OS;var browserdetect=OSDetect.browser;if(onHome=="onHome"){urls="checkInPrintBoardingPassForHtml.do?method=printBoardingPassForSingleGuest&indexNum=";}else{urls="checkInPrintBoardingPassForHtmlSSL.do?method=printBoardingPassForSingleGuest&indexNum=";}urls=urls+guestname+"&oandDId="+oandDId+"&legNo="+whichlegNo+"&flightNo="+flightNo+"&ffNumber="+ffNumber+"&numberInParty="+numberInParty+"&OSDetect="+osdetect+"&browserdetect="+browserdetect;mywindowForHtml=window.open("/va/html/Virgin_America_Boarding_Pass.html","BoardingPass","toolbar=no,location=no,directories=no,menubar=yes,scrollbars=yes,top="+top+", left="+left+", width="+width+",height="+height);ajaxToGeneratePdfHTML(urls);}function printAllBoardingPassInHTMLView(){var top=10;var left=180;var width=845;var height=700;OSDetect.init();var osdetect=OSDetect.OS;var browserdetect=OSDetect.browser;var urls="checkInPrintBoardingPassSSL.do?method=printAllBoardingPassInHTMLView&indexNum="+"forAllGuest"+"&OSDetect="+osdetect+"&browserdetect="+browserdetect;mywindowForHtml=window.open("/va/html/Virgin_America_Boarding_Pass.html","BoardingPass","toolbar=no,status=yes,menubar=yes,scrollbars=yes,resizable=no, top="+top+", left="+left+", width="+width+",height="+height);ajaxToGeneratePdfHTML(urls);}function ajaxToGeneratePdf(myurl){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponsePrintBoardingPass;xmlhttp.send("");}function ajaxToGeneratePdfHTML(myurl){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponsePrintBoardingPassForHTML;xmlhttp.send("");}function handleResponsePrintBoardingPassForHTML(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){var resText=xmlhttp.responseText;if(resText.trim()=="AjaxSessionTimeOut"){mywindowForHtml.close();window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{if(resText.trim()=="PrintBoardingPassError"){mywindowForHtml.close();if(document.getElementById("PDF_ERROR_MESSAGE_POPUP")){document.getElementById("PDF_ERROR_MESSAGE_POPUP").style.display="block";}}else{var topSSL=10;var leftSSL=180;var widthSSL=845;var heightSSL=700;var fileNameUpdated=resText.replace(/[\r\n]/g,"");mywindowForHtml.document.getElementById("pdfhtml").innerHTML=fileNameUpdated;}}}}}function handleResponsePrintBoardingPass(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){var fileName=xmlhttp.responseText;if(fileName.trim()=="AjaxSessionTimeOut"){mywindow.close();window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{if(fileName.trim()=="PrintBoardingPassError"){mywindow.close();if(document.getElementById("PDF_ERROR_MESSAGE_POPUP")){document.getElementById("PDF_ERROR_MESSAGE_POPUP").style.display="block";}}else{var topSSL=10;var leftSSL=180;var widthSSL=845;var heightSSL=700;var fileNameUpdated=fileName.replace(/[\r\n]/g,"");mywindow.location.pathname=fileNameUpdated;}}}}}function showPrintItinerary(){var disp_setting="toolbar=no,location=no,directories=no,menubar=yes,";disp_setting+="scrollbars=yes,width=650, height=670, left=0, top=0";var urls="checkInPrintItinerary.do?method=printItinerary";window.open(urls,"",disp_setting);}function setPosChkBtn(name){var c=getAnchorPosition(name.id);X=c.x;Y=c.y+25;}function insertGuestSeat(num,gu,ss){gnum=num;var ind=num;var guest=gu;var seat=ss;guestArray[ind]=guest;seatArray[ind]=seat;}function insertGuestSeat1(num,gu,ss){gnumRet=num;var ind=num;var guest=gu;var seat=ss;guestArrayRet[ind]=guest;seatArrayRet[ind]=seat;}function insertDepConnectGuestSeat(num,ss){seatDepConnectArray[num]=ss;}function insertRetConnectGuestSeat(num,ss){seatRetConnectArray[num]=ss;}function ShowCheckBags1(e){checkInBagForm.submit();}var thisId;function CheckInInfoPopUp(buttonId){thisId=buttonId;var X;var Y;var c=getAnchorPosition(thisId.id);X=c.x;Y=c.y+25;document.getElementById("CheckInInFo").style.left=X-50;document.getElementById("CheckInInFo").style.top=Y-30;document.getElementById("CheckInInFo").style.display="block";}function showElevateExpPopUp(buttonId,popupId){getAnchorXY(buttonId);document.getElementById(popupId).style.left=X1-50;document.getElementById(popupId).style.top=Y1-30;document.getElementById(popupId).style.display="block";}function ShowCheckBags(thisId){document.getElementById("CheckInInFo").style.display="none";var X;var Y;var c=getAnchorPosition(thisId.id);X=c.x;Y=c.y+25;if(alreadyCheckedInDep=="false"){if(checkval=="undefined"){document.checkInBagForm.checkChange.value="no";}checkInBagForm.submit();}else{document.getElementById("alreadyCheckedIn").style.left=X-100;document.getElementById("alreadyCheckedIn").style.top=Y-30;document.getElementById("alreadyCheckedIn").style.display="block";}}var guestTypeArr=new Array();var gFNameArr=new Array();var gLNameArr=new Array();var ins=0;var rins=0;var guestNumberInParty="";var guestRetNumberInParty="";var OandDSize=0;function checkInClickIt(thisobj,whichLeg,OandDInd,flightNo,num,numberInParty,guestStatus){if(guestStatus=="checkInRestricted"){setPosition(thisobj,document.getElementById("petSSRMsgId"),-20,20);document.getElementById("petSSRMsgId").style.display="block";if(thisobj.checked){thisobj.checked=false;}}else{var s=new Array();var checkBoxId="";var checkBox="";var guestId="";var guestObj="";var selGuestsId="";var selGuests="";var seatId="";var seatObj="";var selSeatsId="";var selSeats="";var connSeatId="";var connSeatObj="";var selConnSeatsId="";var selConnSeats="";var selNumInParId="";var selRewNoId="";var selEleVAId="";var eleVAIdObj="";var selRewardNos="";var RowNum="Row"+OandDInd;var RowNumRet="Row#"+OandDInd;var x=document.checkInBagForm;var guestNumberInParty="";var numInPartyId="";var guestseqno="";var selGTId="";var selGTId="";var eleGTObj="";var guestType="";for(i=0;i<guestSize;i++){if(whichLeg=="Depart"){checkBoxId="DepRow"+i;}else{checkBoxId="Ret"+RowNum+i;}checkBox=document.getElementById(checkBoxId);if(checkBox!=null){if(checkBox.checked){checkval=checkBox;if(whichLeg=="Depart"){guestId="depRow#"+i;seatId="depSeatRow"+i;connSeatId="depSeatConnRow"+i;selEleVAId="depEleVARow"+i;}else{guestId="ret"+RowNumRet+i;seatId="seat"+RowNum+i;connSeatId="seatConn"+RowNum+i;selEleVAId="retEleVARow"+OandDInd+i;}guestNumberInParty=guestNumberInParty+";"+numInPartyArray[OandDInd].split(";")[i];var selGname=gFNameArr[i]+"_"+gLNameArr[i];selGuests=selGuests+";"+selGname;seatObj=document.getElementById(seatId).innerHTML;selSeats=selSeats+";"+seatObj;if(document.getElementById(connSeatId)){connSeatObj=document.getElementById(connSeatId).innerHTML;selConnSeats=selConnSeats+";"+connSeatObj;}if(document.getElementById(selEleVAId)){eleVAIdObj=document.getElementById(selEleVAId).innerHTML;selRewardNos=selRewardNos+";"+eleVAIdObj;}else{selRewardNos=selRewardNos+";"+" ";}guestType=guestType+";"+guestTypeArr[i];document.checkInBagForm.checkChange.value="checked";}}}if(whichLeg=="Depart"){selGuestsId="checkInTotalBags.depLeg1";selSeatsId="checkInTotalBags.depLeg1Seat";selConnSeatsId="checkInTotalBags.depLeg2Seat";numInPartyId="checkInTotalBags.strDepNumberInParty";selRewNoId="checkInTotalBags.rewNumDep";selGTId="checkInTotalBags.depGuestType";x.elements[selGTId].value=guestType;x.elements[numInPartyId].value=guestNumberInParty;}else{selGuestsId="checkInTotalBags.selGuests["+(OandDInd-1)+"]";selSeatsId="checkInTotalBags.selSeats["+(OandDInd-1)+"]";selConnSeatsId="checkInTotalBags.selConnSeats["+(OandDInd-1)+"]";selNumInParId="checkInTotalBags.selNumInParty["+(OandDInd-1)+"]";selRewNoId="checkInTotalBags.selRewNos["+(OandDInd-1)+"]";selGTId="checkInTotalBags.selGuestType["+(OandDInd-1)+"]";x.elements[selGTId].value=guestType;x.elements[selNumInParId].value=guestNumberInParty;}x.elements[selGuestsId].value=selGuests;x.elements[selSeatsId].value=selSeats;if(document.getElementById(connSeatId)){x.elements[selConnSeatsId].value=selConnSeats;}x.elements["checkInTotalBags.depSelect"].value="notSelect";if(whichLeg!="Depart"){x.elements["checkInTotalBags.retSelect"].value="notSelect";}x.elements[selRewNoId].value=selRewardNos;for(i=0;i<OandDSize;i++){for(k=0;k<guestSize;k++){if(i==0){checkBoxId="DepRow"+k;}else{checkBoxId="RetRow"+i+k;}checkBox=document.getElementById(checkBoxId);if(checkBox!=null){if(checkBox.checked){if(i==0){x.elements["checkInTotalBags.depSelect"].value="select";}else{x.elements["checkInTotalBags.retSelect"].value="select";}break;}}}}if(x.elements["checkInTotalBags.depSelect"].value=="notSelect"&&(x.elements["checkInTotalBags.retSelect"].value=="notSelect"||x.elements["checkInTotalBags.retSelect"].value=="")){checkval="undefined";}}}function disable(tabId){document.getElementById(tabId).innerHTML="<img src='images/Travel_mng_red.gif'/>";}function hide(arg){document.getElementById(arg).style.display="none";}function show(arg1){document.getElementById(arg1).style.display="block";}function setDefaultTab(tabID){hide("divVI");hide("divCHF");hide("divCF");show(tabID);}var redid="";function setDefTab(redid){if(redid=="tripid"){document.getElementById(redid).src="images/your_trip_red.gif";}if(redid=="chid"){document.getElementById(redid).src="images/change_flight_red.gif";}if(redid=="canid"){document.getElementById(redid).src="images/cancel_flight_red.gif";}}var tripid1="";var chid1="";var canid1="";function changePIC(tripid1,chid1,canid1){document.getElementById(tripid1).src="images/your_trip_grey.gif";document.getElementById(chid1).src="images/change_flight_grey.gif";document.getElementById(canid1).src="images/cancel_flight_grey.gif";}function setDiv(divID){document.getElementById("tripid").style.display="none";document.getElementById("chid").style.display="none";document.getElementById("canid").style.display="none";document.getElementById(divID).style.display="block";}function ajaxPnrDisplay(myurl,div,id){ajaxDiv=div;if(ajaxDiv=="body"){setPosition(id,document.getElementById("loadingDiv"),50,50);document.getElementById("loadingDiv").style.display="block";}document.getElementById("loadingDiv").style.display="block";xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;ajaxDiv=div;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponsePnrDisplay;xmlhttp.send("");}function handleResponsePnrDisplay(){var ind=-1;if(xmlhttp.readyState==4){if(xmlhttp.status==200){var PNRResponseText=xmlhttp.responseText;document.getElementById("loadingDiv").style.display="none";if(PNRResponseText.trim()=="AjaxSessionTimeOut"){window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{if(PNRResponseText.search("btn_find_flight.gif")==-1){document.getElementById(ajaxDiv).innerHTML=PNRResponseText;if(ajaxDiv=="chkInRightBarError"){document.getElementById(ajaxDiv).innerHTML=PNRResponseText;ajaxPnrDisplay("upadteRightBarWithAjax.do?method=updateRightBarAjax","chkInRightBarError");}else{if(ajaxDiv=="body"){ajaxPnrDisplay("postUpdateTitleBar.do?method=updateTitleBar","postTitleBarDiv");}}}else{document.getElementById("chkInRightBarError").innerHTML=PNRResponseText;}}}}}function ajaxPnrDisplayForPoints(myurl,div,id){if(div=="body"){setPosition(id,document.getElementById("loadingDiv"),50,50);document.getElementById("loadingDiv").style.display="block";}var myAjax=new Ajax.Updater({success:div},myurl,{method:"post",evalScripts:"true",onSuccess:done});function done(){document.getElementById("loadingDiv").style.display="none";if(div=="body"){ajaxPnrDisplayPoints("postUpdateTitleBar.do?method=updateTitleBar","postTitleBarDiv");}}}var windowObject="";function sendEmailPNRResult(pnrNumber,linkId){ajaxEmailPNRResult(pnrNumber,linkId);linkId=linkId;setPosition(document.getElementById(linkId),document.getElementById("loadingDiv"),200,20);document.getElementById("loadingDiv").style.display="block";}function closeSendEmailPopUp(arg){document.getElementById(arg).style.display="none";}function ajaxEmailPNRResult(pnrNumber,linkId){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();var myUrl="sendEmailItinerary.do?method=sendEmailItinerary&pnrNumber="+pnrNumber;myUrl=myUrl+"&dummy="+dummy;ajaxDiv=linkId;xmlhttp.open("POST",myUrl,true);xmlhttp.onreadystatechange=handleResponseEmailPNRResult;xmlhttp.send("");}function handleResponseEmailPNRResult(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){if((xmlhttp.responseText).trim()=="Success"){setPosition(document.getElementById(ajaxDiv),document.getElementById("sendEmailWindowDiv"),250,20);document.getElementById("sendEmailWindowDiv").style.display="block";document.getElementById("loadingDiv").style.display="none";}else{setPosition(document.getElementById(ajaxDiv),document.getElementById("sendEmailWindowDivError"),250,20);document.getElementById("sendEmailWindowDivError").style.display="block";document.getElementById("loadingDiv").style.display="none";}}}}function addEvent(elm,evType,fn,useCapture){if(elm.addEventListener){elm.addEventListener(evType,fn,useCapture);return true;}else{if(elm.attachEvent){var r=elm.attachEvent("on"+evType,fn);return r;}else{elm["on"+evType]=fn;}}}function addPrintLinks(){var el=document.getElementsByTagName("div");for(i=0;i<el.length;i++){if(el[i].className=="print_section"){var newLink=document.createElement("a");var newLink2=document.createElement("a");var newLinkText=document.createTextNode("print this section only");var newLinkText2=document.createTextNode("print the whole page");var newLinkPara=document.createElement("p");newLinkPara.setAttribute("class","printbutton");newLink.setAttribute("href","#");var btId="printbut_"+el[i].id;newLink.setAttribute("id",btId);newLink.appendChild(newLinkText);newLink.setAttribute("href","#");newLinkPara.appendChild(newLink);newLink2.setAttribute("href","#");var bt2Id="printall_"+el[i].id;newLink2.setAttribute("id",bt2Id);newLink2.appendChild(newLinkText2);newLink2.setAttribute("href","#");newLinkPara.appendChild(newLink2);newLink.onclick=togglePrintDisplay;newLink.onkeypress=togglePrintDisplay;newLink2.onclick=printAll;newLink2.onkeypress=printAll;el[i].appendChild(newLinkPara);}}}function togglePrintDisplay(e){var el=document.getElementsByTagName("div");for(i=0;i<el.length;i++){if(el[i].className.indexOf("section")!=-1){el[i].removeAttribute("className");if(el[i].id=="sect"){el[i].setAttribute("className","print_section print");el[i].setAttribute("class","print_section print");}else{el[i].setAttribute("className","print_section noprint");el[i].setAttribute("class","print_section noprint");}}}if(window.event){window.event.returnValue=false;window.event.cancelBubble=true;}else{if(e){e.stopPropagation();e.preventDefault();}}window.print();}function PrintDisplayAll(e,printDiv){if(!e){var e=window.event;}var el=document.getElementsByTagName("div");for(i=0;i<el.length;i++){if(el[i].className.indexOf("section")!=-1){el[i].removeAttribute("className");if(el[i].id==printDiv){el[i].setAttribute("className","print_section print");el[i].setAttribute("class","print_section print");}else{el[i].setAttribute("className","print_section noprint");el[i].setAttribute("class","print_section noprint");}}}if(window.event){window.event.returnValue=false;window.event.cancelBubble=true;}else{if(e){e.stopPropagation();e.preventDefault();}}window.print();}function printAll(e){var el=document.getElementsByTagName("div");for(i=0;i<el.length;i++){if(el[i].className.indexOf("print_section")!=-1){el[i].setAttribute("className","print_section print");el[i].setAttribute("class","print_section print");}}if(window.event){window.event.returnValue=false;window.event.cancelBubble=true;}else{if(e){e.stopPropagation();e.preventDefault();}}window.print();}function setFocusOnBtn(){if(document.getElementById("divRT").style.display=="block"){document.getElementById("RoundWaySearch").focus();}}function setFocusOnBtnForOW(){if(document.getElementById("divOW").style.display=="block"){document.getElementById("OneWaySearch").focus();}}function setFocusOnBtnForMC(){if(document.getElementById("divMC").style.display=="block"){document.getElementById("MultiSearch").focus();}}function loadDivForCookie(){if(getCookie("TT")=="rt"||getCookie("TT")==null){changePIC("rt","images/tab_rt_selected.gif");wichSelected="divRT";setDefaultTab("divRT");}else{if(getCookie("TT")=="ow"){changePIC("ow","images/tab_ow_selected.gif");wichSelected="divOW";setDefaultTab("divOW");}else{if(getCookie("TT")=="mc"){changePIC("mc","images/tab_mc_selected.gif");wichSelected="divMC";setDefaultTab("divMC");}}}}function checkDate(datevalue){var date="";for(j=0;j<document.flightSearchRTForm.elements.length;j++){if(document.flightSearchRTForm.elements[j].name==datevalue){date=document.flightSearchRTForm.elements[j].value;break;}}var index=j;s;if((date.length==2)||(date.length==5)){var separator="/";date=date.concat(separator);document.flightSearchRTForm.elements[index].value=date;}}function changeContent(){document.getElementById("BF_collopse").background="images/Title_book_flights_expanded.gif";var x=document.getElementById("BF_table").rows[1].cells;x[0].innerHTML="<img src='images/title_bookflight_footer.gif'/>";}var browserType;if(document.layers){browserType="nn4";}if(document.all){browserType="ie";}if(window.navigator.userAgent.toLowerCase().match("gecko")){browserType="gecko";}function hide(arg2){if(browserType=="gecko"){document.poppedLayer=eval("document.getElementById(arg2)");}else{if(browserType=="ie"){document.poppedLayer=eval("document.all[arg2]");}else{document.poppedLayer=eval("document.layers[arg2]");}}document.poppedLayer.style.display="none";}function show(arg2){if(browserType=="gecko"){document.poppedLayer=eval("document.getElementById(arg2)");}else{if(browserType=="ie"){document.poppedLayer=eval("document.all[arg2]");}else{document.poppedLayer=eval("document.layers[arg2]");}}document.poppedLayer.style.display="block";}function setDefaultTab(tabID){tabVal=tabID;if(document.getElementById("homeErrorMessageDiv")){if(wichSelected!=tabID){document.getElementById("homeErrorMessageDiv").style.display="none";}else{document.getElementById("homeErrorMessageDiv").style.display="block";}}hide("divRT");hide("divOW");hide("divMC");show(tabID);}function changePIC(tabID,nameIMG){var obj;document.getElementById("rt").src="images/tab_rt_default.gif";document.getElementById("ow").src="images/tab_ow_default.gif";document.getElementById("mc").src="images/tab_mc_default.gif";obj=document.getElementById("rt").parentNode;obj.disabled=false;obj.style.cursor="pointer";obj=document.getElementById("ow").parentNode;obj.disabled=false;obj.style.cursor="pointer";obj=document.getElementById("mc").parentNode;obj.disabled=false;obj.style.cursor="pointer";document.getElementById(tabID).src=nameIMG;obj=document.getElementById(tabID).parentNode;obj.style.cursor="text";obj.disabled=true;if(document.getElementById("searchPromoCode")){if(document.getElementById("searchPromoCode").style.display="block"){document.getElementById("searchPromoCode").style.display="none";}}}function changePICT(tabID,nameIMG){var obj;document.getElementById("rt").src="images/tab_rt1_default.gif";document.getElementById("ow").src="images/tab_ow1_default.gif";document.getElementById("mc").src="images/tab_mc1_default.gif";obj=document.getElementById("rt").parentNode;obj.disabled=false;obj.style.cursor="pointer";obj=document.getElementById("ow").parentNode;obj.disabled=false;obj.style.cursor="pointer";obj=document.getElementById("mc").parentNode;obj.disabled=false;obj.style.cursor="pointer";document.getElementById(tabID).src=nameIMG;obj=document.getElementById(tabID).parentNode;obj.style.cursor="text";obj.disabled=true;if(document.getElementById("searchPromoCode")){if(document.getElementById("searchPromoCode").style.display="block"){document.getElementById("searchPromoCode").style.display="none";}}}function changeImageOnMouseOverOrOut(obj,IMG){obj.src=IMG;}function resetDiv(divID){document.getElementById("divRT").style.display="none";document.getElementById("divOW").style.display="none";document.getElementById("divMC").style.display="none";document.getElementById(divID).style.display="block";}function loadDataFromCookies(){for(j=0;j<document.flightSearchRTForm.elements.length;j++){var obj=document.flightSearchRTForm.elements[j];if(obj.name=="flightSearch.origin"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.destination"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.depDate.MMDDYYYY"){obj.value=((getCookie(obj.name)!=null)&&(Date.parse(getCookie(obj.name))>=(Date.parse(new Date())-24*60*60*1000)))?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.returnDate.MMDDYYYY"){obj.value=((getCookie(obj.name)!=null)&&(Date.parse(getCookie(obj.name))>=(Date.parse(new Date())-24*60*60*1000)))?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.adults"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.kids"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}}}}}}}for(j=0;j<document.flightSearchOWForm.elements.length;j++){var obj=document.flightSearchOWForm.elements[j];if(obj.name=="flightSearch.origin"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.destination"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.depDateOW.MMDDYYYY"){obj.value=((getCookie(obj.name)!=null)&&(Date.parse(getCookie(obj.name))>=(Date.parse(new Date())-24*60*60*1000)))?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.adults"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.kids"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}}}}}}for(j=0;j<document.flightSearchMCForm.elements.length;j++){var obj=document.flightSearchMCForm.elements[j];if(obj.name=="flightSearch.origin"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.destination"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.depDateMC.MMDDYYYY"){obj.value=((getCookie(obj.name)!=null)&&(Date.parse(getCookie(obj.name))>=(Date.parse(new Date())-24*60*60*1000)))?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.originMC"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.destinationMC"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.returnDateMC.MMDDYYYY"){obj.value=((getCookie(obj.name)!=null)&&(Date.parse(getCookie(obj.name))>=(Date.parse(new Date())-24*60*60*1000)))?getCookie("flightSearch.returnDate.MMDDYYYY"):(obj.value);}else{if(obj.name=="flightSearch.adults"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightSearch.kids"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}}}}}}}}}}function loadFlightStatusDataFromCookies(){for(j=0;j<document.flightStatusForm.elements.length;j++){var obj=document.flightStatusForm.elements[j];if(obj.name=="flightStatus.flightDate"){if(getCookie(obj.name)!=null){obj.selectedIndex=getCookie(obj.name);}}else{if(obj.name=="flightStatus.flightNumber"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightStatus.origin"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}else{if(obj.name=="flightStatus.destination"){obj.value=(getCookie(obj.name)!=null)?getCookie(obj.name):(obj.value);}}}}}}function getCookie(name){var dcookie=document.cookie;var cname=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 checkformRail(o_form){s_action="";a_radio=o_form.railoption;for(var i=0;i<a_radio.length;i++){if(a_radio[i].checked){s_action=a_radio[i].value;}}window.location=s_action;}function closeDivSign(divIdForClose){if(document.getElementById(divIdForClose)){document.getElementById(divIdForClose).style.display="none";}if(loginModuleOrRest=="restLogin"){if(document.getElementById("submitForgot")){document.getElementById("submitForgot").href="javascript:createURLandSubmit('forgetPasswordRestModule');";}}if(divIdForClose=="editForm"){closeDivSign("deleteFromDBMsgBox");}}function openWindowForReViewItinerary(openUrl){var top=50;var left=200;var width=650;var height=680;window.open(openUrl,"","toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no, top="+top+", left="+left+", width="+width+",height="+height);}function onChangeLogin(tObj){logInVal=tObj.value;}function logOut(){document.goProfileHome.action="logOut.do";document.goProfileHome.method.value="logOut";document.goProfileHome.submit();}function createURLandSubmit(method){var url="";var i=0;if(method=="forgetPassword"){url="forgetPassword.do?divNo=1&";setPosition(document.getElementById("placeToOpenDiv"),document.getElementById("SignIn"),5,20);for(i=0;i<document.forgetPasswordForm.elements.length;i++){url=url+document.forgetPasswordForm.elements[i].name+"="+document.forgetPasswordForm.elements[i].value;if(i!=(document.forgetPasswordForm.elements.length-1)){url=url+"&";}}url=url+"&loginId="+document.getElementById("EmailAddress").value;document.getElementById("SignIn").innerHTML="<img src='images/loading.gif'/>";ajaxProfile(url,"SignIn");}if(method=="forgetPasswordRestModule"){url="forgetPassword.do?divNo=1&";setPosition(document.getElementById("openForgotPassword"),document.getElementById("SignIn"),-150,100);for(i=0;i<document.forgetPasswordForm.elements.length;i++){url=url+document.forgetPasswordForm.elements[i].name+"="+document.forgetPasswordForm.elements[i].value;if(i!=(document.forgetPasswordForm.elements.length-1)){url=url+"&";}}url=url+"&loginId="+document.getElementById("EmailAddress").value;document.getElementById("SignIn").innerHTML="<img src='images/loading.gif'/>";ajaxProfileInRestModules(url,"SignIn");}if(method=="changePassword"){url="changePassword.do?divNo=2&";for(i=0;i<document.changePasswordForm.elements.length;i++){url=url+document.changePasswordForm.elements[i].name+"="+document.changePasswordForm.elements[i].value;if(i!=(document.changePasswordForm.elements.length-1)){url=url+"&";}}document.getElementById("SignIn").innerHTML="<img src='images/loading.gif'/>";ajaxProfile(url,"SignIn");}}function goToRegisterPageFromCompanion(){document.goProfileHome.action="goForCompanionRegister.do";document.goProfileHome.method.value="logOut";document.goProfileHome.submit();}var isOk=false;var isAnswered=false;var funcName="";var divId2Delete="";var indexVal="";function confirmationBeforeDelete(whereOpen,whichData,funcname,divid2Delete,indexval){funcName=funcname;divId2Delete=divid2Delete;indexVal=indexval;var wObj=document.getElementById("deleteFromDBMsgBox");setPosition(whereOpen,wObj,160,0);wObj.style.display="block";}function retOkVal(){isOk=true;deleteVal();closeDivSign("deleteFromDBMsgBox");return isOk;}function deleteVal(){if(isOk){str=funcName+"('"+divId2Delete+"','"+indexVal+"')";eval(str);}}function openPreAndNext(responseDiv,moveType){var url="";url="nextAndPreviousAccountAction.do?method=nextAndPreviousAccountInfo&moveType="+moveType;ajaxProfile(url,responseDiv);}function openPreAndNextPoints(responseDiv,moveType){var url="";url="nextAndPreviousAccountActionPoints.do?method=nextAndPreviousAccountInfoPoints&moveType="+moveType;ajaxProfile(url,responseDiv);}function openPreAndNextFF(responseDiv,moveType,currentNo){var url="";url="nextAndPreviousFutureFlightAction.do?method=nextAndPreviousFutureFlightInfo&moveType="+moveType+"&currentPageNo="+currentNo;ajaxProfile(url,responseDiv);}var activityFirstDataInd;var activitySecDataInd;var activityPastDataInd;function openPreAndNextActivity(responseDiv,moveType,currentNo){var url="";url="nextAndPreviousElevateActivityAction.do?method=nextAndPreviousElevateActivityInfo&moveType="+moveType+"&currentPageNo="+currentNo;ajaxProfile(url,responseDiv);}function populateActivityData(sortBtnId,responseDiv){activityFirstDataInd=document.signInForm.activityFirstData.selectedIndex;activitySecDataInd=document.signInForm.activitySecData.selectedIndex;activityPastDataInd=document.signInForm.activityPastData.selectedIndex;var activityFirstData=document.signInForm.activityFirstData.value;var activitySecData=document.signInForm.activitySecData.value;var activityPastData=document.signInForm.activityPastData.value;var lodingObj=document.getElementById("loadingDiv");getAnchorXY(sortBtnId);lodingObj.style.left=X1;lodingObj.style.top=Y1;lodingObj.style.display="block";url="nextAndPreviousElevateActivityAction.do?method=populateSelectedData&activityFirstData="+activityFirstData+"&activitySecData="+activitySecData+"&activityPastData="+activityPastData;ajaxProfile(url,responseDiv);}function openDivForSignIn(obj1,divNo,fltMethod){var myUrl="";obj1=document.getElementById("placeToOpenDiv");loginModuleOrRest="login";setPosition(obj1,document.getElementById("SignIn"),5,20);if(document.getElementById("trSignIn").style.display!="none"){document.getElementById("trSignIn").style.display="none";}if(document.getElementById("SignIn").style.display!="none"){document.getElementById("SignIn").style.display="none";}myUrl="signIn.jsp?divNo="+divNo+"&loginName="+logInVal+"&fltMethod="+fltMethod;ajaxProfile(myUrl,"SignIn");}function openDivForSignInInRestModules(obj1,divNo){var myUrl="";loginModuleOrRest="restLogin";setPosition(obj1,document.getElementById("SignIn"),-150,100);myUrl="signIn.jsp?divNo="+divNo+"&loginName="+logInVal;if(document.getElementById("SignIn").style.display!="none"){document.getElementById("SignIn").style.display="none";}ajaxProfileInRestModules(myUrl,"SignIn");}function ajaxProfileInRestModules(myurl,div1){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;ajaxDiv=div1;xmlhttp.open("POST",myurl,true);chkURL=myurl;xmlhttp.onreadystatechange=handleResponseInRestModules;xmlhttp.send("");}var chkURL="";function handleResponseInRestModules(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){document.getElementById(ajaxDiv).innerHTML=xmlhttp.responseText;if(document.getElementById("submitForgot")!=null){document.getElementById("submitForgot").href="javascript:createURLandSubmit('forgetPasswordRestModule');";}document.getElementById(ajaxDiv).style.display="block";if(document.getElementById("submitForgot")!=null){document.getElementById("closeHref").href="javascript:closeDivSign('SignIn');";}if(document.getElementById("submitForgot")!=null){document.getElementById("cancleHref").href="javascript:closeDivSign('SignIn');";}if(document.getElementById("submitForgot")!=null){document.getElementById("changeImage").style.backgroundImage="url('images/ForgotPassword.gif')";}}}}function openDivForEdit(objEditId,idObjID,urlToOpen){var myUrl;var divN=objEditId;var idObj=document.getElementById(idObjID);var objEdit=document.getElementById(objEditId);if(!(divN=="divPI"||divN=="divPass"||divN=="divAdd"||divN=="divCCI"||divN=="divFP"||divN=="divTC"||divN=="divIT")){closeDivSign("deleteFromDBMsgBox");objEdit.innerHTML="<img src='images/loading.gif'/>";}else{objEdit.innerHTML="";}getAnchorXY(idObjID);objEdit.style.left=X1-250;objEdit.style.top=Y1+10;if(objEdit.id=="accountDivDisplay"){setPosition(idObj,objEdit,0,200);}objEdit.style.display="block";myUrl=urlToOpen;ajaxProfile(myUrl,objEdit.id);}function openDivForEditUpdated(objEdit,idObj,urlToOpen){var myUrl;var divN=objEdit.id;if(!(divN=="divPI"||divN=="divPass"||divN=="divAdd"||divN=="divCCI"||divN=="divFP"||divN=="divTC"||divN=="divIT"||divN=="OptIn")){closeDivSign("deleteFromDBMsgBox");objEdit.innerHTML="<img src='images/loading.gif'/>";}else{document.getElementById("editForm").innerHTML="<img src='images/loading.gif'/>";}if(objEdit.id=="accountDivDisplay"){setPosition(idObj,objEdit,0,200);}objEdit.style.display="block";myUrl=urlToOpen;ajaxProfileUpdated(myUrl,objEdit.id);}function ajaxProfileForPassword(myurl,div1){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;ajaxDiv=div1;xmlhttp.open("POST",myurl,true);chkURL=myurl;xmlhttp.onreadystatechange=handleResponseForPassword;xmlhttp.send("");}function handleResponseForPassword(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){document.getElementById(ajaxDiv).innerHTML=xmlhttp.responseText;document.getElementById(ajaxDiv).style.display="block";enablePage();if((ajaxDiv=="divPI"||ajaxDiv=="divPass"||ajaxDiv=="divAdd"||ajaxDiv=="divCCI"||ajaxDiv=="divFP"||ajaxDiv=="divTC"||ajaxDiv=="divIT"||ajaxDiv=="OptIn")){document.getElementById("editForm").style.display="none";}}}}function disablePage(){document.getElementById("disableTotalPage").style.top=0;document.getElementById("disableTotalPage").style.left=0;document.getElementById("disableTotalPage").style.height=getXandY(document.getElementById("rightBottom")).y;document.getElementById("disableTotalPage").style.width=1050;document.getElementById("disableTotalPage").style.display="block";}function enablePage(){if(document.getElementById("disableTotalPage")){document.getElementById("disableTotalPage").style.display="none";}}function clearCheckBox(){for(i=0;i<document.modifyProfileForm.elements.length;i++){var chkObj=document.modifyProfileForm.elements[i];if(chkObj.name=="interestVal"){chkObj.checked=false;}}}function ajaxProfile(myurl,div1){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;ajaxDiv=div1;xmlhttp.open("POST",myurl,true);chkURL=myurl;xmlhttp.onreadystatechange=handleResponse;xmlhttp.send("");}function ajaxProfileUpdated(myurl,div1){var myAjax=new Ajax.Updater({success:div1},myurl,{method:"post",evalScripts:"true",onSuccess:done});enablePage();function done(){if((div1=="divPI"||div1=="divPass"||div1=="divAdd"||div1=="divCCI"||div1=="divFP"||div1=="divTC"||div1=="divIT"||div1=="OptIn")){document.getElementById("editForm").style.display="none";}}}function ajaxProfileAlt(myurl,div1){var myAjax=new Ajax.Updater({success:div1},myurl,{method:"post",evalScripts:"true",onSuccess:done});enablePage();function done(){}}var chkURL="";function handleResponse(){var h=0;var ind=0;if(xmlhttp.readyState==4){if(xmlhttp.status==200){if((xmlhttp.responseText).trim()=="AjaxSessionTimeOut"){window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{if((xmlhttp.responseText).search("bg_ForgetPassword")!=-1){ind=(xmlhttp.responseText).search("bg_ForgetPassword");}else{if((xmlhttp.responseText).search("bg_Sign-in")!=-1){ind=(xmlhttp.responseText).search("bg_Sign-in");}}}if((xmlhttp.responseText).substring(ind,ind+10)=="bg_Sign-in"){h=104;}else{if((xmlhttp.responseText).substring(ind,ind+17)=="bg_ForgetPassword"){h=142;}}if((xmlhttp.responseText).search("PasswordResetEmailSent")!=-1){var s=s_gi("vatest");s.linkTrackVars="events";s.linkTrackEvents="event27";s.events="event27";s.tl(true,"o","Forgot Password");}if(loginModuleOrRest=="restLogin"){h=0;}document.getElementById(ajaxDiv).innerHTML=xmlhttp.responseText;document.getElementById(ajaxDiv).style.display="block";enablePage();if(loginModuleOrRest=="restLogin"){if(document.getElementById("changeImage")){document.getElementById("closeHref").href="javascript:closeDivSign('SignIn');";document.getElementById("changeImage").style.backgroundImage="url('images/bg_ForgetPasswordWithoutSignIn.gif')";}}if(ajaxDiv=="elevateActivitiesDiv"){if(document.getElementById("activityFirstData")){document.signInForm.activityFirstData.selectedIndex=activityFirstDataInd;document.signInForm.activitySecData.selectedIndex=activitySecDataInd;document.signInForm.activityPastData.selectedIndex=activityPastDataInd;}}if(document.getElementById("loadingDiv")){document.getElementById("loadingDiv").style.display="none";}xmlhttp=null;}}}function submitFormLogAfterChangePassword(URLParameters){var loginURL="";loginURL="signInLogin.do"+URLParameters+"&reDirect=no";ajaxProfileSignIn(loginURL,"loginWindowDiv");}function submitFormLog(formName,statusBooking){var loginURL="";var signLoginId=document.signInForm.loginId.value;for(i=0;i<document.signInForm.elements.length;i++){if(document.signInForm.elements[i].name=="password"){var signPassword=document.signInForm.elements[i].value;break;}}if(rUInRegistrationProcess=="Yes"){document.signInForm.action="signInFromRegister.do";document.signInForm.submit();}else{if(statusBooking=="booking"){loginURL="signInLogin.do?method=signIn&loginId="+signLoginId+"&password="+signPassword+"&reDirect=no";}else{loginURL="signInLogin.do?method=signIn&loginId="+signLoginId+"&password="+signPassword+"&reDirect=yes";}document.getElementById("submitID").innerHTML='<img src="images/btn_sign-in.gif" height="20" width="63" alt="Sign In" title="Sign In" border="0" />';ajaxProfileSignIn(loginURL,"loginWindowDiv");}document.getElementById("SignIn").innerHTML="<img src='images/loading.gif'/>";}function ajaxProfileSignIn(myurl,div1){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;ajaxDiv=div1;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponseSignIn;xmlhttp.send("");}function handleResponseSignIn(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){document.getElementById(ajaxDiv).innerHTML=xmlhttp.responseText;document.getElementById(ajaxDiv).style.display="block";}}}function showRolloverImage(imgId,imgName){if(imgId.src.indexOf("cl")==-1){imgId.src="images/"+imgName+"_roll.gif";}else{imgId.src="images/"+imgName+"_roll_cl.gif";}}function restoreImage(imgId,imgName){if(imgId.src.indexOf("cl")==-1){imgId.src="images/"+imgName+".gif";}else{imgId.src="images/"+imgName+"_cl.gif";}}function showElevatePointsDivArea(divId,activeImg,tbSelect){document.getElementById("elevateActivities").src="images/btn_the_basics.gif";document.getElementById("elevateContact").src="images/btn_account_activitty.gif";document.getElementById("elevatePreferences").src="images/btn_preferences.gif";document.getElementById("elevateActivitiesDiv").style.display="none";document.getElementById("elevateContactDiv").style.display="none";document.getElementById("elevatePreferencesDiv").style.display="none";document.getElementById("showNeedPointsDiv").style.display="none";document.getElementById("needPointsResultDiv").style.display="none";document.getElementById("upComingFlightImageId").style.display="none";document.getElementById("forGotPointImageId").style.display="none";document.getElementById("elevatePointsExplainDivId").style.display="none";document.getElementById("requestElevatePointsImageId").style.display="block";document.getElementById("elevateExpandHtmlId").style.display="block";divId.src=activeImg;tbSelect=tabSelect;document.getElementById("pointHistoryDiv").style.display="block";}var elevatePointsActiveImage;function showFullActivity(){showLoadingImageonPopUp("pointHistoryFromTheBasic");window.location="/va/signIn.do?method=homeProfileWithPagination&showActivity=true";}function showDivArea(divId,activeImg,tbSelect){if(tbSelect==1){myUrl="showPreferences.do?method=showPrefrences&forwardPage=elevateActivity";if(divId!="pointHistoryFromTheBasic"){showLoadingImageonPopUp(divId);}showElevatePointDetailsAjax(myUrl,divId,activeImg);}else{if(tbSelect==3){myUrl="showPreferences.do?method=showPrefrences&forwardPage=contactInfo";showLoadingImageonPopUp(divId);showElevatePointDetailsAjax(myUrl,divId,activeImg);}else{if(tbSelect==5){myUrl="showPreferences.do?method=showPrefrences&forwardPage=preferences";showLoadingImageonPopUp(divId);showElevatePointDetailsAjax(myUrl,divId,activeImg);}else{if(tbSelect==4){myUrl="showPreferences.do?method=showPrefrences&forwardPage=pointsExpSummary";showLoadingImageonPopUp(divId);showElevatePointDetailsAjax(myUrl,divId,activeImg);}else{document.getElementById("elevateActivities").src="images/btn_the_basics.gif";document.getElementById("elevateContact").src="images/btn_account_activitty.gif";document.getElementById("elevatePreferences").src="images/btn_preferences.gif";document.getElementById("elevateActivitiesDiv").style.display="none";document.getElementById("elevateContactDiv").style.display="none";document.getElementById("elevatePreferencesDiv").style.display="none";document.getElementById("showNeedPointsDiv").style.display="none";document.getElementById("needPointsResultDiv").style.display="none";divId.src=activeImg;divAreaId=divId.id+"Div";tbSelect=tabSelect;if(divAreaId=="elevateActivitiesDiv"){document.getElementById("upComingFlightImageId").style.display="none";document.getElementById("forGotPointImageId").style.display="block";document.getElementById("elevateExpandHtmlId").style.display="block";document.getElementById("requestElevatePointsImageId").style.display="none";document.getElementById("elevatePointsExplainDivId").style.display="none";document.getElementById("elevateExpandHtmlIdPref").style.display="none";}else{if(divAreaId=="elevatePreferencesDiv"){s.event12="Elevate Preferences";document.getElementById("upComingFlightImageId").style.display="none";document.getElementById("forGotPointImageId").style.display="none";document.getElementById("elevateExpandHtmlId").style.display="none";document.getElementById("elevatePointsExplainDivId").style.display="none";document.getElementById("requestElevatePointsImageId").style.display="none";document.getElementById("elevateExpandHtmlIdPref").style.display="block";}else{if(divAreaId=="elevateContactDiv"){s.event15="Past Flights";document.getElementById("upComingFlightImageId").style.display="none";document.getElementById("forGotPointImageId").style.display="none";document.getElementById("elevateExpandHtmlId").style.display="block";document.getElementById("elevatePointsExplainDivId").style.display="none";document.getElementById("requestElevatePointsImageId").style.display="block";document.getElementById("elevateExpandHtmlIdPref").style.display="none";}}}document.getElementById(divAreaId).style.display="block";showLoadingImageClose();}}}}var s_code=s.t();if(s_code){document.write(s_code);}}function showElevatePointDetailsAjax(myurl,div,activeImg){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;ajaxDiv=div;elevatePointsActiveImage=activeImg;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponseElevatePointDetails;xmlhttp.send("");}function handleResponseElevatePointDetails(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){var ElevatePointResponseText=xmlhttp.responseText;if(ElevatePointResponseText.trim()=="AjaxSessionTimeOut"){window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{if(ajaxDiv=="elevateActivities"||ajaxDiv=="expPointsLinkDivId"||ajaxDiv=="pointHistoryFromTheBasic"){document.getElementById("elevateActivitiesDiv").style.display="none";document.getElementById("elevateContactDiv").style.display="none";document.getElementById("elevatePreferencesDiv").style.display="none";document.getElementById("elevateActivitiesDiv").style.display="block";document.getElementById("elevateActivitiesDiv").innerHTML=xmlhttp.responseText;document.getElementById("elevateActivities").className="current";document.getElementById("elevateContact").className="";document.getElementById("elevatePreferences").className="";document.getElementById("eleActivityRightContantDivId").style.display="";document.getElementById("myContactInfoRightContentDivId").style.display="none";document.getElementById("preferencesRightContentDivId").style.display="none";document.getElementById("myAccountRightContentDivId").style.display="none";if(typeof (activityFirstDataInd)!="undefined"&&typeof (activitySecDataInd)!="undefined"&&typeof (activityPastDataInd)!="undefined"){if(document.signInForm){document.signInForm.activityFirstData.selectedIndex=activityFirstDataInd;document.signInForm.activitySecData.selectedIndex=activitySecDataInd;document.signInForm.activityPastData.selectedIndex=activityPastDataInd;}}showLoadingImageClose();}else{if(ajaxDiv=="elevateContact"){document.getElementById("elevateActivitiesDiv").style.display="none";document.getElementById("elevateContactDiv").style.display="none";document.getElementById("elevatePreferencesDiv").style.display="none";document.getElementById("elevateContactDiv").style.display="block";document.getElementById("elevateContactDiv").innerHTML=xmlhttp.responseText;document.getElementById("elevateActivities").className="";document.getElementById("elevateContact").className="current";document.getElementById("elevatePreferences").className="";document.getElementById("eleActivityRightContantDivId").style.display="none";document.getElementById("myContactInfoRightContentDivId").style.display="";document.getElementById("preferencesRightContentDivId").style.display="none";document.getElementById("myAccountRightContentDivId").style.display="none";showLoadingImageClose();}else{if(ajaxDiv=="elevatePreferences"){document.getElementById("elevateActivitiesDiv").style.display="none";document.getElementById("elevateContactDiv").style.display="none";document.getElementById("elevatePreferencesDiv").style.display="none";document.getElementById("elevatePreferencesDiv").style.display="block";document.getElementById("elevatePreferencesDiv").innerHTML=xmlhttp.responseText;document.getElementById("elevateActivities").className="";document.getElementById("elevateContact").className="";document.getElementById("elevatePreferences").className="current";document.getElementById("eleActivityRightContantDivId").style.display="none";document.getElementById("myContactInfoRightContentDivId").style.display="none";document.getElementById("preferencesRightContentDivId").style.display="";document.getElementById("myAccountRightContentDivId").style.display="none";showLoadingImageClose();}}}}}}}var chkAccountDetailsRS="false";var chkPointActivityDetailsRS="false";var arrowImgId;function callAjaxFunction(objDivId,imgId){imgObj=document.getElementById(imgId);arrowImgId=imgId;if(chkAccountDetailsRS=="false"&&objDivId=="messageDisplay"&&document.getElementById(objDivId).style.display=="none"){showLoadingImageOpen(imgId);myUrl="elevateAccountDetails.do?method=elevateBookingDetails";retreiveAccountDetails(myUrl,objDivId);chkAccountDetailsRS="false";}else{if(chkPointActivityDetailsRS=="false"&&objDivId=="messageActivity"&&document.getElementById(objDivId).style.display=="none"){showLoadingImageOpen(imgId);myUrl="elevateAccountDetails.do?method=elevatePointsActivity";retreiveAccountDetails(myUrl,objDivId);chkPointActivityDetailsRS="false";}else{if(document.getElementById(objDivId).style.display=="none"){imgObj.setAttribute("src","images/arrowDown.gif");document.getElementById(objDivId).style.display="";if(objDivId=="messageDisplay"){document.getElementById("messageActivity").style.display="none";document.getElementById("ptDivImgId").setAttribute("src","images/arrowRight.gif");}if(objDivId=="messageActivity"){document.getElementById("messageDisplay").style.display="none";document.getElementById("msgDivImgId").setAttribute("src","images/arrowRight.gif");}}else{imgObj.setAttribute("src","images/arrowRight.gif");document.getElementById(objDivId).style.display="none";}}}}function retreiveAccountDetails(myurl,divId){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;ajaxDiv=divId;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponseAccountDetails;xmlhttp.send("");}function handleResponseAccountDetails(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){var responseText=xmlhttp.responseText;if(responseText.trim()=="AjaxSessionTimeOut"){window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{document.getElementById("loginWindowDiv").innerHTML=xmlhttp.responseText;document.getElementById("loginWindowDiv").style.display="";document.getElementById(ajaxDiv).style.display="";var img=document.getElementById(arrowImgId);img.setAttribute("src","images/arrowDown.gif");if(ajaxDiv=="messageActivity"&&document.getElementById("messageDisplay").style.display!="none"){document.getElementById("messageDisplay").style.display="none";document.getElementById("msgDivImgId").setAttribute("src","images/arrowRight.gif");}if(ajaxDiv=="messageDisplay"){if(document.getElementById("messageActivity").style.display!="none"){document.getElementById("messageActivity").style.display="none";document.getElementById("ptDivImgId").setAttribute("src","images/arrowRight.gif");}}showLoadingImageClose();}}}}function showCkInHome(pnr,id){var x=document.pnrDetailForm.elements["pnrDetail.pnrNo"];x.value=pnr;document.pnrDetailForm.submit();showLoadingImageOpen(id);}function getPageSizeWithScroll(){if(window.innerHeight&&window.scrollMaxY){yWithScroll=window.innerHeight+window.scrollMaxY;xWithScroll=window.innerWidth+window.scrollMaxX;}else{if(document.body.scrollHeight>document.body.offsetHeight){yWithScroll=document.body.scrollHeight;xWithScroll=document.body.scrollWidth;}else{yWithScroll=document.body.offsetHeight+document.body.offsetTop;xWithScroll=document.body.offsetWidth+document.body.offsetLeft;}}arrayPageSizeWithScroll=new Array(xWithScroll,yWithScroll);return arrayPageSizeWithScroll;}function GetXmlHttpObject(){var xmlHttp=null;try{xmlHttp=new XMLHttpRequest();}catch(e){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}return xmlHttp;}function closeFareRulDiv(divId){document.getElementById(divId).style.display="none";}function toggleTaxesAnFee(objId){var imgObj=document.getElementById(objId);if(document.getElementById("passengerChargeId").style.display!="none"){imgObj.src="images/taxFeesExpand.gif";document.getElementById("passengerChargeId").style.display="none";document.getElementById("securityFeeId").style.display="none";document.getElementById("segmentFeeId").style.display="none";if(document.getElementById("travelInsurenceId")!=null){document.getElementById("travelInsurenceId").style.display="none";}}else{imgObj.src="images/taxFeesCollapse.gif";document.getElementById("passengerChargeId").style.display="";document.getElementById("securityFeeId").style.display="";document.getElementById("segmentFeeId").style.display="";if(document.getElementById("travelInsurenceId")!=null){document.getElementById("travelInsurenceId").style.display="";}}}function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p){d.MM_p=new Array();}var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++){if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}}function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++){x.src=x.oSrc;}}function MM_findObj(n,d){var p,i,x;if(!d){d=document;}if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}if(!(x=d[n])&&d.all){x=d.all[n];}for(i=0;!x&&i<d.forms.length;i++){x=d.forms[i][n];}for(i=0;!x&&d.layers&&i<d.layers.length;i++){x=MM_findObj(n,d.layers[i].document);}if(!x&&d.getElementById){x=d.getElementById(n);}return x;}function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3){if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc){x.oSrc=x.src;}x.src=a[i+2];}}}function showRolloverImageNor(imgId,imgName){imgId.src="images/"+imgName+"_roll.gif";}function restoreImageNor(imgId,imgName){imgId.src="images/"+imgName+".gif";}function addEvent(){var ni=document.getElementById("myDiv");var numi=document.getElementById("theValue");var num=(document.getElementById("theValue").value-1)+2;numi.value=num;var divIdName="my"+num+"DivEMail";var newdiv=document.createElement("div");newdiv.setAttribute("id",divIdName);newdiv.innerHTML="<table cellpadding=0 cellspacing=0 border=0 width=416><tr><td width=31></td><td width=110 class=pageBody9><strong>Email Address:</strong></td><td width=110><input name=modifyProfileModel.emailaddress["+num+"] type=text class=pageBody9 size=25 ></td><td><img src=images/spacer.gif width=3 /></td><td><img src=images/btn_delete.gif onmouseover=\"showRolloverImage(this,'btn_delete');MakeCursor(this);\" onmouseout=restoreImage(this,'btn_delete') alt=Delete title=Delete onclick=\"removeEvent('"+divIdName+"','myDiv','mail');resetMailElementName();\"></td><td></td></tr><tr><td colspan=4><img src=images/spacer.gif width=1 height=3></td></tr></table>";CntAddElements("cntMailElements");ni.appendChild(newdiv);}function addEventForPhone(){var ni=document.getElementById("myDivPhone");var numi=document.getElementById("theValuePhone");var num=(document.getElementById("theValuePhone").value-1)+2;numi.value=num;var divIdName="my"+num+"Div4Phone";var newdiv=document.createElement("div");newdiv.setAttribute("id",divIdName);newdiv.innerHTML="<table cellpadding=0 cellspacing=0 border=0 width=416><tr><td width=31><input type=radio value=phone"+num+" name=phonePrimary  onclick=setRadioVal(this.value,'personalInfo',0);></td><td width=110 class=pageBody9><select name=modifyProfileModel.phonetypenew["+num+"] class=pageBody9 style='width:100px;'><option selected=selected value=''>Select Type</option><option value=office>Business</option><option value=Home>Home</option><option value=Mobile>Mobile</option></select></td><td width=110><input name=modifyProfileModel.phonenumbernew["+num+"] type=text value='' class=pageBody9 size=25 ></td><td><img src=images/spacer.gif width=3 /></td><td><img src=images/btn_delete.gif onmouseover=\"showRolloverImage(this,'btn_delete');MakeCursor(this);\" onmouseout=restoreImage(this,'btn_delete') alt=Delete title=Delete onclick=\"removeEvent('"+divIdName+"','myDivPhone','phone');resetElementName("+num+');"></td><td></td></tr><tr><td colspan=4><img src=images/spacer.gif width=1 height=3></td></tr></table>';CntAddElements("cntMailElements");ni.appendChild(newdiv);}function removeEvent(divNum,myDivID,whichEl){var d=document.getElementById(myDivID);var olddiv=document.getElementById(divNum);if(whichEl=="mail"){CntRemoveElements("theValue");}else{if(whichEl=="phone"){CntRemoveElements("theValuePhone");}}d.removeChild(olddiv);}function addEventForCreditCard(){var ni=document.getElementById("myDivCard");var i=0;var numi=document.getElementById("theValueCard");var num=(parseInt(numi.value)-1)+2;numi.value=num;for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name=="modifyProfileModel.cardCount"){document.modifyProfileForm.elements[i].value=num;}}var divIdName="myDivCreditCard"+num;var newdiv=document.createElement("div");newdiv.setAttribute("id",divIdName);ni.appendChild(newdiv);openDivForEdit(divIdName,divIdName,"editCreditCardInfoInProfileIterateAdd.jsp?divNum="+num);}function addEventForCompanion(){var ni=document.getElementById("myDivCompanion");var i=0;var numi=document.getElementById("theValueCompanion");var num=(parseInt(numi.value)-1)+2;numi.value=num;var divIdName="nameDivParent"+num;var newdiv=document.createElement("div");newdiv.setAttribute("id",divIdName);ni.appendChild(newdiv);openDivForEdit(divIdName,divIdName,"editTravelCompanionsInProfileAdd.jsp?divNum="+num);}function CntAddElements(elementId){var cntAdd=0;cntAdd=document.getElementById(elementId).value;document.getElementById(elementId).value=(cntAdd)-(-1);}function CntRemoveElements(elementId){var cntRem=0;cntRem=document.getElementById(elementId).value;document.getElementById(elementId).value=cntRem-1;}function showHideLayer(anchorObj,divID,imgName,divIDSpace){divId=document.getElementById(divID);if(divIDSpace!="no"){divIDSpace=document.getElementById(divIDSpace);}if(divId.style.display!="none"){anchorObj.className="collapsed";divId.style.display="none";if(divIDSpace!="no"){divIDSpace.style.display="block";}if(document.getElementById("toggleTrigger")){document.getElementById("toggleTrigger").innerHTML="Show Details";}}else{anchorObj.className="collapseBtn";divId.style.display="";if(divIDSpace!="no"){divIDSpace.style.display="none";}if(document.getElementById("toggleTrigger")){document.getElementById("toggleTrigger").innerHTML="Hide Details";}}}function showHideLayerOnLoad(){var divId;var activeImg;if(tabSelect==1){divId="theBasics";activeImg="images/btn_the_basics_sel.gif";}else{if(tabSelect==2){divId="accountActivity";activeImg="images/btn_account_activitty_sel.gif";}else{if(tabSelect==3){divId="futureFlights";activeImg="images/btn_future_flights_sel.gif";}else{if(tabSelect==4){divId="preferences";activeImg="images/btn_preferences_sel.gif";}else{divId="theBasics";activeImg="images/btn_the_basics_sel.gif";}}}}showDivArea(document.getElementById(divId),activeImg,tabSelect);}function resetElementName(num){var elcnt=0;var dlNum=parseInt(num);var radioDelNum;for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name.length>32){if(document.modifyProfileForm.elements[i].name.substring(0,33)=="modifyProfileModel.phonenumbernew"){document.modifyProfileForm.elements[i].name="modifyProfileModel.phonenumbernew["+elcnt+"]";elcnt=elcnt+1;}}}elcnt=0;for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name.length>30){if(document.modifyProfileForm.elements[i].name.substring(0,31)=="modifyProfileModel.phonetypenew"){document.modifyProfileForm.elements[i].name="modifyProfileModel.phonetypenew["+elcnt+"]";elcnt=elcnt+1;}}}elcnt=0;for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name=="phonePrimary"){document.modifyProfileForm.elements[i].value="phone"+elcnt;elcnt=elcnt+1;}}}function resetMailElementName(){var elcnt=0;for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name.length>30){if(document.modifyProfileForm.elements[i].name.substring(0,31)=="modifyProfileModel.emailaddress"){document.modifyProfileForm.elements[i].name="modifyProfileModel.emailaddress["+elcnt+"]";elcnt=elcnt+1;}}}}function resetElementNamePhoneRun(num){var elcnt=0;var hiddCnt=parseInt(num);for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name.length>32){if(document.modifyProfileForm.elements[i].name.substring(0,33)=="modifyProfileModel.phonenumbernew"){if(i>=num&&elcnt>num){document.modifyProfileForm.elements[i].name="modifyProfileModel.phonenumbernew["+(elcnt-1)+"]";document.modifyProfileForm.elements[i].value=document.modifyProfileForm.elements[i].name;if(parseInt(document.getElementById("theValuePhone").value)>=(hiddCnt+1)){document.getElementById("positionDiv"+hiddCnt+"").value=hiddCnt-1;hiddCnt=hiddCnt+1;}}elcnt=elcnt+1;}}}document.getElementById("theValuePhone").value=parseInt(document.getElementById("theValuePhone").value)-1;}function deleteLayer(id){if(document.layers&&document.layers[id]){document.layers[id].visibility="hide";delete document.layers[id];}}function setAliasValue(val){for(i=0;i<document.requestProfileForm.elements.length;i++){if(document.requestProfileForm.elements[i].name=="createProfile.emailSecond"){document.requestProfileForm.elements[i].value=val;}}}function setAliasModifyValue(val){for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name=="modifyProfileModel.alias"){document.modifyProfileForm.elements[i].value=val;}}}function resetElementNameAddress(num){var elcnt=0;var name;var elPosition;var elIntPosition;for(i=0;i<document.modifyProfileForm.elements.length;i++){name=document.modifyProfileForm.elements[i].name;name=name.split("[");if(!(name[1]==null||name[i]=="")){elPosition=name[1].split("]");if(!(elPosition[0]==null||elPosition[0]=="")){elIntPosition=parseInt(elPosition[0]);if(i>=num&&elIntPosition>num){document.modifyProfileForm.elements[i].name=name[0]+"["+(elIntPosition-1)+"]";}}}}document.getElementById("theValueAddress").value=document.getElementById("theValueAddress").value-1;}function addEventForAddress(){var i=0;var ni=document.getElementById("myDivAddress");var i=0;var numi=document.getElementById("theValueAddress");var num=(parseInt(numi.value)-1)+2;numi.value=num;for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name=="modifyProfileModel.addressCnt"){document.modifyProfileForm.elements[i].value=num;}}var divIdName="myDivAddress"+num;var newdiv=document.createElement("div");newdiv.setAttribute("id",divIdName);ni.appendChild(newdiv);openDivForEdit(divIdName,"editBtnAddress","editAddressInProfileIterateAdd.jsp?divNum="+num);}function removeEventForAddress(divNum,myDivID,whichEl){document.getElementById(divNum).style.display="none";var olddiv=olddiv.parentNode;var d=document.getElementById(myDivID);d.removeChild(olddiv);}function populateOmnitureVariable(modify){s.events="event9";if(modify=="personal"){s.eVar24="Edit Personal Information";}else{if(modify=="creditCard"){s.eVar24="Edit Credit Card Information";}else{if(modify=="password"){s.eVar24="Edit Password";}else{if(modify=="address"){s.eVar24="Edit Address Information";}else{if(modify=="companion"){s.eVar24="Edit Companion";}else{if(modify=="attribute"){s.eVar24="Edit Attribute";}else{if(modify=="interest"){s.eVar24="Edit Interest";}}}}}}}var s_code=s.t();if(s_code){document.write(s_code);}}function createUrlPersonalInfo(place,frm){closeDivSign("deleteFromDBMsgBox");disablePage();populateOmnitureVariable(frm);var url=null;var postionDiv="testPosition";if(frm=="personal"){url="modifyProfile.do?div=11";document.modifyProfileForm.elements["modifyProfileModel.cntPhone"].value=document.getElementById("theValuePhone").value;document.modifyProfileForm.elements["modifyProfileModel.cntEMail"].value=document.getElementById("theValue").value;for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name!="phonePrimary"){url=url+"&"+document.modifyProfileForm.elements[i].name+"="+document.modifyProfileForm.elements[i].value;}}openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("editPersonalOpen"),url);}if(frm=="creditCard"){url="modifyCreditCardProfile.do?div=11";var t=0;for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name=="modifyProfileModel.cardCount"){document.modifyProfileForm.elements[i].value=document.getElementById("theValueCard").value;}if(document.modifyProfileForm.elements[i].type!="radio"){url=url+"&"+document.modifyProfileForm.elements[i].name+"="+document.modifyProfileForm.elements[i].value;}}openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("editCreditCOpen"),url);}if(frm=="password"){url="modifyPasswordProfile.do?div=11";var val="";for(i=0;i<document.modifyProfileForm.elements.length;i++){val=document.modifyProfileForm.elements[i].value;val=val.replace("+","PLUS");url=url+"&"+document.modifyProfileForm.elements[i].name+"="+escape(val);}url=url.replace(/PLUS/g,"%2B");openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("editPasswordOpen"),url);}if(frm=="address"){url="modifyAddressProfile.do?div=11";for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name=="modifyProfileModel.addressCnt"){document.modifyProfileForm.elements[i].value=document.getElementById("theValueAddress").value;}}var totalElement=((parseInt(document.getElementById("theValueAddress").value)+1)*11)+3;var nameVal;for(i=0;i<document.modifyProfileForm.elements.length;i++){nameVal=document.modifyProfileForm.elements[i].name.split("_");if(nameVal[0]!="radioAddress"){url=url+"&"+document.modifyProfileForm.elements[i].name+"="+document.modifyProfileForm.elements[i].value;}}openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("editBtnAddress"),url);}if(frm=="companion"){url="modifyCompanionProfile.do?div=11";for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name=="modifyProfileModel.companionTotal"){document.modifyProfileForm.elements[i].value=document.getElementById("theValueCompanion").value;}if(document.modifyProfileForm.elements[i].name!=""){url=url+"&"+document.modifyProfileForm.elements[i].name+"="+document.modifyProfileForm.elements[i].value;}}openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("companion"),url);}if(frm=="attribute"){url="modifyAttributeProfile.do?div=11";for(i=0;i<document.modifyProfileForm.elements.length;i++){url=url+"&"+document.modifyProfileForm.elements[i].name+"="+document.modifyProfileForm.elements[i].value;}openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("editFightPOpen"),url);}if(frm=="interest"){url="modifyAttributeProfile.do?div=11&method=modifyInterest";var selectedString="";var chkcnt=0;for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name=="interestVal"){if(document.modifyProfileForm.elements[i].checked){if(chkcnt>0){selectedString=selectedString+",";}selectedString=selectedString+document.modifyProfileForm.elements[i].value;chkcnt=chkcnt+1;}}}url=url+"&modifyProfileModel.interestVal="+selectedString;openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("editInterestOpen"),url);}}function goToPrefrence(){showDivArea(document.getElementById("preferences"),"images/btn_preferences_sel.gif");}function divhideFunctionError(divID){var x=document.getElementById(divID);if(x.style.display=="block"||x.style.display=="inline"){x.style.display="none";iswap=0;}else{if(x.style.display=="none"||x.style.display==""){x.style.display="inline";}}}function clearText(txtBox){if(txtBox.value=="Email, Alias or Elevate#"){txtBox.value="";}}function setRadioVal(RdVal,editType,cntPos){var icnt=0;if(editType=="personalInfo"){for(i=0;icnt<document.modifyProfileForm.elements.length;icnt++){if(document.modifyProfileForm.elements[icnt].name=="modifyProfileModel.phonePrimary"){document.modifyProfileForm.elements[icnt].value=RdVal;}}}if(editType=="personalInfoEmail"){for(i=0;icnt<document.modifyProfileForm.elements.length;icnt++){if(document.modifyProfileForm.elements[icnt].name=="modifyProfileModel.emailtype"){document.modifyProfileForm.elements[icnt].value=RdVal;}}}if(editType=="addressInfo"){for(i=0;icnt<document.modifyProfileForm.elements.length;icnt++){if(document.modifyProfileForm.elements[icnt].name=="modifyProfileModel.addressPrimary["+cntPos+"]"){document.modifyProfileForm.elements[icnt].value=RdVal;}}}if(editType=="addressInfoPrimary"){for(i=0;icnt<document.modifyProfileForm.elements.length;icnt++){if(document.modifyProfileForm.elements[icnt].name=="modifyProfileModel.whichPrimary"){document.modifyProfileForm.elements[icnt].value=RdVal;}}}if(editType=="cardInfoPrimary"){for(i=0;icnt<document.modifyProfileForm.elements.length;icnt++){if(document.modifyProfileForm.elements[icnt].name=="modifyProfileModel.whichPrimaryCard"){document.modifyProfileForm.elements[icnt].value=RdVal;}}}}function deleteCreditCard(divId2Delete,blockNum){document.getElementById(divId2Delete).innerHTML="";resetElementNameCard(blockNum);}function deleteCreditCardSession(divId2Delete,blockNum){var delct=0;var i1=0;delct=parseInt(document.getElementById("sessionDelCard").value);for(i1=0;i1<document.modifyProfileForm.elements.length;i1++){if(document.modifyProfileForm.elements[i1].name=="modifyProfileModel.delCardArry"){if(document.modifyProfileForm.elements[i1].value==null||document.modifyProfileForm.elements[i1].value==""){document.modifyProfileForm.elements[i1].value=blockNum;}else{document.modifyProfileForm.elements[i1].value=document.modifyProfileForm.elements[i1].value+"|"+blockNum;}}if(document.modifyProfileForm.elements[i1].name=="modifyProfileModel.delCardcount"){document.modifyProfileForm.elements[i1].value=parseInt(document.modifyProfileForm.elements[i1].value)+1;}}resetElementNameCard(blockNum);document.getElementById("theValueCard").value=(parseInt(document.getElementById("theValueCard").value)-1);document.getElementById("sessionDelCard").value=delct+1;}function resetElementNameCard(div2Delete,numDiv){var cnt=document.getElementById("theValueCard").value;var obj=document.getElementById(div2Delete);var num=parseInt(numDiv);obj.outerHTML="";var i=0;for(i=num+1;i<=cnt;i++){document.getElementById("myDivCreditCard"+i).id="myDivCreditCard"+(i-1);document.getElementById("divRelVal"+i).id=(i-1);document.getElementById("divRelVal"+(i-1)).value="divRelVal"+(i-1);document.getElementById("myDivCreditCard"+(i-1)).id="myDivCreditCard"+(i-1);}}function deletePhoneSession(divId2Delete,blockNum){var url="modifyProfile.do?method=deletePhoneInfo&delCardInfo="+blockNum;openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("testPosition"),url);}function deleteEmailSession(divId2Delete,blockNum){var url="modifyCreditCardProfile.do?method=deleteEmailInfo&delCardInfo="+blockNum;openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("testPosition"),url);}function deleteAddressSession(divId2Delete,blockNum){var url="modifyCreditCardProfile.do?method=deleteAddressInfo&delCardInfo="+blockNum;openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("testPosition"),url);}function deleteCreditCardSession(divId2Delete,blockNum){var url="modifyCreditCardProfile.do?method=deleteCardInfo&delCardInfo="+blockNum;openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("testPosition"),url);}function deleteCompanionSession(divId2Delete,blockNum){var url="modifyCreditCardProfile.do?method=deleteCompanionInfo&delCardInfo="+blockNum;openDivForEditUpdated(document.getElementById("editForm"),document.getElementById("companion"),url);}function divResetGeneralFunction(DivName,TotalTxt,parentDiv,FunctionIn){var cnt;var nameDiv;var tempDivName=DivName.split("myBtn");DivName="myDivCreditCard"+tempDivName[1];if(FunctionIn=="CCard"){nameDiv="myDivCreditCard";}cnt=parseInt(document.getElementById(TotalTxt).value);var obj=document.getElementById(DivName);num1=obj.id.split(nameDiv);num=parseInt(num1[1]);var a1=document.getElementById(parentDiv);a1.removeChild(obj);var i=0;for(i=num+1;i<=cnt;i++){document.getElementById(nameDiv+i).id=nameDiv+(i-1);document.getElementById("myBtn"+i).id="myBtn"+(i-1);document.getElementById("divAddress"+i).id="divAddress"+(i-1);for(i1=0;i1<document.modifyProfileForm.elements.length;i1++){if(document.modifyProfileForm.elements[i1].name=="rdoCCType"+i){document.modifyProfileForm.elements[i1].name="rdoCCType"+(i-1);}if(document.modifyProfileForm.elements[i1].name=="radioAddress_"+i){document.modifyProfileForm.elements[i1].name="radioAddress_"+(i-1);}}}resetCreditCard(tempDivName[1]);cnt=cnt-1;document.getElementById(TotalTxt).value=cnt;}function divResetGeneralFunctionForCompanion(DivName,TotalTxt,parentDiv,FunctionIndx){var cnt;var nameDiv;nameDiv="companionDiv";nameDivParent="nameDivParent";cnt=parseInt(document.getElementById(TotalTxt).value);var obj=document.getElementById(DivName);num1=FunctionIndx;num=parseInt(num1);var a1=obj.parentNode;a1.removeChild(obj);var i=0;for(i=num+1;i<=cnt;i++){document.getElementById(nameDiv+i).id=nameDiv+(i-1);document.getElementById(nameDivParent+i).id=nameDivParent+(i-1);document.getElementById(i).id=""+(i-1);}resetCompanion(num);cnt=cnt-1;document.getElementById(TotalTxt).value=cnt;}function divResetGeneralFunctionAddress(DivName,TotalTxt,parentDiv,FunctionIn){var cnt;var nameDiv;var tempDivName=DivName.split("myBtn");DivName="myDivAddress"+tempDivName[1];if(FunctionIn=="Address"){nameDiv="myDivAddress";}cnt=parseInt(document.getElementById(TotalTxt).value);var obj=document.getElementById(DivName);num1=obj.id.split(nameDiv);num=parseInt(num1[1]);var a1=document.getElementById(parentDiv);a1.removeChild(obj);var i=0;for(i=num+1;i<=cnt;i++){document.getElementById(nameDiv+i).id=nameDiv+(i-1);document.getElementById("myBtn"+i).id="myBtn"+(i-1);}resetAddress(tempDivName[1]);cnt=cnt-1;document.getElementById(TotalTxt).value=cnt;}function resetCreditCard(num){var i1=0;var i=0;var name="";for(i=0;i<document.modifyProfileForm.elements.length;i++){name=document.modifyProfileForm.elements[i].name;name=name.split("[");if(!(name[0]==null||name[0]=="")){if(name[0]!="modifyProfileModel.delCard"){if(!(name[1]==null||name[i]=="")){elPosition=name[1].split("]");if(!(elPosition[0]==null||elPosition[0]=="")){elIntPosition=parseInt(elPosition[0]);if(i>=num&&elIntPosition>num){document.modifyProfileForm.elements[i].name=name[0]+"["+(elIntPosition-1)+"]";}}}}}}}function resetAddress(num){var i1=0;var i=0;var name="";for(i=0;i<document.modifyProfileForm.elements.length;i++){name=document.modifyProfileForm.elements[i].name;name=name.split("[");if(!(name[0]==null||name[0]=="")){if(name[0]!="modifyProfileModel.delCard"){if(!(name[1]==null||name[i]=="")){elPosition=name[1].split("]");if(!(elPosition[0]==null||elPosition[0]=="")){elIntPosition=parseInt(elPosition[0]);if(i>=num&&elIntPosition>num){document.modifyProfileForm.elements[i].name=name[0]+"["+(elIntPosition-1)+"]";}}}}}}}function resetCompanion(num){var i1=0;var i=0;var name="";for(i=0;i<document.modifyProfileForm.elements.length;i++){name=document.modifyProfileForm.elements[i].name;name=name.split("[");if(!(name[0]==null||name[0]=="")){if(name[0]!="modifyProfileModel.companionTotal"){if(!(name[1]==null||name[i]=="")){elPosition=name[1].split("]");if(!(elPosition[0]==null||elPosition[0]=="")){elIntPosition=parseInt(elPosition[0]);if(i>=num&&elIntPosition>num){document.modifyProfileForm.elements[i].name=name[0]+"["+(elIntPosition-1)+"]";}}}}}}}function showNormalPasswordGuest(thisobj){if(thisobj.value==""){var obj=document.getElementById("divpassnewGuest");thisobj.name="pass*";document.getElementById("passwordGuestDiv").style.display="block";document.getElementById("divpassnewGuest").style.display="none";for(i=0;i<document.signInGuestForm.elements.length;i++){if(document.signInGuestForm.elements[i].name=="password"){document.signInGuestForm.elements[i].value="Password";document.signInGuestForm.elements[i].focus();break;}}}}function showPasswordInNewPass(nameVal,hideDiv,showDiv){var obj=document.getElementById(hideDiv);obj.innerHTML="";document.getElementById(hideDiv).style.display="none";document.getElementById(showDiv).style.display="block";for(i=0;i<document.changePasswordForm.elements.length;i++){if(document.changePasswordForm.elements[i].name==nameVal){document.changePasswordForm.elements[i].focus();break;}}}function showAddress(divName,rdoIndex,indx){var newYesOrNo="No";var txtVal="modifyProfileModel.useAddress["+indx+"]";if(rdoIndex=="0"){document.getElementById(divName).style.display="none";}else{document.getElementById(divName).style.display="inline";newYesOrNo="Yes";}for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].name==txtVal){document.modifyProfileForm.elements[i].value=newYesOrNo;}}}function managePnrOnFlightHistoryPage(pnrValue,isBooker,linkId){document.getElementById("pnrValue").value=pnrValue;document.getElementById("isbookre").value=isBooker;document.pnrDetailForm.submit();showLoadingImageOpen(linkId);}function managePnrOnLoginWindow(pnrValue,isBooker){document.getElementById("pnrValueLoginWindow").value=pnrValue;document.getElementById("isbookreLoginWindow").value=isBooker;document.managePnrOnLoginWindow.submit();showLoadingImageOpen("managePnrOnLoginWindowId");}function divhideFunctionErrorAjax(divID){var x=document.getElementById(divID);if(x.style.display=="block"){x.style.display="none";iswap=0;}else{if(x.style.display=="none"||x.style.display==""){x.style.display="block";}}}function checkOptOptions(ajaxDiv){var optionString=new Array(2);for(i=0;i<1;i++){var x=eval("document.getElementById"+'("'+"optcheck"+i+'")');var k=0;if(x.checked==true){k=1;}optionString[i]=k;}optionString.join();disablePage();document.getElementById("editForm").innerHTML="<img src='images/loading.gif'/>";document.getElementById("editForm").style.display="block";setPosition(document.getElementById(ajaxDiv),document.getElementById("editForm"),-200,30);var myUrl="updateOptIn.do?method=modifyOptInOptions&optInFlag="+optionString;var myAjax=new Ajax.Updater({success:"editForm"},myUrl,{method:"post",evalScripts:"true",onSuccess:done});enablePage();function done(){}}function closeOpenAjax(divName){if(document.getElementById(divName)){if(document.getElementById(divName).style.display=="block"){document.getElementById(divName).style.display="none";document.getElementById("whtBackCol").style.backgroundColor="#900002";}else{document.getElementById(divName).style.display="block";document.getElementById("whtBackCol").style.backgroundColor="#FFFFFF";}}}function closeDivWindow(divName){if(document.getElementById(divName)){document.getElementById(divName).style.display="none";}else{}}function openPreAndNextAddress(responseDiv,moveType){var url="";url="nextAndPreviousAdressesInfo.do?method=nextAndPreviousAdressesInfo&moveType="+moveType;ajaxProfile(url,responseDiv);}function showManageAddressesSubmit(ImageId,divName){var positionObj=ImageId;myUrl="showManageAddressesAction.do?method=showManageAddresses";ajaxShow(myUrl,divName);showLoadingImageOpen(ImageId);setPosition(document.getElementById(positionObj),document.getElementById(divName),100,-20);}function addManageAddressesSubmit(ImageId,divName){var positionObj=ImageId;myUrl="showManageAddressesAction.do?method=addManageAddresses";ajaxUpdate(myUrl,divName,"no");}function deleteManageAddressesSubmit(divName,addressId){myUrl="updateManageAddressesAction.do?method=deleteManageAddresses&addressId="+addressId;if(document.getElementById("viewPricingAllDiv")){holdInnerHtml=document.getElementById("viewPricingAllDiv").innerHTML;}ajaxUpdate(myUrl,divName,"no");}function updateManageAddressesSubmit(ImageId,divName){var updateAddressUrl=null;var positionObj=ImageId;updateAddressUrl="updateManageAddressesAction.do?method=modifyManageAddresses";for(i=0;i<document.modifyAddressForm.elements.length;i++){updateAddressUrl=updateAddressUrl+"&"+document.modifyAddressForm.elements[i].name+"="+document.modifyAddressForm.elements[i].value;}if(document.getElementById("viewPricingAllDiv")){holdInnerHtml=document.getElementById("viewPricingAllDiv").innerHTML;}ajaxUpdate(updateAddressUrl,divName,"no");}function updateGuestPage(){if(document.getElementById("viewPricingAllDiv")){document.getElementById("viewPricingAllDiv").innerHTML=holdInnerHtml;}if(document.getElementById("showManageAddressesDiv")){document.getElementById("showManageAddressesDiv").style.display="none";}if(document.getElementById("showEditContactInfoDiv")){document.getElementById("showEditContactInfoDiv").style.display="none";}}function ajaxShow(myurl,div){document.getElementById(div).style.display="none";xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;ajaxDiv=div;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponseShow;xmlhttp.send("");}function handleResponseShow(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){if(ajaxDiv=="showManageAddressesDiv"){document.getElementById(ajaxDiv).innerHTML='<iframe frameborder="0" style="position:absolute;top:0px;left:0px;width:590px;height:395px;" src="SSLIframeFixed.html"></iframe>'+'<div style="position: relative;">'+xmlhttp.responseText+"</div>";}else{document.getElementById(ajaxDiv).innerHTML=xmlhttp.responseText;}document.getElementById("loadingDiv").style.display="none";document.getElementById(ajaxDiv).style.display="block";}}}function ajaxUpdate(myurl,div,modeType){document.getElementById(div).style.display="none";setPosition(document.getElementById("manageAddressesId"),document.getElementById("loadingDiv"),-20,-20);document.getElementById("loadingDiv").style.display="block";xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponseUpdate;xmlhttp.send("");}function handleResponseUpdate(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){document.getElementById("loadingDiv").style.display="none";document.getElementById(ajaxDiv).style.display="block";var resTxt=xmlhttp.responseText;if(resTxt.indexOf("images/travel_text_bg.gif")!=-1){document.getElementById("viewPricingAllDiv").innerHTML=xmlhttp.responseText;document.getElementById("showNewAddressWindow").style.display="none";document.getElementById("loadingDiv").style.display="none";document.getElementById("divAddress0").style.display="block";}else{if(resTxt.indexOf("images/VA_Purchase_BuyTicket_heade.gif")!=-1){document.getElementById("sect").innerHTML=xmlhttp.responseText;}else{document.getElementById(ajaxDiv).innerHTML='<iframe frameborder="0" style="position:absolute;top:0px;left:0px;width:590px;height:395px;" src="SSLIframeFixed.html"></iframe>'+'<div style="position: relative;">'+xmlhttp.responseText+"</div>";if(document.getElementById("showNewAddressWindow")){document.getElementById("showNewAddressWindow").style.display="none";}document.getElementById("loadingDiv").style.display="none";if(document.getElementById("divAddress0")){document.getElementById("divAddress0").style.display="block";}}}}}}function signInFromTravellerAndPurchaseSubmit(pageValue){document.signInForm.method.value="signInFromTravellerAndPurchase";document.signInForm.fltMethod.value=pageValue;document.signInForm.action="signInTravellerAndPurchase.do";document.signInForm.submit();document.getElementById("submitID").innerHTML='<img src="images/btn_sign-in.gif" height="20" width="63" alt="Sign In" title="Sign In" border="0" />';document.getElementById("SignIn").innerHTML="<img src='images/loading.gif'/>";}function signInElevateHome(pageValue){document.signInForm.method.value="signInFromHome";document.signInForm.fltMethod.value=pageValue;document.signInForm.action="signInTravellerAndPurchase.do";document.signInForm.submit();document.getElementById("submitID").innerHTML='<img src="images/btn_sign-in.gif" height="20" width="63" alt="Sign In" title="Sign In" border="0" />';document.getElementById("SignIn").innerHTML="<img src='images/loading.gif'/>";}function MakeCursor(abh){abh.style.cursor="pointer";}function enterSignInlogin(thisobj){var TestVar2=thisobj.value;TestVar2=TestVar2.replace(/^\s+/,"");if(TestVar2==""){TestVar2="Email, Alias or Elevate#";thisobj.value=TestVar2;}}function enterSignloginclk(thisobj){TestVar2="Email, Alias or Elevate#";if(thisobj.value==TestVar2){thisobj.value=TestVar2;thisobj.focus();thisobj.select();}}function signInAnswerclk(thisobj){TestVar2="Answer";if(thisobj.value==TestVar2){thisobj.value=TestVar2;thisobj.focus();thisobj.select();}}function signInAnswer(thisobj){var TestVar2=thisobj.value;TestVar2=TestVar2.replace(/^\s+/,"");if(TestVar2==""){TestVar2="Answer";thisobj.value=TestVar2;}}function enterEmailAddress(thisobj){var TestVar4=thisobj.value;TestVar4=TestVar4.replace(/^\s+/,"");if(TestVar4==""){TestVar4="Email Address";thisobj.value=TestVar4;}}function enterEmailAddressclk(thisobj){TestVar4="Email Address";if(thisobj.value==TestVar4){thisobj.value=TestVar4;thisobj.focus();thisobj.select();}}function entername(thisobj){var TestVar=thisobj.value;TestVar=TestVar.replace(/^\s+/,"");if(TestVar==""){TestVar="Last Name";thisobj.value=TestVar;}}function enternameclk(thisobj){TestVar="Last Name";if(thisobj.value==TestVar){thisobj.value=TestVar;thisobj.focus();thisobj.select();}}function enterpnr(thisobj){var TestVar1=thisobj.value;TestVar1=TestVar1.replace(/^\s+/,"");if(TestVar1==""){TestVar1="Confirmation Code";thisobj.value=TestVar1;}}function enterpnrclk(thisobj){TestVar1="Confirmation Code";if(thisobj.value==TestVar1){thisobj.value=TestVar1;thisobj.focus();thisobj.select();}}function enterlogin(thisobj){var TestVar2=thisobj.value;TestVar2=TestVar2.replace(/^\s+/,"");if(TestVar2==""){TestVar2="Email, Alias or Elevate#";thisobj.value=TestVar2;}}function enterloginclk(thisobj){TestVar2="Email, Alias or Elevate#";if(thisobj.value==TestVar2){thisobj.value=TestVar2;thisobj.focus();thisobj.select();}}function enterpassword(thisobj){var TestVar3=thisobj.value;TestVar3=TestVar3.replace(/^\s+/,"");if(TestVar3==""){TestVar3="Password";thisobj.value=TestVar3;}}function enterpasswordclk(thisobj){TestVar3="Password";thisobj.value=TestVar3;thisobj.focus();thisobj.select();}function enterpassclk(thisobj){TestVar3="Password";thisobj.value=TestVar3;thisobj.focus();thisobj.select();}var character;var browserAgent;function returnChar(e){var n=navigator;browserAgent=n.userAgent;var code;if(!e){var e=window.event;}if(e.keyCode){code=e.keyCode;}else{if(e.which){code=e.which;}}var char1=String.fromCharCode(code);character=char1;}function showPassword(thisobj,passwordFirstDiv,passwordSecondDiv,formName,eventProcedure){returnChar(eventProcedure);var obj=document.getElementById(passwordFirstDiv);thisobj.name="pass1";var documentForm=eval("document."+formName);document.getElementById(passwordFirstDiv).style.display="none";document.getElementById(passwordSecondDiv).style.display="block";for(i=0;i<documentForm.elements.length;i++){if(documentForm.elements[i].name=="password"){if(browserAgent.indexOf("MSIE")!=-1){documentForm.elements[i].value="";}else{documentForm.elements[i].value="";}documentForm.elements[i].focus();break;}}}function showPasswordOnRightClick(thisobj,passwordFirstDiv,passwordSecondDiv,formName,eventProcedure){if(eventProcedure.button==2){returnChar(eventProcedure);var obj=document.getElementById(passwordFirstDiv);thisobj.name="pass1";var documentForm=eval("document."+formName);document.getElementById(passwordFirstDiv).style.display="none";document.getElementById(passwordSecondDiv).style.display="block";for(i=0;i<documentForm.elements.length;i++){if(documentForm.elements[i].name=="password"){if(browserAgent.indexOf("MSIE")!=-1){documentForm.elements[i].value="";}else{documentForm.elements[i].value="";}documentForm.elements[i].focus();break;}}}}function showMessageForUsers(linkId,popUpId){setPosition(document.getElementById(linkId),document.getElementById(popUpId),180,-45);document.getElementById(popUpId).style.display="block";}function closeMsgWinForUsers(){document.getElementById("MessageForUsers").style.display="none";document.showNeedPointsForm.submit();}function showNormalPasswordGenView(thisobj){if(thisobj.value==""){var obj=document.getElementById("divpassnewGuest");thisobj.name="pass*";document.getElementById("passwordGuestDiv").style.display="block";document.getElementById("divpassnewGuest").style.display="none";for(i=0;i<document.signInForm.elements.length;i++){if(document.signInForm.elements[i].name=="password"){document.signInForm.elements[i].value="Password";document.signInForm.elements[i].focus();break;}}}}function showNormalPasswordGen(thisobj){if(thisobj.value==""){var obj=document.getElementById("divpassnewGuest");thisobj.name="pass*";document.getElementById("passwordGuestDiv").style.display="block";document.getElementById("divpassnewGuest").style.display="none";for(i=0;i<document.signInPnrForm.elements.length;i++){if(document.signInPnrForm.elements[i].name=="password"){document.signInPnrForm.elements[i].value="Password";document.signInPnrForm.elements[i].focus();break;}}}}function showNormalPassword(thisobj){if(thisobj.value==""){var obj=document.getElementById("divpassnew");thisobj.name="pass*";document.getElementById("passwordDiv").style.display="block";document.getElementById("divpassnew").style.display="none";for(i=0;i<document.signInForm.elements.length;i++){if(document.signInForm.elements[i].name=="password"){document.signInForm.elements[i].focus();break;}}}}function enterflight(thisobj){var TestVar2=thisobj.value;if(TestVar2==""){TestVar2="Flight Number";thisobj.value=TestVar2;}}function enterflightclk(thisobj){TestVar2="Flight Number";if(thisobj.value=="Flight Number"){thisobj.value=TestVar2;thisobj.focus();thisobj.select();}}function setFocusOnBtnHome(){}function setVariables(){if(navigator.appName=="Netscape"){v=".top=";h=".left=";dS="document.";sD="";y="window.pageYOffset";x=0;iW="window.innerWidth";iH="window.innerHeight";}else{h=".pixelLeft=";v=".pixelTop=";dS="";sD=".style";y="document.body.scrollTop";x=0;iW="document.body.clientWidth";iH="document.body.clientHeight";}object="scrollYTS";checkLocationA();}function showHideNewAddressDiv(beanValue,loopId){if(beanValue=="newCard"){document.getElementById("newCardDivOnPopUp"+loopId).style.display="block";document.getElementById("div123"+loopId).style.overflow="auto";}if(beanValue=="savedCard"){document.getElementById("newCardDivOnPopUp"+loopId).style.display="none";document.getElementById("div123"+loopId).style.overflow="auto";}}function changeAddress(addressSize){for(i=0;i<addressSize;i++){if(document.getElementById("dynamicAddressDiv"+i)){document.getElementById("dynamicAddressDiv"+i).style.display="none";}}if(document.getElementsByName("viewPurchaseModel.savedAddressName")){if(document.getElementsByName("viewPurchaseModel.savedAddressName")[0]){var addressIndex=document.getElementsByName("viewPurchaseModel.savedAddressName")[0].selectedIndex;}}var divName="dynamicAddressDiv"+addressIndex;if(document.getElementById(divName)){document.getElementById(divName).style.display="block";}}var divToOpenByAjax;var refDiv;var addNewAddress=new Array(2);function openDivForManageCreditCard(divToOpen,posDiv){var ajaxUrl="";ajaxUrl="manageCreditCard.do?method=manageCreditCard";refDiv=posDiv;ajaxToOpenDiv(ajaxUrl,divToOpen);}function returnNull(){}function openCloseNewCardDiv(beanValue){if(beanValue=="savedCard"||beanValue=="VirginAmericaSignatureCard"){if(document.getElementById("newCardDiv")){document.getElementById("newCardDiv").style.display="none";}}if(beanValue=="newCard"){if(document.getElementById("newCardDiv")){if(document.getElementById("newCardDiv").style.display=="none"){var form;if(document.receiptForm){form=document.receiptForm;}else{form=document.checkInConfirmForm;}form.elements["viewPurchaseModel.cardNo"].value="";form.elements["viewPurchaseModel.nameOnCard"].value="";form.elements["viewPurchaseModel.cardType"].selectedIndex=0;form.elements["viewPurchaseModel.date"].value="00";form.elements["viewPurchaseModel.year"].value="1";if(form.elements["viewPurchaseModel.cardNickName"]){form.elements["viewPurchaseModel.cardNickName"].value="";}document.getElementById("securityCodeTd").style.visibility="visible";var els=document.getElementById("newCardDiv").getElementsByTagName("*");for(var i=0,j=els.length;i<j;i++){if(els[i].className=="style8_error"){els[i].className="style8";}else{if(els[i].className=="Guest_input_TextType_error"){els[i].className="Guest_input_TextType";}else{if(els[i].tagName=="IMG"&&els[i].getAttribute("src").indexOf("Error_logo_horizontal.gif")!=-1){els[i].setAttribute("src","images/spacer.gif");}}}}}document.getElementById("newCardDiv").style.display="block";}}}function openCloseNewAddresssDiv(beanValue){if(beanValue=="savedAddress"){if(document.getElementById("newAddressDiv")){document.getElementById("newAddressDiv").style.display="none";}}if(beanValue=="newAddress"){if(document.getElementById("newAddressDiv")){document.getElementById("newAddressDiv").style.display="block";}}}function openCloseNewAddressDiv(beanValue){if(beanValue=="useOldAddress"){if(document.getElementById("showNewAddressWindow")){document.getElementById("showNewAddressWindow").style.display="none";}}if(beanValue=="useNewAddress"){if(document.getElementById("showNewAddressWindow")){document.getElementById("showNewAddressWindow").style.display="block";}}}function updateCreditCardUrl(){var updateCreditUrl=null;var loop=0;updateCreditUrl="editCreditCardPurchase.do?method=editCreditCardPurchase";for(i=0;i<document.modifyProfileForm.elements.length;i++){if(document.modifyProfileForm.elements[i].type=="radio"){if(document.modifyProfileForm.elements[i].checked){if(document.modifyProfileForm.elements[i].value=="new"){addNewAddress[loop]="new";loop++;}if(document.modifyProfileForm.elements[i].value=="stored"){addNewAddress[loop]="stored";loop++;}updateCreditUrl=updateCreditUrl+"&"+document.modifyProfileForm.elements[i].name+"="+document.modifyProfileForm.elements[i].value;}}else{updateCreditUrl=updateCreditUrl+"&"+document.modifyProfileForm.elements[i].name+"="+document.modifyProfileForm.elements[i].value;}}ajaxToOpenDiv(updateCreditUrl,"sect");}function addCreditCardPurchase(){var addCardUrl=null;addCardUrl="addCreditCardPurchase.do?method=addCreditCard";ajaxToOpenDiv(addCardUrl,"manageCreditCardDiv");}function moveCreditCardPurchase(movetype){var addCardUrl=null;addCardUrl="moveCreditCardPurchase.do?method=moveCreditCard&moveType="+movetype;ajaxToOpenDiv(addCardUrl,"manageCreditCardDiv");}function deleteCreditCardPurchase(cardId){var addCardUrl=null;addCardUrl="deleteCreditCardPurchase.do?method=deleteCreditCard&cardId="+cardId;if(cardId==0){ajaxToOpenDiv(addCardUrl,"manageCreditCardDiv");}else{ajaxToOpenDiv(addCardUrl,"sect");}}function updatePurchasePage(eId){var updateUrl=null;updateUrl="updatePurchasePage.do?method=homeProfileWithPagination&entity="+eId;ajaxToOpenDiv(updateUrl,"sect");}function ajaxToOpenDiv(myurl,div1){if(div1!="sect"){document.getElementById(div1).style.display="none";document.getElementById("loadingDiv").style.display="block";setPosition(document.getElementById(refDiv),document.getElementById("loadingDiv"),75,-20);disableTotalpage();}else{document.getElementById("manageCreditCardDiv").style.display="none";if(document.getElementById("showManageAddressesDiv")){document.getElementById("showManageAddressesDiv").style.display="none";}disableTotalpage();document.getElementById("loadingDiv").style.display="block";setPosition(document.getElementById(refDiv),document.getElementById("loadingDiv"),75,-20);}xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;divToOpenByAjax=div1;xmlhttp.open("POST",myurl,true);chkURL=myurl;xmlhttp.onreadystatechange=handleResponseEditCreditCard;xmlhttp.send("");}function handleResponseEditCreditCard(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){if(xmlhttp.responseText.indexOf("images/manageCreditCard.gif")!=-1){document.getElementById("manageCreditCardDiv").innerHTML='<iframe frameborder="0" style="position:absolute;top:0px;left:0px;width:590px;height:395px;" src="SSLIframeFixed.html"></iframe>'+'<div style="position: relative;">'+xmlhttp.responseText+"</div>";divToOpenByAjax="manageCreditCardDiv";}else{document.getElementById(divToOpenByAjax).innerHTML=xmlhttp.responseText;}document.getElementById("loadingDiv").style.display="none";document.getElementById(divToOpenByAjax).style.display="block";document.getElementById("disableTotalPage").style.display="none";if((document.getElementById("manageCreditCardDiv").innerHTML).indexOf("Your Information has not been successfully updated")!=-1){document.getElementById("manageCreditCardDiv").style.display="block";setPosition(document.getElementById(refDiv),document.getElementById("manageCreditCardDiv"),215,-20);}if(divToOpenByAjax!="sect"){setPosition(document.getElementById(refDiv),document.getElementById(divToOpenByAjax),215,-20);for(k=0;k<addNewAddress.length;k++){if(addNewAddress[k]=="new"){showHideNewAddressDiv("newCard",k);addNewAddress[k]="";}}}}}}function setPositionTravelExp(){var toplength="";toplength=document.getElementById("scrollYTS").style.top;if(toplength==""){document.getElementById("scrollYTS").style.top="0pt";}var length=document.getElementById("scrollYTS").style.top.split("p");var totalLength=eval(document.getElementById("bottomMove").offsetTop)+eval(length[0])+250;if(totalLength>getXandY(document.getElementById("cornerFooter")).y){var difference=totalLength-document.getElementById("bottomLimitForScroll").offsetTop-60;var YtsTop=eval(length[0]-difference);if(YtsTop<4){if(document.getElementById("upperLimitForScroll")){document.getElementById("scrollYTS").style.top=document.getElementById("upperLimitForScroll").style.top;}}else{document.getElementById("scrollYTS").style.top=YtsTop;}if(document.getElementById("upperLimitForScroll")){checkLocation();}}}function checkLocation(){yy=eval(y);ydiff=ystart-yy;if(isScroll=="Yes"){if((ydiff<(-1))||(ydiff>(1))){movey=Math.round(ydiff/10),ystart-=movey;}varEndPoint=ystart;if(document.getElementById("bodyEnd").offsetTop<document.getElementById("bottomLimitForScroll").offsetTop){}if(document.getElementById("bottomLimitForScroll").offsetTop<varEndPoint+(document.getElementById("bottomMove").offsetTop-document.getElementById("topMove").offsetTop)+150){}else{if(document.getElementById("upperLimitForScroll").offsetTop<0){}else{document.getElementById("scrollYTS").style.top=ystart;}}}setTimeout("checkLocation()",1);}function checkLocationA(){ystart=eval(y);xstart=eval(x);}function delayLogo(){eval(dS+object+sD+v+0);eval(dS+object+sD+h+(-200));object="scrollYTS";}function closeFareRulDiv(divName){document.getElementById(positionDivFare).style.display="none";document.getElementById("disableTotalPage").style.display="none";isScroll="Yes";}function showPromoCodeDiv(LinkId){document.getElementById("promoCodeErrTxt").innerHTML='If you happen to have a Virgin America promo code, enter it here and click the "Apply" button to cash in for a lower fare or special offer.';document.getElementById("searchWinFrm").style.height=118;setSafariXY(200,120,140,100);setPosition(LinkId,document.getElementById("searchPromoCode"),loadX,loadY);document.getElementById("searchPromoCode").style.display="block";document.getElementById("promoCodeText").value="";document.getElementById("promoCodeText").focus();checkSearchTypeLink=LinkId;}function removePromoCode(){showWaitImage(document.getElementById("promoCodeText"));var removePromoUrl="promoCodeRemove.do?method=removePromoCode";promoCodeRemoveAjax(removePromoUrl);}var removePromoCodeXmlhttp=new XMLHttpRequest();function promoCodeRemoveAjax(url){removePromoCodeXmlhttp.open("POST",url,true);removePromoCodeXmlhttp.onreadystatechange=handleResponseRemovePromoCode;removePromoCodeXmlhttp.send("");}function handleResponseRemovePromoCode(){if(removePromoCodeXmlhttp.readyState==4){if(removePromoCodeXmlhttp.status==200){var resTxt=removePromoCodeXmlhttp.responseText;ajax("updateTitleBar.do?method=updateTitleBar","titleBarDiv");document.flightSearchOWForm.elements["flightSearch.searchPromoCode"].value="";document.flightSearchRTForm.elements["flightSearch.searchPromoCode"].value="";document.flightSearchMCForm.elements["flightSearch.searchPromoCode"].value="";document.getElementById("promoLink1").innerHTML='<div align="center" ><a href="#" onclick="javaScript:showPromoCodeDiv(this)" class="lnkText10" id="gotpromoRT">Got a Promo Code?</a></div>';document.getElementById("promoLink2").innerHTML='<div align="center" ><a href="#" onclick="javaScript:showPromoCodeDiv(this)" class="lnkText10" id="gotpromoOW">Got a Promo Code?</a></div>';document.getElementById("promoLink3").innerHTML='<div align="center" ><a href="#" onclick="javaScript:showPromoCodeDiv(this)" class="lnkText10" id="gotpromoMC">Got a Promo Code?</a></div>';enableDisablePointOption(false);}}}function ajax(myurl,div){var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;xmlhttp.open("POST",myurl,true);ajaxDiv=div;xmlhttp.onreadystatechange=handleResponseSelectUpdateTitleBar;xmlhttp.send("");}function handleResponseSelectUpdateTitleBar(){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"");};if(xmlhttp.readyState==4){if(xmlhttp.status==200){if((xmlhttp.responseText).trim()=="AjaxSessionTimeOut"){window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{if((xmlhttp.responseText).trim()=="AjaxError"){window.location="/va/home.do?method=virginAmerica&fromErrorPage=fromErrorPage";}else{if(document.getElementById(ajaxDiv)){document.getElementById(ajaxDiv).innerHTML=xmlhttp.responseText;}showLoadingImageClose();}}}}}function searchPromoCodeVal(){var tripType="other";if(document.getElementById("divOW").style.display=="block"){tripType="OW";}if(document.getElementById("promoCodeText").value!=""){document.flightSearchOWForm.elements["flightSearch.searchPromoCode"].value=document.getElementById("promoCodeText").value;document.flightSearchRTForm.elements["flightSearch.searchPromoCode"].value=document.getElementById("promoCodeText").value;document.flightSearchMCForm.elements["flightSearch.searchPromoCode"].value=document.getElementById("promoCodeText").value;document.getElementById("promoCodeText").focus();}else{document.flightSearchOWForm.elements["flightSearch.searchPromoCode"].value="";document.flightSearchRTForm.elements["flightSearch.searchPromoCode"].value="";document.flightSearchMCForm.elements["flightSearch.searchPromoCode"].value="";}var promoUrl="promoCodeApply.do?method=applyPromoCode&certCode="+document.getElementById("promoCodeText").value+"&tripType="+tripType;showWaitImage(checkSearchTypeLink);promoCodeAjax(promoUrl);}var promoCodeXmlhttp=new XMLHttpRequest();function promoCodeAjax(url){promoCodeXmlhttp.open("POST",url,true);promoCodeXmlhttp.onreadystatechange=handleResponsePromoCode;promoCodeXmlhttp.send("");}function handleResponsePromoCode(){if(promoCodeXmlhttp.readyState==4){if(promoCodeXmlhttp.status==200){var resTxt=promoCodeXmlhttp.responseText;resTxt=trimAll(resTxt);if(resTxt.indexOf("Promo Code Applied")!=-1){document.getElementById("promoLink1").innerHTML='<strong><font color="#D10000">'+resTxt+'</font></strong><a href="#" onclick="javaScript:removePromoCode()" class="lnkText10">(Remove)</a>';document.getElementById("promoLink2").innerHTML='<strong><font color="#D10000">'+resTxt+'</font></strong><a href="#" onclick="javaScript:removePromoCode()" class="lnkText10">(Remove)</a>';document.getElementById("promoLink3").innerHTML='<strong><font color="#D10000">'+resTxt+'</font></strong><a href="#" onclick="javaScript:removePromoCode()" class="lnkText10">(Remove)</a>';document.getElementById("searchPromoCode").style.display="none";enableDisablePointOption(true);ajax("updateTitleBar.do?method=updateTitleBar","titleBarDiv");}else{showLoadingImageClose();if(resTxt.indexOf("Please enter your promo code")!=-1){document.getElementById("promoCodeErrTxt").innerHTML='<strong><font color="#722F8C"> <left>'+resTxt+"</left></font></strong>";}else{document.getElementById("promoCodeErrTxt").innerHTML='<strong><font color="#722F8C"> <center>'+resTxt+" Please try again!!</center></font></strong>";}document.getElementById("searchWinFrm").style.height=96;document.getElementById("searchPromoCode").style.display="block";increaseErrorCount("promoCode",document.estara_form);}}}}function enableDisablePointOption(optionFlg){flg=false;for(frmCnt=0;frmCnt<document.forms.length;frmCnt++){for(eleCnt=0;eleCnt<document.forms[frmCnt].elements.length;eleCnt++){ele=document.forms[frmCnt].elements[eleCnt];if(ele.name=="fareFormatType"&&ele.value=="Points"){if(optionFlg){ele.disabled="disabled";}else{ele.disabled=false;}flg=true;break;}}if(flg){break;}}}function trimAll(sString){while(sString.substring(0,1)==" "){sString=sString.substring(1,sString.length);}while(sString.substring(sString.length-1,sString.length)==" "){sString=sString.substring(0,sString.length-1);}return sString;}function callWantPromoCode(){document.MeetVaForm.method.value="showWantMeetVa";document.MeetVaForm.action="wantPromoCode.do";document.MeetVaForm.submit();}function closeDiv(divID){document.getElementById(divID).style.display="none";}function chVarDisable(){disableIds=0;}function SS_MakeCursor(arg,btnIds){if(disableIds==1){arg.style.cursor="default";}if(disableIds==0){arg.style.cursor="pointer";if(btnIds=="continue"){MM_swapImage("continue","","images/btn_GoOn_roll.gif",1);}if(btnIds=="previous"){MM_swapImage("previous","","images/btn_GoBack_roll.gif",1);}}}function getAnchorXY(VF_id){var c=getAnchorPosition(VF_id);X1=c.x;Y1=c.y;}function MakeCursor(arg){arg.style.cursor="pointer";}function isValidDate(dateStr){var bool=true;if(dateStr!=""&&dateStr!="----------------------------"){var datePat=/^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2}|\d{4})$/;var matchArray=dateStr.match(datePat);if(dateStr=="mm/dd/yyyy"||dateStr==""){dateStr="";return true;}if(matchArray!=null){month=matchArray[1];day=matchArray[3];year=matchArray[4];if(month<1||month>12){document.getElementById("textMessage").innerHTML="Month must be between 1 and 12.";document.getElementById("formatMessage").style.display="block";bool=false;}if(day<1||day>31){document.getElementById("textMessage").innerHTML="Day must be between 1 and 31.";document.getElementById("formatMessage").style.display="block";bool=false;}if((month==4||month==6||month==9||month==11)&&day==31){document.getElementById("textMessage").innerHTML="Month "+month+" doesn't have 31 days!";document.getElementById("formatMessage").style.display="block";bool=false;}if(month==2){var isleap=(year%4==0&&(year%100!=0||year%400==0));if(day>29||(day==29&&!isleap)){document.getElementById("textMessage").innerHTML="February "+year+" doesn't have "+day+" days!";document.getElementById("formatMessage").style.display="block";bool=false;}}if(year.length!=4){document.getElementById("textMessage").innerHTML="Year format should be in 'yyyy'.";document.getElementById("formatMessage").style.display="block";bool=false;}}else{document.getElementById("textMessage").innerHTML="Please provide proper date format (mm/dd/yyyy)";document.getElementById("formatMessage").style.display="block";bool=false;}}return bool;}function showWaitImage(buttonName){setSafariXY(0,100,10,100);setPosition(buttonName,document.getElementById("loadingDiv"),loadX,loadY);document.getElementById("loadingDiv").style.display="block";}function checkDateAndSubmit(date1,date2,frm,buttonName){if(document.getElementById("titleBarDiv")){updateTitileBar("updateTitleBar.do?method=updateTitleBar&atHome=atHome","titleBarDiv");}var dt=(new Date().getMonth()+1)+"/"+new Date().getDate()+"/"+(new Date().getYear()+1900);var dt1=(new Date().getMonth()+1)+"/"+new Date().getDate()+"/"+(new Date().getYear());var date11=new Date(date1);var date22=new Date(date2);var expiredays=30;var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);if(frm.name=="flightSearchRTForm"){setCookie("TT","rt",exdate);}else{if(frm.name=="flightSearchOWForm"){setCookie("TT","ow",exdate);}else{setCookie("TT","mc",exdate);}}if(frm.action.indexOf("ScheduleResult")!=-1){frm.elements["flightSearch.adults"].value="1";frm.elements["flightSearch.kids"].value="0";}setCookies();if(isValidDate(date1)&&isValidDate(date2)){if((((date1+"")==(dt+"")&&(date2+"")==(dt+""))||((date1+"")==(dt1+"")&&(date2+"")==(dt1+"")))&&(date1+"")!="mm/dd/yyyy"&&(date1+"")!=""){FrmToSubmit=frm;buttonURL=buttonName;flgMsg=false;sameDayFlightsMessageOpen("false");}else{if(((date1+"")==(date2+""))&&(date2+"")!=(dt+"")&&(date1+"")!="mm/dd/yyyy"&&(date1+"")!=""){flgMsg=true;FrmToSubmit=frm;buttonURL=buttonName;sameDayFlightsMessageOpen("false");}else{if((((date1+"")==(dt+"")&&(date2+"")!=(dt+""))||((date1+"")==(dt1+"")&&(date2+"")!=(dt1+"")))&&(date1+"")!="mm/dd/yyyy"&&(date1+"")!=""){FrmToSubmit=frm;flgMsg=false;buttonURL=buttonName;setSafariXY(150,100,150,90);setPosition(buttonURL,document.getElementById("message"),loadX,loadY);document.getElementById("message").style.display="block";document.getElementById("timePopUp").focus();}else{if((((date1+"")!=(dt+"")&&(date2+"")==(dt+""))||((date1+"")!=(dt1+"")&&(date2+"")==(dt1+"")))&&(date1+"")!="mm/dd/yyyy"&&(date1+"")!=""){FrmToSubmit=frm;flgMsg=false;buttonURL=buttonName;setSafariXY(150,100,150,90);setPosition(buttonURL,document.getElementById("message"),loadX,loadY);document.getElementById("message").style.display="block";document.getElementById("timePopUp").focus();}else{frm.submit();showWaitImage(buttonName);}}}}}}function updateTitileBar(myurl,div){var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;ajaxDiv=div;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponseofTitleBar;xmlhttp.send("");}function handleResponseofTitleBar(){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"");};if(xmlhttp.readyState==4){if(xmlhttp.status==200){if((xmlhttp.responseText).trim()=="AjaxSessionTimeOut"){window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{document.getElementById(ajaxDiv).innerHTML=xmlhttp.responseText;}}}}function checkFlightStatusFieldsAndSubmit(flightDate,flightNumber,fromDestination,toDestination,frm){setFlightStatusCookies();return ;var strDate=Trim(flightDate);var strFlightNumber=flightNumber;var strFromDestination=fromDestination;var strToDestination=toDestination;if(frm.name()!="pnrDetailForm"){}if((strFlightNumber==""||strFlightNumber==null)&&(strFromDestination=="From"||strToDestination=="To")){return ;}if((strFlightNumber!=null&&strFlightNumber!="")&&(!isNumeric(strFlightNumber))){return ;}if((strFlightNumber!=null&&strFlightNumber!="")&&(isNumeric(strFlightNumber))){frm.submit();return ;}if((strFlightNumber==null||strFlightNumber=="")&&strFromDestination!="From"&&strToDestination!="To"){frm.submit();return ;}}function changeFlightStatusDestinationFields(x){var temp1=document.flightStatusForm.elements["flightStatus.destination"];var salValueFlg=0;if(x!=0){for(m=temp1.options.length-1;m>0;m--){temp1.options[m]=null;}}for(i=0;i<group[x].length;i++){temp1.options[i]=new Option(group[x][i].text,group[x][i].value);}temp1.options[0].selected=true;}function IsNumeric(strString){var strValidChars="0123456789.-";var strChar;var blnResult=true;if(strString.length==0){return false;}for(i=0;i<strString.length&&blnResult==true;i++){strChar=strString.charAt(i);if(strValidChars.indexOf(strChar)==-1){blnResult=false;}}return blnResult;}function getXandY(oElement){if(oElement){if(oElement!=null){var r=0;r={x:oElement.offsetLeft,y:oElement.offsetTop};while(oElement!=null){r.x+=oElement.offsetLeft;r.y+=oElement.offsetTop;oElement=oElement.offsetParent;}return r;}}}function setObjOffset(oElement,divObj,lftDis,topDis){if(oElement){var offsetParent=oElement.offsetParent;var parent=oElement.parentNode;var r={x:oElement.offsetLeft,y:oElement.offsetTop};while(offsetParent){r.x+=offsetParent.offsetLeft;r.y+=offsetParent.offsetTop;offsetParent=offsetParent.offsetParent;}divObj.style.left=(r.x+lftDis)+"px";divObj.style.top=(r.y+topDis)+"px";}}function showLoading(oElement){var loadingObj=document.getElementById("loadingDiv");if(oElement){var offsetParent=oElement.offsetParent;var parent=oElement.parentNode;var r={x:oElement.offsetLeft,y:oElement.offsetTop};while(offsetParent){r.x+=offsetParent.offsetLeft;r.y+=offsetParent.offsetTop;offsetParent=offsetParent.offsetParent;}loadingObj.style.left=(r.x-10)+"px";loadingObj.style.top=(r.y-50)+"px";}loadingObj.style.display="block";}function changeText(value,areaId){document.getElementById(areaId).innerHTML=value;}function clearText(fieldObj,text){if((fieldObj.value).trim()==text){fieldObj.value="";}}function showText(fieldObj,text){if((fieldObj.value).trim()==""){fieldObj.value=text;}}function setPosition(oElement,divObj,lftDis,topDis){if(oElement){divObj.style.left=(getXandY(oElement).x-lftDis)+"px";divObj.style.top=(getXandY(oElement).y-topDis)+"px";}}function setCookies(){var i=0;var expiredays=30;var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);var mcDepDate2="";for(j=0;j<document.flightSearchRTForm.elements.length;j++){var obj=document.flightSearchRTForm.elements[j];if(obj.name=="flightSearch.origin"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.destination"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.depDate.MMDDYYYY"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.returnDate.MMDDYYYY"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.adults"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.kids"){setCookie(obj.name,escape(obj.value),exdate);}}}}}}}for(j=0;j<document.flightSearchOWForm.elements.length;j++){var obj=document.flightSearchOWForm.elements[j];if(obj.name=="flightSearch.origin"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.destination"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.depDateOW.MMDDYYYY"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.adults"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.kids"){setCookie(obj.name,escape(obj.value),exdate);}}}}}}for(j=0;j<document.flightSearchMCForm.elements.length;j++){var obj=document.flightSearchMCForm.elements[j];if(obj.name=="flightSearch.origin"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.destination"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.depDateMC.MMDDYYYY"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.originMC"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.destinationMC"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.returnDateMC.MMDDYYYY"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.adults"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightSearch.kids"){setCookie(obj.name,escape(obj.value),exdate);}}}}}}}}}}function setFlightStatusCookies(){var i=0;var expiredays=30;var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);var mcDepDate2="";for(j=0;j<document.flightStatusForm.elements.length;j++){var obj=document.flightStatusForm.elements[j];if(obj.name=="flightStatus.flightDate"){setCookie(obj.name,escape(obj.selectedIndex),exdate);}else{if(obj.name=="flightStatus.flightNumber"){setCookie(obj.name,obj.value,exdate);}else{if(obj.name=="flightStatus.origin"){setCookie(obj.name,escape(obj.value),exdate);}else{if(obj.name=="flightStatus.destination"){setCookie(obj.name,escape(obj.value),exdate);}}}}}}function setCookieArray(name){this.length=setCookieArray.arguments.length-1;for(var i=0;i<this.length;i++){this[i+1]=setCookieArray.arguments[i+1];setCookie(name+i,this[i+1],expdate);}}function setCookie(name,value,expires){if(!expires){expires=new Date();}document.cookie=name+"="+escape(value)+"; expires="+expires.toGMTString()+"; path=/";}function decision(message,submitFrm){FrmToSubmit=submitFrm;decisionYes();}function decisionYes(){document.getElementById("messageShortjourney").style.display="none";if(flgMsg){FrmToSubmit.submit();showWaitImage(buttonURL);}else{setPosition(buttonURL,document.getElementById("message"),150,100);document.getElementById("message").style.display="block";}}function decisionNo(divIDForHide){document.getElementById(divIDForHide).style.display="none";}function shrtFrmSubmit(divIDForHide){FrmToSubmit.submit();showWaitImage(buttonURL);document.getElementById("message").style.display="none";}function sameDayFlightsMessageOpen(checkFlag){if(checkFlag=="false"){setSafariXY(150,100,150,90);setPosition(buttonURL,document.getElementById("SameDayFlightsMessageId"),loadX,loadY);document.getElementById("SameDayFlightsMessageId").style.display="block";}}function openRTDepcal(){var calx=((document.body.offsetWidth-1050)/2)+79;var caly=0;setSafariXY(calx,caly,calx-100,caly+200);openCal(document.flightSearchRTForm.elements["flightSearch.depDate.MMDDYYYY"],"flightSearch.depDate.MMDDYYYY","flightSearch.returnDate.MMDDYYYY","calbox","air_fromrowedRTDCal","us","horizontal",loadX,loadY,"depart_date.gif");}function openRTRetcal(){var calx=((document.body.offsetWidth-1050)/2)+79;var caly=0;setSafariXY(calx,caly,calx-100,caly+200);openCal(document.flightSearchRTForm.elements["flightSearch.returnDate.MMDDYYYY"],"flightSearch.returnDate.MMDDYYYY","flightSearch.depDate.MMDDYYYY","calbox","air_fromrowedRTRCal","us","horizontal",loadX,loadY,"Return_date.gif");}function openOWcal(){var calx=((document.body.offsetWidth-1050)/2)+79;var caly=0;setSafariXY(calx,caly,calx-90,caly+200);openCal(document.flightSearchOWForm.elements["flightSearch.depDateOW.MMDDYYYY"],"flightSearch.depDateOW.MMDDYYYY","flightSearch.returnDateOW.MMDDYYYY","calbox","air_fromrowedOWRCal","us","horizontal",loadX,loadY,"depart_date.gif");}function openMCRetcal(){var calx=((document.body.offsetWidth-980)/2)+19;var caly=0;setSafariXY(calx,caly,calx-90,caly+200);openCal(document.flightSearchMCForm.elements["flightSearch.returnDateMC.MMDDYYYY"],"flightSearch.returnDateMC.MMDDYYYY","flightSearch.depDateMC.MMDDYYYY","calbox","air_fromrowedMCRTCal","us","horizontal",loadX,loadY,"depart_date.gif");}function openMCDepcal(){var calx=((document.body.offsetWidth-980)/2)+19;var caly=0;setSafariXY(calx,caly,calx-90,caly+200);openCal(document.flightSearchMCForm.elements["flightSearch.depDateMC.MMDDYYYY"],"flightSearch.depDateMC.MMDDYYYY","flightSearch.returnDateMC.MMDDYYYY","calbox","air_fromrowedMCDPCal","us","horizontal",loadX,loadY,"depart_date.gif");}function sameDayFlightsMessageClose(closeType){if(closeType=="true"){if(flgMsg){FrmToSubmit.submit();showWaitImage(buttonURL);}else{document.getElementById("SameDayFlightsMessageId").style.display="none";setSafariXY(150,100,150,90);setPosition(buttonURL,document.getElementById("message"),loadX,loadY);document.getElementById("message").style.display="block";}document.getElementById("SameDayFlightsMessageId").style.display="none";}else{document.getElementById("message").style.display="none";document.getElementById("SameDayFlightsMessageId").style.display="none";}}function checkPhone(phoneType,event){var phoneNo="";var type=false;type=CheckNumeric(event);if(type){for(j=0;j<document.displayPurchaseForm.elements.length;j++){if(document.displayPurchaseForm.elements[j].name==phoneType){phoneNo=document.displayPurchaseForm.elements[j].value;break;}}var index=j;if((phoneNo.length==3)||(phoneNo.length==7)){var separator="-";phoneNo=phoneNo.concat(separator);document.displayPurchaseForm.elements[index].value=phoneNo;}if((phoneNo.length==13)&&(phoneNo.search(/-/)>=0)){var str1=phoneNo.slice(0,3);var str2=phoneNo.slice(4,7);var str3=phoneNo.slice(8);phoneNo=str1+str2+str3;document.displayPurchaseForm.elements[index].value=phoneNo;}}}function checkFax(faxType,event){var faxNo="";var key="";var type=false;type=CheckNumeric(event);if(type){for(j=0;j<document.receiptForm.elements.length;j++){if(document.receiptForm.elements[j].name==faxType){faxNo=document.receiptForm.elements[j].value;break;}}var index=j;if((faxNo.length==3)||(faxNo.length==7)){var separator="-";faxNo=faxNo.concat(separator);document.receiptForm.elements[index].value=faxNo;}if((faxNo.length==13)&&(faxNo.search(/-/)>=0)){var str1=faxNo.slice(0,3);var str2=faxNo.slice(4,7);var str3=faxNo.slice(8);faxNo=str1+str2+str3;document.receiptForm.elements[index].value=faxNo;}}}function checkPhoneProfile(event){var phoneNo="";var type=false;type=CheckNumeric(event);if(type){for(j=0;j<document.requestProfileForm.elements.length;j++){if(document.requestProfileForm.elements[j].name==phoneType){phoneNo=document.requestProfileForm.elements[j].value;break;}}var index=j;if((phoneNo.length==3)||(phoneNo.length==7)){var separator="-";phoneNo=phoneNo.concat(separator);document.requestProfileForm.elements[index].value=phoneNo;}if((phoneNo.length==13)&&(phoneNo.search(/-/)>=0)){var str1=phoneNo.slice(0,3);var str2=phoneNo.slice(4,7);var str3=phoneNo.slice(8);phoneNo=str1+str2+str3;document.requestProfileForm.elements[index].value=phoneNo;}}}function CheckNumeric(e){var KeyID=(window.event)?event.keyCode:e.keyCode;if(KeyID==8){return false;}else{return true;}}function changeImageOnMouseOverOrOut(obj,IMG){obj.src=IMG;obj.style.cursor="pointer";}function divhideFunctionTravel2(divID,clickedObject,toChangeIMG,toChangeIMGCol){var x=document.getElementById(divID);if(x.style.display=="block"){x.style.display="none";clickedObject.src=toChangeIMGCol;}else{if(x.style.display=="none"||x.style.display==""){x.style.display="block";clickedObject.src=toChangeIMG;}}}function viewFare(viewFare_id){var x="";getAnchorXY(viewFare_id);document.getElementById("viewFare").style.left=X1-412;document.getElementById("viewFare").style.top=Y1+15;document.getElementById("viewFare").style.position="absolute";document.getElementById("viewFare").style.display="block";}function CreateProfileForm(){document.createProfileForm.method.value="createProfile";document.createProfileForm.submit();}function callFareRulesDescription(fareBaseCode,fareBaseCodeS,route,routeS,psDiv,actDiv){document.getElementById("disableTotalPage").style.top=0;document.getElementById("disableTotalPage").style.left=0;document.getElementById("disableTotalPage").style.height=getXandY(document.getElementById("rightBottom")).y;document.getElementById("disableTotalPage").style.width=950;document.getElementById("disableTotalPage").style.display="block";positionDivFare=psDiv;actualDiv=actDiv;NewMyUrl="fareRuleDescription.do?method=fareRuleDescription&fareBaseCode="+fareBaseCode+"&fareBaseCodeS="+fareBaseCodeS+"&route="+route+"&routeS="+routeS;FareRulesAjax(NewMyUrl,"viewFareRuleDes");}function disableTotalpage(){document.getElementById("disableTotalPage").style.top=0;document.getElementById("disableTotalPage").style.left=0;document.getElementById("disableTotalPage").style.height=getXandY(document.getElementById("rightBottom")).y;document.getElementById("disableTotalPage").style.width=950;document.getElementById("disableTotalPage").style.display="block";}function enableTotalPage(){document.getElementById("disableTotalPage").style.display="none";}var FareRulesXmlhttp=new XMLHttpRequest();var FareRulesAjaxDiv=null;function FareRulesAjax(myurl2,div){var thetime1=new Date();var dummy=""+thetime1.getHours()+thetime1.getMinutes()+thetime1.getSeconds();myurl2=myurl2+"&dummy="+dummy;FareRulesAjaxDiv=div;FareRulesXmlhttp.open("GET",myurl2,true);FareRulesXmlhttp.onreadystatechange=handleResponseFareRules;FareRulesXmlhttp.send(null);}function handleResponseFareRules(){if(FareRulesXmlhttp.readyState==4){if(FareRulesXmlhttp.status==200){document.getElementById(positionDivFare).style.display="block";if(positionDivFare=="viewFareRuleDesT"){document.getElementById("viewFareRuleDesInnerT").innerHTML=FareRulesXmlhttp.responseText;}if(positionDivFare=="viewFareRuleDesR"){document.getElementById("viewFareRuleDesInnerR").innerHTML=FareRulesXmlhttp.responseText;}if(positionDivFare=="viewFareRuleDesB"){document.getElementById("viewFareRuleDesInnerB").innerHTML=FareRulesXmlhttp.responseText;}if(positionDivFare=="viewFareRuleDesTB"){document.getElementById("viewFareRuleDesInnerTB").innerHTML=FareRulesXmlhttp.responseText;}if(positionDivFare=="viewFareRuleDesTBS"){document.getElementById("viewFareRuleDesInnerTBS").innerHTML=FareRulesXmlhttp.responseText;}if(document.all){if(actualDiv!="fareRuleDescription_cancel"&&actualDiv!="fareRuleDescription_R"){document.getElementById(positionDivFare).style.left=document.getElementById(actualDiv).offsetLeft-175;}}if(navigator.userAgent.indexOf("Safari")!=-1){if(actualDiv!="fareRuleDescription_cancel"){document.getElementById(positionDivFare).style.left=document.getElementById(actualDiv).offsetLeft-200;}}isScroll="No";}}}var startBlinkCounter=1;var blinkInterval;function startBlink(layerName,blinkTimes,blink_speed){startBlinkCounter=1;blinkInterval=setInterval("Blink('"+layerName+"',"+blinkTimes+")",blink_speed);}function stopBlink(layerName){clearInterval(blinkInterval);document.getElementById(layerName).style.visibility="visible";}function Blink(layerName,blinkTimes){if(startBlinkCounter%2==0){document.getElementById(layerName).style.visibility="hidden";}else{document.getElementById(layerName).style.visibility="visible";}startBlinkCounter++;if(startBlinkCounter==(blinkTimes*2)){startBlinkCounter=1;clearInterval(blinkInterval);document.getElementById(layerName).style.visibility="visible";}}var vision="";var people="";var press="";var navthisid="";function changeNavTitleBarImage(){document.getElementById("Vision").src="images/btn_what_we_about_off.gif";document.getElementById("People").src="images/btn_people_off.gif";document.getElementById("Press").src="images/btn_press_off.gif";}function navmouseover(imgCurrObj,thisid){if(thisid=="Vision"){if(vision==""){MakeCursor(imgCurrObj);MM_swapImage("Vision","","images/btn_what_we_about_on.gif",1);}}if(thisid=="People"){if(people==""){MakeCursor(imgCurrObj);MM_swapImage("People","","images/btn_people_on.gif",1);}}if(thisid=="Press"){if(press==""){MakeCursor(imgCurrObj);MM_swapImage("Press","","images/btn_press_on.gif",1);}}}function callMeetVaPages(thisid){navthisid=thisid;document.MeetVaForm.method.value="showMeetVa";if(thisid=="Vision"){if(vision==""){document.MeetVaForm.NavChImage.value="Vision";document.MeetVaForm.action="meetVa.do";}}if(thisid=="People"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam.do";}}if(thisid=="People1"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam1.do";}}if(thisid=="People2"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam2.do";}}if(thisid=="People3"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam3.do";}}if(thisid=="People4"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam4.do";}}if(thisid=="People5"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam5.do";}}if(thisid=="People6"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam6.do";}}if(thisid=="People7"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam7.do";}}if(thisid=="People8"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam8.do";}}if(thisid=="People9"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam9.do";}}if(thisid=="People10"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam10.do";}}if(thisid=="People11"){if(people==""){document.MeetVaForm.NavChImage.value="People";document.MeetVaForm.action="meetVaTeam11.do";}}if(thisid=="Press"){if(press==""){document.MeetVaForm.NavChImage.value="Press";document.MeetVaForm.action="meetVaPress.do";}}document.MeetVaForm.submit();}function openWinPriceToFly(){location.href="priceToFlyAct.do?method=showPriceWindow";}function openWinPrintItinerary(actionUrl){var disp_setting="toolbar=no,location=no,directories=no,menubar=yes,";disp_setting+="scrollbars=yes,width=650, height=670, left=0, top=0";var urls=actionUrl;window.open(urls,"",disp_setting);}function openChangeSeatPrintItinerary(actionUrl){var disp_setting="toolbar=no,location=no,directories=no,menubar=yes,";disp_setting+="scrollbars=yes,width=650, height=670, left=0, top=0";var urls=actionUrl;window.open(urls,"",disp_setting);}function PrintItinerary(print_content){var disp_setting="toolbar=no,location=no,directories=no,menubar=yes,";disp_setting+="scrollbars=yes,width=650, height=670, left=0, top=0";var content_vlue=document.getElementById("print_content").innerHTML;var docprint=window.open("","",disp_setting);docprint.document.open();docprint.document.write("<html><head><title></title>");docprint.document.write("<style>"+"TD {"+"FONT-SIZE: 10px; FONT-FAMILY: verdana, Arial, sans-serif; font-color: #333333 }"+"</style>");docprint.document.write('</head><body onLoad="self.print()"><center>');docprint.document.write(content_vlue);docprint.document.write("</center>");docprint.document.write("<script>"+"document.getElementById("+"'"+"hidePtandIteBtn"+"'"+")"+".style.display"+"="+"'"+"none"+"'"+";");docprint.document.write("document.getElementById("+"'"+"hideDashLine"+"'"+")"+".style.display"+"="+"'"+"none"+"'");docprint.document.write("<\/script>");docprint.document.write("</body></html>");docprint.document.close();docprint.focus();}function redirectVirginAmerica(){location.href="http://www.virginamerica.com";}function closeWindow(){self.close();}function CallElevate(){location.href="whatIseleVAte.do?method=showwhatIseleVAte";}function hidePopUp(){document.getElementById("Hrefmessage").style.display="none";}function whichElement(e){var targ;if(!e){var e=window.event;}if(e.target){targ=e.target;}else{if(e.srcElement){targ=e.srcElement;}}if(targ.nodeType==3){targ=targ.parentNode;}var tname;var tId;var temp;var thref;tname=targ.tagName;tId=targ.id;thref=targ.href;if(tname=="A"){if((tId==""&&thref.split(":")[0]!="javascript")||(tId==""&&targ.href=="javascript:void(0)")){var X=e.clientX;var Y=e.clientY;var bodyY=document.body.scrollTop;targ.href="javascript:void(0)";document.getElementById("Hrefmessage").style.left=X+document.body.scrollLeft-150;document.getElementById("Hrefmessage").style.top=Y+document.body.scrollTop;document.getElementById("Hrefmessage").style.display="block";}}}function whichElementset(event){return false;}function PrintItineraryChkIn(print_content){var disp_setting="toolbar=no,location=no,directories=no,menubar=yes,";disp_setting+="scrollbars=yes,width=650, height=670, left=0, top=0";var content_vlue=document.getElementById("print_content").innerHTML;var docprint=window.open("","",disp_setting);docprint.document.open();docprint.document.write("<html><head><title></title>");docprint.document.write("<style>"+"TD {"+"FONT-SIZE: 10px; FONT-FAMILY: verdana, Arial, sans-serif; font-color: #333333 }"+"</style>");docprint.document.write('</head><body onLoad="self.print()"><center>');docprint.document.write(content_vlue);docprint.document.write("</center>");docprint.document.write("<script>"+"document.getElementById("+"'"+"hidePtandIteBtn"+"'"+")"+".style.display"+"="+"'"+"none"+"'"+";");docprint.document.write("document.getElementById("+"'"+"hideDashLine"+"'"+")"+".style.display"+"="+"'"+"none"+"'"+";");docprint.document.write("document.getElementById("+"'"+"hidePtBoardBtn"+"'"+")"+".style.display"+"="+"'"+"none"+"'");docprint.document.write("<\/script>");docprint.document.write("</body></html>");docprint.document.close();docprint.focus();}function sumitSearchWithEnterKey(enterId,evt){if(window.event){Key=window.event.keyCode;}else{if(evt){Key=evt.which;}}if(Key==13){document.getElementById(enterId).onclick();return false;}else{return true;}}function updatePopup(pageName,title,popupWidth,clkObj,showBtn,lftMrg,rgtMrg,decision,functionCalled){var myAjax=new Ajax.Updater({success:"popupMsgArea"},pageName,{method:"post",evalScripts:"true",onComplete:done});function done(){document.getElementById("popupTitle").innerHTML=title;var popupElement=document.getElementById("popupTable");popupElement.style.width=eval(popupWidth);var popupFrame=document.getElementById("popupFrame");setObjOffset(clkObj,document.getElementById("popupId"),lftMrg,rgtMrg);if(eval(showBtn)){document.getElementById("AcceptId").style.display="";}if(decision){var el=document.getElementById("AcceptId");document.getElementById("declinedId").style.display="";el.setAttribute("onclick",functionCalled);}var popupDiv=document.getElementById("popupId");document.getElementById("popupId").style.display="block";popupFrame.style.width=eval(popupWidth);popupFrame.style.height=popupDiv.offsetHeight;}}function closePopup(divId){document.getElementById(divId).style.display="none";}function goBackToTravelManager(formName){frmObj=eval("document."+formName);frmObj.submit();}function togglePrintDisplay(e){var el=document.getElementsByTagName("div");for(i=0;i<el.length;i++){if(el[i].className.indexOf("section")!=-1){el[i].removeAttribute("className");if(el[i].id=="sect"){el[i].setAttribute("className","print_section print");el[i].setAttribute("class","print_section print");}else{el[i].setAttribute("className","print_section noprint");el[i].setAttribute("class","print_section noprint");}}}if(window.event){window.event.returnValue=false;window.event.cancelBubble=true;}else{if(e){e.stopPropagation();e.preventDefault();}}window.print();}var gAutoPrint=true;function printSpecial(){if(document.getElementById!=null){var html="<HTML>\n<HEAD>\n";if(document.getElementsByTagName!=null){var headTags=document.getElementsByTagName("head");if(headTags.length>0){html+=headTags[0].innerHTML;}}html+="\n</HE"+"AD>\n<BODY>\n";var printReadyElem=document.getElementById("printReady");if(printReadyElem!=null){html+=printReadyElem.innerHTML;}else{return ;}html+="\n</BO"+"DY>\n</HT"+"ML>";var printWin=window.open("","printSpecial");printWin.resizeBy(100,100);printWin.moveBy(1800,1800);printWin.document.open();printWin.document.write(html);printWin.document.close();if(gAutoPrint){printWin.print();}}else{alert("Sorry, the print ready feature is only available in modern browsers.");}}function callJobsPages(thisid){if(thisid=="jobsWhyVA"){document.privacyPolicy.method.value="showjobs";document.privacyPolicy.action="jobsWhyVA.do";document.privacyPolicy.submit();}if(thisid=="jobsAlex"){document.privacyPolicy.method.value="showjobs";document.privacyPolicy.action="jobsAlex.do";document.privacyPolicy.submit();}if(thisid=="jobsDiversity"){document.privacyPolicy.method.value="showjobs";document.privacyPolicy.action="jobsDiversity.do";document.privacyPolicy.submit();}if(thisid=="jobsGetToKnowUs"){document.privacyPolicy.method.value="showjobs";document.privacyPolicy.action="jobsGetToKnowUs.do";document.privacyPolicy.submit();}if(thisid=="jobsGetToKnowUsJessica"){document.privacyPolicy.method.value="showjobs";document.privacyPolicy.action="jobsGetToKnowUsJessica.do";document.privacyPolicy.submit();}if(thisid=="jobsJoinTheTeam"){document.privacyPolicy.method.value="showjobs";document.privacyPolicy.action="jobsJoinTheTeam.do";document.privacyPolicy.submit();}if(thisid=="jobsBenefits"){document.privacyPolicy.method.value="showjobs";document.privacyPolicy.action="jobsBenefits.do";document.privacyPolicy.submit();}}function showLoadingImageonPopUp(buttonName){var cPopup=getAnchorPosition(buttonName);var xp=cPopup.x;var yp=cPopup.y-10;document.getElementById("loadingDiv").style.left=xp+"px";document.getElementById("loadingDiv").style.top=yp+"px";document.getElementById("loadingDiv").style.display="block";}function showLoadingImageOpenWithAllValues(buttonName,first,second){setPosition(buttonName,document.getElementById("loadingDiv"),first,second);document.getElementById("loadingDiv").style.display="block";}function showLoadingImageOpen(buttonName){setPosition(document.getElementById(buttonName),document.getElementById("loadingDiv"),50,50);document.getElementById("loadingDiv").style.display="block";}function showLoadingImageClose(){if(document.getElementById("loadingDiv")){document.getElementById("loadingDiv").style.display="none";}}function _showLoadingImageOpen(buttonName){setPosition(document.getElementById(buttonName),document.getElementById("loadingDiv"),450,50);document.getElementById("loadingDiv").style.display="block";}function _showLoadingImageClose(){if(document.getElementById("loadingDiv")){document.getElementById("loadingDiv").style.display="none";}}function setDateInWannaBookFlightWindow(tripType,currentDate,segmentNumber){if(tripType=="rt"){if(segmentNumber==0){document.flightSearchRTForm.elements["flightSearch.depDate.MMDDYYYY"].value=currentDate;}else{document.flightSearchRTForm.elements["flightSearch.returnDate.MMDDYYYY"].value=currentDate;}}else{if(tripType=="mc"){if(segmentNumber==0){document.flightSearchMCForm.elements["flightSearch.depDateMC.MMDDYYYY"].value=currentDate;}else{document.flightSearchMCForm.elements["flightSearch.returnDateMC.MMDDYYYY"].value=currentDate;}}else{if(tripType=="ow"){if(segmentNumber==0){document.flightSearchOWForm.elements["flightSearch.depDateOW.MMDDYYYY"].value=currentDate;}}}}}function showScheduleDetials(obj,flightNumber,aircarftType,airPort,journeyTime){document.getElementById("flightNumberSpanId").innerHTML=flightNumber;document.getElementById("aircarftSpanId").innerHTML=aircarftType;document.getElementById("airPortSpanId").innerHTML=airPort;document.getElementById("journeTimeSpanId").innerHTML=journeyTime;document.getElementById("totalJourneTimeSpanId").innerHTML=journeyTime;var positionObj="loadImgCenter1";setPosition(obj,document.getElementById("flightScheduleDetialsDiv"),50,30);document.getElementById("flightScheduleDetialsDiv").style.display="block";}function ChangeGuestType(optval,obj){var option=obj.options;if(optval=="Mr"){option.selectedIndex=0;}if(optval=="Mrs"){option.selectedIndex=0;}if(optval=="Miss (Adult)"){option.selectedIndex=0;}if(optval=="Miss (Child)"){option.selectedIndex=2;}if(optval=="Ms"){option.selectedIndex=0;}if(optval=="Mstr (Child)"){option.selectedIndex=2;}}function fltErrorMessages(error1,error2,error3,error4,error5,error6,error7,error8){fltStatusErrorsRequired=error1;fltStatusErrorsUnknown=error2;fltStatusErrorsServiceRequired=error3;fltStatusErrorsInValidFltNo=error4;fltStatusErrorsInValidFltNoNotNum=error5;fltStatusErrorsInValidCityPair=error6;fltStatusErrorsNoFltGivenDate=error7;fltStatuserrorsnoData=error8;}function chkNumber(){var sText=document.flightStatusForm.elements["flightStatus.flightNumber"].value;var ValidChars="0123456789";var Char;for(i=0;i<sText.length&&IsNumber==true;i++){Char=sText.charAt(i);if(ValidChars.indexOf(Char)==-1){IsNumber=false;}}}function flightStatusAjaxSubmit(){var index=document.flightStatusForm.elements["flightStatus.flightDate"].selectedIndex;var fleDate=document.flightStatusForm.elements["flightStatus.flightDate"].options[index].value;var fltNumber=document.flightStatusForm.elements["flightStatus.flightNumber"].value;var indorigin=document.flightStatusForm.elements["flightStatus.origin"].selectedIndex;var origin=document.flightStatusForm.elements["flightStatus.origin"].options[indorigin].value;var inddesti=document.flightStatusForm.elements["flightStatus.destination"].selectedIndex;var destination=document.flightStatusForm.elements["flightStatus.destination"].options[inddesti].value;var fltTrkerAjax=document.flightStatusForm.elements["flightTrackerAjax"].value;chkNumber();if(!(fltNumber==""||fltNumber=="Flight Number")&&IsNumber==false){document.getElementById("fltErrDiv").style.display="block";document.getElementById("fltStatusErr").innerHTML=fltStatusErrorsInValidFltNoNotNum;IsNumber=true;document.getElementById("fltNumErrDiv").style.display="block";document.getElementById("originErrDiv").style.display="none";document.getElementById("distiniErrDiv").style.display="none";showLoadingImageClose();}else{if((fltNumber==""||fltNumber=="Flight Number")&&(origin==""||destination=="")){document.getElementById("fltErrDiv").style.display="block";document.getElementById("fltStatusErr").innerHTML=fltStatusErrorsRequired;document.getElementById("fltNumErrDiv").style.display="block";document.getElementById("originErrDiv").style.display="block";document.getElementById("distiniErrDiv").style.display="block";showLoadingImageClose();}else{if(origin!=""&&destination!=""){fltStatusResultAjaxSubmit(fltNumber,fleDate,origin,destination);}else{fltStatusAjaxSubmitwtVal(fltNumber,fleDate);}}}}function callAirPortInfo(airPortCodeName){var url="infoDeskDestinationInfo.do?method=showDestionationInfo"+"&infoDeskDestinationValue="+airPortCodeName;location.href=url;}function fltStatusAjaxSubmitwtVal(fltNumberVal,fltDateVal,fltOrigin,fltDestination){var fltTrkerAjax="flightTrackerAjax";var url="showFlightTracker.do?method=showFlightInformation"+"&flightNumber="+fltNumberVal+"&flightStatus.flightNumber="+fltNumberVal+"&flightStatus.origin="+fltOrigin+"&flightStatus.destination="+fltDestination+"&flightStatus.flightDate="+fltDateVal+"&flightTrackerAjax="+fltTrkerAjax;flightTrackerAjax(url,"fltStsDiv");}function singleFlightStatusSubmit(fltNumberVal){document.flightStautsResultSubmit.method.value="showFlightInformation";document.flightStautsResultSubmit.flightNumber.value=fltNumberVal;document.flightStautsResultSubmit.action="showFlightTracker.do";document.flightStautsResultSubmit.submit();}function flightTrackerAjax(myurl,div){xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=flightTrackerHandleResponse;xmlhttp.send("");}function flightTrackerHandleResponse(){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"");};if(xmlhttp.readyState==4){if(xmlhttp.status==200){if(xmlhttp.responseText.trim().indexOf(".gif")==-1){if(document.getElementById("fltErrDiv")){document.getElementById("fltErrDiv").style.display="block";}document.getElementById("fltStatusErr").innerHTML=xmlhttp.responseText;showLoadingImageClose();}else{if(document.getElementById("fltErrDiv")){document.getElementById("fltErrDiv").style.display="none";}document.getElementById("fltStsDiv").innerHTML=xmlhttp.responseText;if(document.getElementById("fltNumErrDiv")){document.getElementById("fltNumErrDiv").style.display="none";}if(document.getElementById("originErrDiv")){document.getElementById("originErrDiv").style.display="none";}if(document.getElementById("distiniErrDiv")){document.getElementById("distiniErrDiv").style.display="none";}showLoadingImageClose();}}}}function fltStatusResultAjaxSubmit(fltNumberVal,fltDateVal,origin,destination){var fltTrkerAjax="flightTrackerAjax";var url="showFlightTracker.do?method=showFlightTracker"+"&flightNumber="+fltNumberVal+"&flightDate="+fltDateVal+"&flightorigin="+origin+"&flightdestination="+destination+"&flightTrackerAjax="+fltTrkerAjax;flightStatusResultAjax(url,"fltStsDiv");}function flightStatusResultAjax(myurl,div){var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=fltResultHandleResponse;xmlhttp.send("");}function fltResultHandleResponse(){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"");};if(xmlhttp.readyState==4){if(xmlhttp.status==200){if((xmlhttp.responseText).trim().indexOf(".gif")==-1){document.getElementById("fltErrDiv").style.display="block";document.getElementById("fltStatusErr").innerHTML=xmlhttp.responseText;showLoadingImageClose();}else{document.getElementById("fltErrDiv").style.display="none";document.getElementById("fltStsDiv").innerHTML=xmlhttp.responseText;document.getElementById("fltNumErrDiv").style.display="none";document.getElementById("originErrDiv").style.display="none";document.getElementById("distiniErrDiv").style.display="none";showLoadingImageClose();}}}}function flightTrackerHandleResponse1(){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"");};var x=document.getElementById("fltStsDiv");if(xmlhttp.readyState==4){if(xmlhttp.status==200){if((xmlhttp.responseText).trim()=="Flight Status Service Temporarily Unavailable"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML=fltStatusErrorsServiceRequired;}else{if((xmlhttp.responseText).trim()=="Flight number does not fly on requested date"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML=fltStatusErrorsInValidFltNo;document.getElementById("fltNumErrDiv").style.display="block";document.getElementById("txtFlightNumber").className="fltstatusError";}else{if((xmlhttp.responseText).trim()=="City pair selected is invalid for flight number"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML=fltStatusErrorsInValidCityPair;if(document.getElementById("fltNumErrDiv").style.display="block"){document.getElementById("fltNumErrDiv").style.display="none";document.getElementById("txtFlightNumber").className="flightStatusStyleB";}document.getElementById("originErrDiv").style.display="block";document.getElementById("distiniErrDiv").style.display="block";document.flightStatusForm.elements["flightStatus.origin"].className="fltstatusError";document.flightStatusForm.elements["flightStatus.destination"].className="fltstatusError";}else{if((xmlhttp.responseText).trim()=="Invalid flight number"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML=fltStatusErrorsInValidFltNoNotNum;document.getElementById("fltNumErrDiv").style.display="block";document.getElementById("txtFlightNumber").className="fltstatusError";}else{if((xmlhttp.responseText).trim()=="Need valid Flight number or City pair"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML=fltStatusErrorsRequired;document.getElementById("fltNumErrDiv").style.display="block";document.getElementById("originErrDiv").style.display="block";document.getElementById("distiniErrDiv").style.display="block";document.getElementById("txtFlightNumber").className="fltstatusError";document.flightStatusForm.elements["flightStatus.origin"].className="fltstatusError";document.flightStatusForm.elements["flightStatus.destination"].className="fltstatusError";}else{if(document.getElementById("leftAjaxErrDiv").style.display="block"){document.getElementById("leftAjaxErrDiv").style.display="none";document.getElementById("fltNumErrDiv").style.display="none";document.getElementById("originErrDiv").style.display="none";document.getElementById("distiniErrDiv").style.display="none";document.getElementById("txtFlightNumber").className="flightStatusStyleB";document.flightStatusForm.elements["flightStatus.origin"].className="flightStatusStyleB";document.flightStatusForm.elements["flightStatus.destination"].className="flightStatusStyleB";}x.innerHTML=xmlhttp.responseText;}}}}}}}}function fltResultHandleResponse1(){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/,"");};var x=document.getElementById("fltStsDiv");if(xmlhttp.readyState==4){if(xmlhttp.status==200){if((xmlhttp.responseText).trim()=="Flight Status Service Temporarily Unavailable"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML=fltStatusErrorsServiceRequired;}else{if((xmlhttp.responseText).trim()=="City pair selected is invalid for flight number"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML=fltStatusErrorsInValidCityPair;if(document.getElementById("fltNumErrDiv").style.display="block"){document.getElementById("fltNumErrDiv").style.display="none";document.getElementById("txtFlightNumber").className="flightStatusStyleB";}document.getElementById("originErrDiv").style.display="block";document.getElementById("distiniErrDiv").style.display="block";document.flightStatusForm.elements["flightStatus.origin"].className="fltstatusError";document.flightStatusForm.elements["flightStatus.destination"].className="fltstatusError";}else{if((xmlhttp.responseText).trim()=="Flight number does not fly on requested date"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML=fltStatusErrorsInValidFltNo;document.getElementById("fltNumErrDiv").style.display="block";document.getElementById("txtFlightNumber").className="fltstatusError";}else{if((xmlhttp.responseText).trim()=="Invalid flight number"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML=fltStatusErrorsInValidFltNoNotNum;document.getElementById("fltNumErrDiv").style.display="block";document.getElementById("txtFlightNumber").className="fltstatusError";}else{if((xmlhttp.responseText).trim()=="No flights found for given date"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML="No flights found for given date";document.getElementById("fltNumErrDiv").style.display="block";document.getElementById("txtFlightNumber").className="fltstatusError";}else{if((xmlhttp.responseText).trim()=="Need valid Flight number or City pair"){document.getElementById("leftAjaxErrDiv").style.display="block";document.getElementById("ajaxTextDiv").innerHTML=fltStatusErrorsRequired;document.getElementById("fltNumErrDiv").style.display="block";document.getElementById("originErrDiv").style.display="block";document.getElementById("distiniErrDiv").style.display="block";document.getElementById("txtFlightNumber").className="fltstatusError";document.flightStatusForm.elements["flightStatus.origin"].className="fltstatusError";document.flightStatusForm.elements["flightStatus.destination"].className="fltstatusError";}else{if(document.getElementById("leftAjaxErrDiv").style.display="block"){document.getElementById("leftAjaxErrDiv").style.display="none";document.getElementById("fltNumErrDiv").style.display="none";document.getElementById("originErrDiv").style.display="none";document.getElementById("distiniErrDiv").style.display="none";document.getElementById("txtFlightNumber").className="flightStatusStyleB";document.flightStatusForm.elements["flightStatus.origin"].className="flightStatusStyleB";document.flightStatusForm.elements["flightStatus.destination"].className="flightStatusStyleB";}x.innerHTML=xmlhttp.responseText;}}}}}}}}}function changeContactDiv(div,comboBoxId,typeId){if(div!="Select"){if(typeId=="onComboBox"){showLoadingImageOpen(comboBoxId);}var url="contactUsDivRefresh.do?method=contactUsDivRefresh";contactUsDivRefreshAjax(url,div);}}var contactUsDivName;function contactUsDivRefreshAjax(myurl,div){var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;contactUsDivName=div;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=contactUsDivRefreshHandleResponse;xmlhttp.send("");}function contactUsDivRefreshHandleResponse(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){var fileName=xmlhttp.responseText;if(fileName.trim()=="AjaxSessionTimeOut"){showLoadingImageClose();window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{document.getElementById("bodyDiv").innerHTML=xmlhttp.responseText;document.getElementById(contactUsDivName).style.display="block";if(contactUsDivName=="charityDiv"||contactUsDivName=="sponsorAdvFlyDiv"){document.getElementById("submitDiv").style.display="none";}else{document.getElementById("submitDiv").style.display="block";}document.contactUsForm.elements["contactArea"].value=contactUsDivName;document.contactUsForm.method.value=contactUsDivName;showLoadingImageClose();}}}}var img_ID="";var idArray=new Array("1A","2A","1C","2C","1D","2D","1F","2F","1B","2B");var firstClass="false";function ShowExitRowDiv(img_id){img_ID=img_id;for(var i=0;i<idArray.length;i++){if(idArray[i]==img_ID){img_ID="firstClass";}}if((!isMCS)||(img_ID=="firstClass")){if(img_ID=="firstClass"){x=document.getElementById("FirstClassInformation");}else{x=document.getElementById("PremiumSeatInformation");}getAnchorXY(img_id);x.style.left=X1+14;x.style.top=Y1+14;x.style.position="absolute";x.style.display="block";}}var checkX=0;var checkY=0;function ShowExitRowDivOnSelect(img_id){img_ID=img_id;for(var i=0;i<idArray.length;i++){if(idArray[i]==img_ID){img_ID="firstClass";}}if(img_ID=="firstClass"){x=document.getElementById("FirstClassInformation");}else{x=document.getElementById("PremiumSeatInformation");}getAnchorXY(img_id);x.style.left=X1-checkX+8;x.style.top=Y1-checkY+8;x.style.position="absolute";x.style.display="block";}function HideExitRowDiv(){if(img_ID!=""){if(img_ID=="firstClass"){document.getElementById("FirstClassInformation").style.display="none";}else{document.getElementById("ExitSeatInformation").style.display="none";}document.getElementById("PremiumSeatInformation").style.display="none";img_ID="";}}function ShowExitRowDivNonMCS(img_id){img_ID=img_id;for(var i=0;i<idArray.length;i++){if(idArray[i]==img_ID){img_ID="firstClass";}}if(img_id.substring(0,1)=="3"){x=document.getElementById("PremiumSeatInformation");}else{if(img_ID=="firstClass"){x=document.getElementById("FirstClassInformation");}else{x=document.getElementById("ExitSeatInformation");}}getAnchorXY(img_id);x.style.left=X1+14;x.style.top=Y1+14;x.style.position="absolute";x.style.display="block";}function ShowExitRowDivOnSelectNonMCS(img_id){img_ID=img_id;for(var i=0;i<idArray.length;i++){if(idArray[i]==img_ID){img_ID="firstClass";}}if(img_id.substring(0,1)=="3"){x=document.getElementById("PremiumSeatInformation");}else{if(img_ID=="firstClass"){x=document.getElementById("FirstClassInformation");}else{x=document.getElementById("ExitSeatInformation");}}getAnchorXY(img_id);x.style.left=X1-checkX+8;x.style.top=Y1-checkY+8;x.style.position="absolute";x.style.display="block";}function HideExitRowDivNonMCS(){if(img_ID!=""){if(img_ID.substring(0,1)=="3"){document.getElementById("PremiumSeatInformation").style.display="none";}else{if(img_ID=="firstClass"){document.getElementById("FirstClassInformation").style.display="none";}else{document.getElementById("ExitSeatInformation").style.display="none";}}img_ID="";}}var elevateIdValidated="";function showTestField(elevateDivId,addDivId){document.getElementById(addDivId).style.display="none";document.getElementById(elevateDivId).style.display="block";}function callElevateIdAction(elevateDivId,fieldValue,showPointsId,pointsId,guestFirstLastName,guestInd){chkAjaxDiv=elevateDivId;addFieldId=fieldValue;pointsDivId=pointsId;showPointsDivId=showPointsId;var segId="";if(elevateDivId.search("Dep")!=-1){segId="Departing";secondDiv=showPointsDivId.replace("Dep","Ret");chkAjaxDivSecond=pointsDivId.replace("Dep","Ret");}else{segId="Returning";secondDiv=showPointsDivId.replace("Ret","Dep");chkAjaxDivSecond=pointsDivId.replace("Ret","Dep");}elevateIdValidated=document.getElementById(fieldValue).value;var urls="chkInGetElevateIdForChkIn.do?method=elevateIdInChkIn&elevateIdParam="+elevateIdValidated+"&guestFirstLastName="+guestFirstLastName+"&guestInd="+guestInd+"&segId="+segId;ajaxToGetElevateId(urls);showLoadingImageOpen(addFieldId);}function ajaxToGetElevateId(myurl){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponseForElevateId;xmlhttp.send("");}function handleResponseForElevateId(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){var resText=xmlhttp.responseText;if(resText.trim()=="AjaxSessionTimeOut"){window.location="/va/home.do?method=virginAmerica&sessionState=sessionTimeOut";}else{if(resText.search("images/manageTravel-CheckinAvailable.gif")!=-1){document.getElementById("body").innerHTML=resText;document.getElementById("errorOnChkInMain").style.display="none";showLoadingImageClose();}else{document.getElementById(addFieldId).style.border="2px solid #762F8F";document.getElementById("errorOnChkInMain").style.display="block";document.getElementById("errorOnChkInMain").innerHTML=resText;showLoadingImageClose();}}}}}var blink_speed=300;var i=0;var stopIt="false";function getbrowser(){var useWindow=false;var use_gebi=false,use_css=false,use_layers=false;if(document.getElementById){use_gebi=true;layerRef="document.getElementById";}else{if(document.all){use_css=true;layerRef="document.all";}else{if(document.layers){use_layers=true;layerRef="document.layers";}}}}function Blink(layerName){if(stopIt=="false"){getbrowser();if(i%2==0){eval(layerRef+'("'+layerName+'")'+".style"+'.visibility="visible"');eval(layerRef+'("'+layerName+'")'+".style"+'.color="#D20002"');}else{eval(layerRef+'("'+layerName+'")'+".style"+'.visibility="hidden"');}if(i<1){i++;}else{i--;}setTimeout("Blink('"+layerName+"')",blink_speed);}}function stopBlinking(){var layerName="prem_hint";stopIt="true";eval(layerRef+'("'+layerName+'")'+".style"+'.visibility="visible"');eval(layerRef+'("'+layerName+'")'+".style"+'.color="#000000"');}function showPopupWithGrayBG(ancorObj){stopIt="false";var x=document.getElementById("PopoupOnGrayDiv");var c1=getAnchorPosition("HowItWorks");x.style.left=c1.x;x.style.top=c1.y;x.style.display="block";if(document.getElementById("prem_hint")){document.getElementById("prem_hint").style.background="#FFB2B5";}}function popUpHowWorks(divId){var x=document.getElementById("PopoupOnGrayDiv");var c1=getAnchorPosition(divId);x.style.left=c1.x;x.style.top=c1.y;x.style.display="block";stopIt="true";}function showTermsCondition(divId){var x=document.getElementById("tirmsDiv");var c1=getAnchorPosition(divId);x.style.left=c1.x;x.style.top=c1.y-50;x.style.display="block";}function closeDivs(){if(document.getElementById("PopoupPointBetaAlert")!=null){document.getElementById("PopoupPointBetaAlert").style.display="none";}if(document.getElementById("PopoupOnGrayDiv")!=null){document.getElementById("PopoupOnGrayDiv").style.display="none";}if(document.getElementById("prem_hint")!=null){document.getElementById("prem_hint").style.background="#ffffff";}}function showPrintableView(firstname,lastname,elevateNo){var disp_setting="toolbar=no,location=no,directories=no,menubar=no,status=no,";disp_setting+="scrollbars=yes,width=650, height=670, left=0, top=0";var url="html/elevate_card_print.html?&fn="+firstname+"&ln="+lastname+"&eN="+elevateNo;window.open(url,"",disp_setting);}function passwordStrength(password){var desc=new Array();desc[0]="Very Weak";desc[1]="Weak";desc[2]="Better";desc[3]="Medium";desc[4]="Strong";desc[5]="Strongest";var score=0;if(password.length>6){score++;}if((password.match(/[a-z]/))&&(password.match(/[A-Z]/))){score++;}if(password.match(/\d+/)){score++;}if(password.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/)){score++;}if(password.length>12){score++;}document.getElementById("passwordDescription").innerHTML=desc[score];document.getElementById("passwordStrength").className="strength"+score;}function applyCreditFile(id,div){setPosition(document.getElementById(id),document.getElementById("loadingDiv"),475,50);document.getElementById("loadingDiv").style.display="block";var size=document.getElementsByName("checkBoxCreditFile").length;var creditFile="";for(creditLoop=0;creditLoop<size;creditLoop++){if(document.getElementsByName("checkBoxCreditFile")[creditLoop].checked){creditFile=creditFile+document.getElementsByName("checkBoxCreditFile")[creditLoop].id+"-";}}var URL="applyCreditFile.do?method=apply&creditFiles="+creditFile;var myAjax=new Ajax.Updater({success:div},URL,{method:"post",evalScripts:"true",onSuccess:done});function done(){document.getElementById("loadingDiv").style.display="none";}}function removeCreditFile(creditFile,id,div){setPosition(document.getElementById(id),document.getElementById("loadingDiv"),50,50);document.getElementById("loadingDiv").style.display="block";var URL="removeCreditFile.do?method=remove&creditFiles="+creditFile;var myAjax=new Ajax.Updater({success:div},URL,{method:"post",evalScripts:"true",onSuccess:done});function done(){document.getElementById("loadingDiv").style.display="none";}}function showHideAddCreditFile(){if(document.getElementsByName("checkBoxAddCreditFile")[0].checked){document.getElementById("addCreditFileDiv").style.display="block";}else{document.getElementById("addCreditFileDiv").style.display="none";}}function addCreditFile(id,div){setPosition(document.getElementById(id),document.getElementById("loadingDiv"),0,50);document.getElementById("loadingDiv").style.display="block";var fileNumber=document.getElementById("creditFileNumber").value;var firstName=document.getElementById("firstName").value;var lastName=document.getElementById("lastName").value;var URL="addCreditFile.do?method=add&creditFileNumber="+fileNumber+"&firstName="+firstName+"&lastName="+lastName;var myAjax=new Ajax.Updater({success:div},URL,{method:"post",evalScripts:"true",onSuccess:done});function done(){document.getElementById("loadingDiv").style.display="none";}}function addCreditFilePostBooking(id,div,module){setPosition(document.getElementById(id),document.getElementById("loadingDiv"),0,50);document.getElementById("loadingDiv").style.display="block";var fileNumber=document.getElementById("creditFileNumber").value;var firstName=document.getElementById("firstName").value;var lastName=document.getElementById("lastName").value;if(module=="changeSeat"){var URL="addCreditFileChangeSeat.do?method=add&creditFileNumber="+fileNumber+"&firstName="+firstName+"&lastName="+lastName;}else{if(module=="changeFlight"){var URL="addCreditFileChangeFlight.do?method=add&creditFileNumber="+fileNumber+"&firstName="+firstName+"&lastName="+lastName;}}var myAjax=new Ajax.Updater({success:div},URL,{method:"post",evalScripts:"true",onSuccess:done});function done(){document.getElementById("loadingDiv").style.display="none";}}function setFareFarmatType(fareFormatValue,windowPositionId){if(fareFormatValue=="Points"){document.getElementById("promoLink1").style.display="none";document.getElementById("promoLink2").style.display="none";document.getElementById("promoLink3").style.display="none";}else{document.getElementById("promoLink1").style.display="block";document.getElementById("promoLink2").style.display="block";document.getElementById("promoLink3").style.display="block";}if(document.flightSearchRTForm){document.flightSearchRTForm.elements["flightSearch.fareFormatType"].value=fareFormatValue;}if(document.flightSearchMCForm){document.flightSearchMCForm.elements["flightSearch.fareFormatType"].value=fareFormatValue;}if(document.flightSearchOWForm){document.flightSearchOWForm.elements["flightSearch.fareFormatType"].value=fareFormatValue;}}function addTravelInsurance(checkbox,pageName){if(document.getElementById("totalTop")){var divObjs=document.getElementById("totalTop").getElementsByTagName("div");for(i=0;i<divObjs.length;i++){if(divObjs[i].getAttribute("id")&&divObjs[i].style.display!="none"){if(divObjs[i].getAttribute("id").indexOf("travelExpWithTotal")>=0&&checkbox.value=="on"){return ;}else{if(divObjs[i].getAttribute("id").indexOf("travelExpWithoutTotal")>=0&&checkbox.value=="off"){return ;}}}}}var addressCheckBoxStat="false";if(document.receiptForm.elements["viewPurchaseModel.info"]){addressCheckBoxStat=document.receiptForm.elements["viewPurchaseModel.info"].checked;}var URL="";if(pageName=="payment"){URL="addRemoveTravelInsurance.do?method=travelInsurance&checked="+checkbox.value+"&addressCheckBox="+addressCheckBoxStat;}if(pageName=="review"){URL="addRemoveTravelInsuranceReview.do?method=travelInsurance&checked="+checkbox.value;}var parms="";if(document.receiptForm){for(var i=0;i<document.receiptForm.elements.length;i++){var element=document.receiptForm.elements[i];if(i==0){parms=parms+element.name+"="+element.value;}else{parms=parms+"&"+element.name+"="+element.value;}}}var myAjax=new Ajax.Updater({success:"sect"},URL,{method:"post",evalScripts:"true",parameters:parms,onSuccess:done});function done(){document.getElementById("loadingDiv").style.display="none";if(checkbox.value=="on"){if(document.getElementById("travelExpWithInsurance")){document.getElementById("travelExpWithInsurance").style.display="block";}document.getElementById("travelExpWithInsurance1").style.display="block";document.getElementById("travelExpWithTotal").style.display="block";document.getElementById("travelExpWithoutTotal").style.display="none";document.getElementById("totalBottom").innerHTML=document.getElementById("totalTop").innerHTML;}else{if(document.getElementById("travelExpWithInsurance")){document.getElementById("travelExpWithInsurance").style.display="none";}document.getElementById("travelExpWithInsurance1").style.display="none";document.getElementById("travelExpWithoutTotal").style.display="block";document.getElementById("travelExpWithTotal").style.display="none";document.getElementById("totalBottom").innerHTML=document.getElementById("totalTop").innerHTML;}}}function showHideTaxDetails(){if(document.getElementById("PFC").style.display=="block"||document.getElementById("PFC").style.display==""){document.getElementById("PFC").style.display="none";document.getElementById("PFC1").style.display="none";document.getElementById("securityFee").style.display="none";document.getElementById("securityFee1").style.display="none";document.getElementById("segmentFee").style.display="none";document.getElementById("segmentFee1").style.display="none";document.getElementById("taxImage").innerHTML='<img alt="" src="images/taxFeesExpand.gif" onclick="javascript:showHideTaxDetails()"  onMouseOver="MakeCursor(this)"/>';}else{document.getElementById("PFC").style.display="block";document.getElementById("PFC1").style.display="block";document.getElementById("securityFee").style.display="block";document.getElementById("securityFee1").style.display="block";document.getElementById("segmentFee").style.display="block";document.getElementById("segmentFee1").style.display="block";document.getElementById("taxImage").innerHTML='<img alt="" src="images/taxFeesCollapse.gif" onclick="javascript:showHideTaxDetails()"  onMouseOver="MakeCursor(this)"/>';}}function showHideAIGTaxDetails(taxId,flight){if(flight=="original"){if(document.getElementById("taxBreakdown").style.display=="block"||document.getElementById("taxBreakdown").style.display==""){document.getElementById("taxBreakdown").style.display="none";document.getElementById("taxImageAig").innerHTML='<img alt="" id="'+taxId+'" src="images/taxFeesExpand.gif" onclick="javascript:showHideAIGTaxDetails(this.id,'+"'"+flight+"'"+')"  onMouseOver="MakeCursor(this)"/>';}else{document.getElementById("taxBreakdown").style.display="block";document.getElementById("taxImageAig").innerHTML='<img alt="" id="'+taxId+'" src="images/taxFeesCollapse.gif" onclick="javascript:showHideAIGTaxDetails(this.id,'+"'"+flight+"'"+')"  onMouseOver="MakeCursor(this)"/>';}}else{if(document.getElementById("taxBreakdownNew").style.display=="block"||document.getElementById("taxBreakdownNew").style.display==""){document.getElementById("taxBreakdownNew").style.display="none";document.getElementById("taxImageNew").innerHTML='<img alt="" id="'+taxId+'" src="images/taxFeesExpand.gif" onclick="javascript:showHideAIGTaxDetails(this.id,'+"'"+flight+"'"+')"  onMouseOver="MakeCursor(this)"/>';}else{document.getElementById("taxBreakdownNew").style.display="block";document.getElementById("taxImageNew").innerHTML='<img alt="" id="'+taxId+'" src="images/taxFeesCollapse.gif" onclick="javascript:showHideAIGTaxDetails(this.id,'+"'"+flight+"'"+')"  onMouseOver="MakeCursor(this)"/>';}}}function showCompanionsList(objId){document.getElementById(objId).style.width="420px";document.getElementById(objId).style.display="inline";}function ChangeFormValue(optval,num){var values=new String(optval);var str=optval.split("|");var titleObj=document.displayPurchaseForm.elements["viewPurchase.title["+num+"]"];var option=titleObj.options;titleObj.value=str[0];var prefix=str[0];if(prefix=="Mr"){option.selectedIndex=0;}if(prefix=="Mrs"){option.selectedIndex=1;}if(prefix=="Miss (Adult)"){option.selectedIndex=2;}if(prefix=="Miss (Child)"){option.selectedIndex=3;}if(prefix=="Ms"){option.selectedIndex=4;}if(prefix=="Mstr (Child)"){option.selectedIndex=5;}ChangeGuestType(prefix,document.displayPurchaseForm.elements["viewPurchase.guestType["+num+"]"]);document.displayPurchaseForm.elements["viewPurchase.firstName["+num+"]"].value=str[1];document.displayPurchaseForm.elements["viewPurchase.lastName["+num+"]"].value=str[2];document.displayPurchaseForm.elements["viewPurchase.guestNumber["+num+"]"].value=str[3];}function switchPaymentType(paymentType,id){showLoadingImageOpenWithAllValues(document.getElementById(id),0,100);document.barForm.method.value="switchPaymentType";document.barForm.tabSelect.value="5";document.barForm.action="switchPaymentType.do?paymentType="+paymentType;document.barForm.submit();}var maintain_CCPreScreenStatus;var myBarclaysCreditCardwWindow;function openBarclaysCreditCard(firstDivId,secondDivId,statusId){if(firstDivId!="BarclaysPreapprovedRightBarID"){document.getElementById(firstDivId).style.display="none";}formDataHex=regenMD5(document.barclaysCreditCardPromptForm,statusId);document.barclaysCreditCardPromptForm.SIGNATURE.value=formDataHex;openPopUp();}function openPopUp(){document.barclaysCreditCardPromptForm.target="BarclaysCreditCardPopUpWindow";var elementsToBeUpper="FIRSTNAME,LASTNAME,EMAIL,ADDRESS1,CITY,STATE,POSTALCODE,ADDRESS2";for(eleCnt=0;eleCnt<document.barclaysCreditCardPromptForm.elements.length;eleCnt++){objectEle=document.barclaysCreditCardPromptForm.elements[eleCnt];if(elementsToBeUpper.indexOf(objectEle.name)>-1){objectEle.value=(objectEle.value).toUpperCase();}}document.barclaysCreditCardPromptForm.submit();}function regenMD5(f,statusId){plain="";plain+="SESSION="+f.SESSION.value;plain+=":RETURL="+f.RETURL.value;plain+=":SESSIONSTATE="+f.SESSIONSTATE.value;if(statusId=="APPROVED"){plain+=":PRESCREENID="+f.PRESCREENID.value;}else{plain+=":PRESCREENID=";}plain+=":LASTNAME="+f.LASTNAME.value;plain+=":PASSWORD="+f.PASSWORD.value;return hex_md5(plain);}function statusUpdatePreScreenWithAJAX(firstDivId,actionMode,CCPreSceeenId,CCPreScreenStatus,ccFName,ccLName){myUrl="creditCardPostBack.do?method=getClosePreApprovedScreen&actionMode="+actionMode+"&CCPreSceeenId="+CCPreSceeenId+"&CCPreScreenStatus="+CCPreScreenStatus+"&ccFName="+ccFName+"&ccLName="+ccLName;enablePage();if(actionMode=="yes"){maintain_CCPreScreenStatus=CCPreScreenStatus;myBarclaysCreditCardwWindow=window.open("/va/html/Virgin_America_Credit_Card.html","BarclaysCreditCardPopUpWindow","toolbar=no,status=yes,menubar=no,location=no,scrollbars=yes,resizable=no, top="+200+", left="+100+", width="+840+",height="+700);ajaxOpenVACreditCard(myUrl,firstDivId);}else{ajaxVACreditCardWithBarclays(myUrl,firstDivId);document.getElementById("BarclaysPreapprovedID").style.display="none";}}function ajaxVACreditCardWithBarclays(myurl,div1){xmlhttp=new XMLHttpRequest();var thetime=new Date();var dummy=""+thetime.getHours()+thetime.getMinutes()+thetime.getSeconds();myurl=myurl+"&dummy="+dummy;ajaxDiv=div1;xmlhttp.open("POST",myurl,true);xmlhttp.onreadystatechange=handleResponseVACreditCardWithBarclays;xmlhttp.send("");}function handleResponseVACreditCardWithBarclays(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){if(xmlhttp.responseText!=""){}}}}var isBCCError=false;function ajaxOpenVACreditCard(myurl,div1){var myAjax=new Ajax.Updater({success:"BarclaysCreditCardPopUp"},myurl,{method:"post",evalScripts:"true",onComplete:doneAction});function doneAction(){if(document.getElementById("isBCCError")){if(document.getElementById("isBCCError").value=="true"){isBCCError=true;}}document.getElementById(div1).style.display="none";if(!isBCCError){document.getElementById("BarclaysCreditCardPopUp").style.display="block";openBarclaysCreditCard("BarclaysPreapprovedID","BarclaysCreditCardPopUp",maintain_CCPreScreenStatus);}}}var s_account="vatest";var s=s_gi(s_account);s.currencyCode="USD";s.trackDownloadLinks=true;s.trackExternalLinks=true;s.trackInlineStats=true;s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls";s.linkInternalFilters="javascript:,virginamerica.com";s.linkLeaveQueryString=false;s.linkTrackVars="None";s.linkTrackEvents="None";s.usePlugins=true;function s_doPlugins(s){if(s.events){if(s.events.indexOf("event1")>-1){s.prop18="start";s.gtctype="booking";}if(s.events.indexOf("purchase")>-1){s.prop18="stop";s.gtctype="booking";s.prop19="Booking Process";}if(s.events.indexOf("event45")>-1){s.prop18="start";s.gtctype="Check-In";}if(s.events.indexOf("event7")>-1){s.prop18="stop";s.gtctype="Check-In";s.prop19="Check-In";}if(s.events.indexOf("event17")>-1){s.prop18="start";s.gtctype="ChangeSeat";}if(s.events.indexOf("event20")>-1){s.prop18="stop";s.gtctype="ChangeSeat";s.prop19="Change Seat";}if(s.events.indexOf("event46")>-1){s.prop18="start";s.gtctype="ChangeFlight";}if(s.events.indexOf("event11")>-1){s.prop18="stop";s.gtctype="ChangeFlight";s.prop19="Change Flight";}if(s.events.indexOf("event48")>-1){s.prop18="start";s.gtctype="Cancel";}if(s.events.indexOf("event10")>-1){s.prop18="stop";s.gtctype="Cancel";s.prop19="Cancel Flight";}s.prop18=s.getTimeToComplete(s.prop18,s.gtctype,0);if(s.events.indexOf("event44")>-1){s.events=s.getValOnce(s.events,"event44",0);}}s.campaign=s.getQueryParam("tid");if(!s.campaign){s.campaign=s.getQueryParam("cid");s.campaign=s.getValOnce(s.campaign,"extcmpgn",0);}if(!s.eVar30){s.eVar30=s.getQueryParam("int");s.eVar30=s.getValOnce(s.eVar30,"intcmpgn",0);}var temphr=s.getTimeParting("h","-8",new Date().getFullYear());var tempday=s.getTimeParting("d","-8",new Date().getFullYear());var tempweek=s.getTimeParting("w","-8",new Date().getFullYear());if(temphr){s.prop14=s.eVar19=tempweek+" : "+tempday+" : "+temphr;}if(s.prop20){s.eVar31=s.prop20;}if(s.eVar30){s.prop17=s.eVar30;}if(s.prop21){s.eVar42=s.prop21;}if(s.prop22){s.eVar43=s.prop22;}if(s.campaign){s.eVar41=s.campaign;}}s.doPlugins=s_doPlugins;s.getQueryParam=new Function("p","d","u",""+"var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.locati"+"on);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p"+".length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t)v+=v?d+t:t;p=p.subs"+"tring(i==p.length?i:i+1)}return v");s.p_gpv=new Function("k","u",""+"var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v"+"=s.pt(q,'&','p_gvf',k)}return v");s.p_gvf=new Function("t","k",""+"if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T"+"rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s."+"epa(v)}return ''");s.getValOnce=new Function("v","c","e",""+"var s=this,k=s.c_r(c),a=new Date;e=e?e:0;if(v){a.setTime(a.getTime("+")+e*86400000);s.c_w(c,v,e?a:0);}return v==k?'':v");s.getTimeParting=new Function("t","z","y",""+"dc=new Date('1/1/2000');f=15;ne=8;if(dc.getDay()!=6||"+"dc.getMonth()!=0){return'Data Not Available'}else{;z=parseInt(z);"+"if(y=='2009'){f=8;ne=1};gmar=new Date('3/1/'+y);dsts=f-gmar.getDay("+");gnov=new Date('11/1/'+y);dste=ne-gnov.getDay();spr=new Date('3/'"+"+dsts+'/'+y);fl=new Date('11/'+dste+'/'+y);cd=new Date();"+"if(cd>spr&&cd<fl){z=z+1}else{z=z};utc=cd.getTime()+(cd.getTimezoneO"+"ffset()*60000);tz=new Date(utc + (3600000*z));thisy=tz.getFullYear("+");var days=['Sunday','Monday','Tuesday','Wednesday','Thursday','Fr"+"iday','Saturday'];if(thisy!=y){return'Data Not Available'}else{;thi"+"sh=tz.getHours();thismin=tz.getMinutes();thisd=tz.getDay();var dow="+"days[thisd];var ap='AM';var dt='Weekday';var mint='00';if(thismin>3"+"0){mint='30'}if(thish>=12){ap='PM';thish=thish-12};if (thish==0){th"+"ish=12};if(thisd==6||thisd==0){dt='Weekend'};var timestring=thish+'"+":'+mint+ap;var daystring=dow;var endstring=dt;if(t=='h'){return tim"+"estring}if(t=='d'){return daystring};if(t=='w'){return en"+"dstring}}};");s.getTimeToComplete=new Function("v","cn","e",""+"var s=this,d=new Date,x=d,k;if(!s.ttcr){e=e?e:0;if(v=='start'||v=='"+"stop')s.ttcr=1;x.setTime(x.getTime()+e*86400000);if(v=='start'){s.c"+"_w(cn,d.getTime(),e?x:0);return '';}if(v=='stop'){k=s.c_r(cn);if(!s"+".c_w(cn,'',d)||!k)return '';v=(d.getTime()-k)/1000;var td=86400,th="+"3600,tm=60,r=5,u,un;if(v>td){u=td;un='days';}else if(v>th){u=th;un="+"'hours';}else if(v>tm){r=2;u=tm;un='minutes';}else{r=.2;u=1;un='sec"+"onds';}v=v*r/u;return (Math.round(v)/r)+' '+un;}}return '';");s.visitorNamespace="virginamerica";s.dc=112;var s_code="",s_objectID;function s_gi(un,pg,ss){var d="function s_dr"+"(x,o,n){var i=x.indexOf(o);if(i>=0&&x.split)x=(x.split(o)).join(n);"+"else while(i>=0){x=x.substring(0,i)+n+x.substring(i+o.length);i=x.i"+"ndexOf(o)}return x}w.s_dr=s_dr;function s_d(x) {var t='`^@$#',l='01"+"23456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',d,n=0"+",b,k,w,i=x.lastIndexOf('~~');if(i>0){d=x.substring(0,i);x=x.substri"+"ng(i+2);while(d){w=d;i=d.indexOf('~');if(i>0){w=d.substring(0,i);d="+"d.substring(i+1)}else d='';b=parseInt(n/62);k=n-b*62;k=t.substring("+"b,b+1)+l.substring(k,k+1);x=s_dr(x,k,w);n++}for(i=0;i<5;i++){w=t.su"+"bstring(i,i+1);x=s_dr(x,w+' ',w)}}return x}w.s_d=s_d;",c=".substrin"+"g(~.indexOf(~return ~=fun`K(~){`Os=^u~`t $6~;$6~.toLowerCase()~`cFu"+"n`K('e`s`Os=s_c_il['+@i+']~};s.~.length~.toUpperCase~`cObject~s.wd~"+"t^D~.location~')q='~dynamicAccount~link~s.apv~ction~$l$X~)$6x^X!Obj"+"ect||!Object.prototype||!Object.prototype[x])~@G^Al)@G^Al['+@i+'].m"+"rq(\"'+un+'\")'~var ~s.pt(~ookieDomainPeriods~,`s,'~while(~);s.~.pr"+"otocol~){$6~visitor~=''~:'')~;@F^Vs[k],255)}~s_c2f~javaEnabled~=new"+" ~.lastIndexOf('~tm.get~@5\"$Qs.b.addBehavior('# default# ~onclick~"+"ternalFilters~entElement~Name~javascriptVersion~=parseFloat(~cookie"+"~parseInt(~s.^J~Type~o^joid~browser~','~else~referrer~colorDepth~St"+"ring~.host~s.rep(~}catch(e){~r=s.m(f)?s[f](~}$6~s.un~s.eo~s.sq~t=s."+"ot(o)~track~j='1.~)?'Y':'N'~$dURL~^jc_i~s.ismac~lugins~=='~;for(~Sa"+"mpling~s.rc[un]~s.b.addEventListener~Download~tfs~resolution~.get@I"+"()~s.eh~s.isie~s.vl_l~s.vl_t~Height~t,h){t=t?t~isopera~escape(~scre"+"en.~s.fl(~harCode~&&(~variableProvider~s.gg('objectID')~&&s.~:'';h="+"h?h~e&&l$kSESSION'~');~f',~_'+~Date~name~home$d~.s_~s.c_r(~s.rl[u~o"+".href~Lifetime~Width~sEnabled~'){q='~b.attachEvent~&&l$kNONE'){~Ext"+"ernalLinks~this~charSet~onerror~currencyCode~s=s_gi(~e$SElement~;s."+"gl(s.vl_g~.parent~Array~lnk~Opera~eval(~Math.~s.fsg~s.ns6~docum~s.o"+"un~conne~InlineStats~Track~'0123456789~s[k]=~window~onload~Time~s.e"+"pa(~s.c_w(~o.type~(s.ssl~n=s.oid(o)~LeaveQuery~')>=~&&t~'=')~){n=~+"+"1))~' '+~s.t()}~\",''),~=s.oh(o);~+(y<1900?~ingServer~s_gs~true~ses"+"s~campaign~lif~;fun~,100)~s.co(~s._in~x in ~='s_~ffset~s.c_d~'&pe~s"+".gv(~s.qav~s.pl~=(apn~sqs',q);~Year(~=s.n.app~&&!~(''+~(\")>=~)+'/~"+"',s~s()+':'+~){p=~():''~a):f(~){v=s.n.~channel~if(~un)~.target~o.va"+"lue~etscape~(ns?ns:~s_')t=t~omePage~++}~')<~){x~1);~e))~'+n~height~"+"events~trk~random~code~un,~try{~'MSIE ~.src~INPUT'~floor(~s.pg~s.nu"+"m(~s.ape(~s.c_gd~s.dc~.inner~transa~Events~page~.set~Group,~Match,~"+".fromC~++){~?'':~!='~='+~(\")<~?'&~+';~(f){~>=5)~&&i>~[b](~=l[n];~~"+"fun`K `ae$p`Ox`X,s=0,e,a,b,c;`S1){e=f`1'\"@z);b=f`1'\\\\',s);c=f`1"+'"\\n",s)`6e<0||(b>=0&&b<$Ie=b`6e<0||(c>=0&&c<$Ie=c`6e>=0$G+=(e>s?'+"f`0s,e)`Y+(e==c?'\\\\n':'\\\\'+f`0e,e@T;s=e+1}`t `2x+f`0s)}`2f}w.`a"+"e=`ae@f`K `aa$p`Os=f`1'(')+1,e=f`1')'),a`X,c;`Ss>=0&&s<e){c=f`0s,s+"+"1)`6c==`s)a+='\",\"';`5(\"\\n\\r\\t \")`1c)<0)a+=c;s$E`2a?'\"'+a+'"+"\"':a}w.`aa=`ae@f`K `a(cc){cc`X+cc;`Ofc='`Of`cFun`K(@z=cc`1';',cc`1"+"'{')),e=cc`d}'),o,a,d,q,c,f,h,x;fc+=`aa(cc)+',\"`Os`C;';c=cc`0s+1,e"+");s=c`1'fun`K^d`Ss>=0){d=1;q`X;x=0;f=c`0s);a=`aa(f);e=o=c`1'{@z);e+"+"+;`Sd>0){h=c`0e,e+1)`6q`Vh==q@vx)q`X`6h^D\\\\')x=x?0:1;`t x=0}`t{$6"+"h^D\"'||h==\"'\")q=h`6h^D{')d++`6h^D}')d--^1d>0)e$Ec=c`00,s)+'new F"+"un`K('+(a?a+`s`Y+'\"'+`ae(c`0o+1,$I+'\")'+c`0e+$Hs=c`1'fun`K')}fc+="+'`ae(c)$o`2s");\';@5fc);`2f}w.`a=`a`6pg){fun`K s_co(o){`O^y"_",1,$'+"H`2@ho)}w^jco=s_co@f`K @a($7{`O^y$P1,$H`2@Vw^jgs=@a@f`K s_dc($7{`O^"+"y$P$H`2@Vw^jdc=s_dc;}fun`K s_c($Ppg,ss`4;s._c@kc';`D=@G`6!`D^An){`D"+"^Al`c@2;`D^An=0;}s._il=`D^Al;@i=`D^An;s._il[@i]=s;`D^An++;s.m`3m){`"+"2@wm)`1'{$F0`9fl`3x,l){`2x?@wx)`00,l):x`9co`3o`V!o)`2o;`On`C,x^E@jo"+")$6x`1'select$F0&&x`1'filter$F0)n[x]=o[x];`2n`9num`3x$G`X+x^E`Op=0;"+"p<x`A;p++)$6(@E')`1x`0p,p@T<0)`20;`21`9rep`3x,o,n){`Oi=x`1o);`Sx$r="+"0$G=x`00,i)+n+x`0i+o`A);i=x`1o,i+n`A)}`2x`9ape`3x`4,h=@EABCDEF',i,c"+"=s.^v,n,l,e,y`X;c=c?c`B$2`6x$G`X+x`6c^DAUTO'^X'').c^WAt){for(i=0;i<"+"x`A;i$ic=x`0i,i+$Hn=x.c^WAt(i)`6n>127){l=0;e`X;`Sn||l<4){e=h`0n%16,"+"n%16+1)+e;n=`nn/16);l$Ey+='%u'+e}`5c^D+')y+='%2B';`t y+=^Tc)}x=y}`t"+"{x=x?`y^T''+x),'+`s%2B'):x`6x&&c^aem==1&&x`1'%u$F0&&x`1'%U$F0){i=x`"+"1'%^d`Si>=0){i++`6h`08)`1x`0i,i+1)`B())>=0)`2x`00,i)+'u00'+x`0i);i="+"x`1'%',i)}}}}`2x`9epa`3x`4;`2x?un^T`y''+x,'+`s ')):x`9pt`3x,d,f,a`4"+",t=x,z=0,y,r;`St){y=t`1d);y=y<0?t`A:y;t=t`00,y);^0t,$3t,a)`6r)`2r;z"+"+=y+d`A;t=x`0z,x`A);t=z<x`A?t:''}`2''`9isf`3t,a){`Oc=a`1':')`6c>=0)"+"a=a`00,c)`6t`00,2)^D$C`02);`2(t!`X@Q==a)`9fsf`3t,a`4`6`Pa`Ris^et))@"+"7+=(@7!`X?`s`Y+t;`20`9fs`3x,f`4;@7`X;`Px`Rfs^ef);`2@7`9c_d`X;$Yf`3t"+",a`4`6!$Wt))`21;`20`9c_gd`3`4,d=`D`F`x^h,n=s.fpC`Q,p`6!n)n=s.c`Q`6d"+"@v@m@Sn?`nn):2;n=n>2?n:2;p=d`d.')`6p>=0){`Sp>=0&&n>1$1d`d.',p-$Hn--"+"}@m=p>0&&`Pd,'.`sc_gd^e0)?d`0p):d}}`2@m`9c_r`3k`4;k=$Xk);`Oc=@Us.d."+"`m,i=c`1@Uk+@R,e=i<0?i:c`1';',i),v=i<0$j@Jc`0i+2+k`A,e<0?c`A:$I;`2v"+"$k[[B]]'?v:''`9c_w`3k,v,e`4,d=$Y(),l=s.`m^n,t;v`X+v;l=l?@wl)`B$2`6^"+"c^st=(v!`X?`nl?l:0):-60)`6t){e`c^g;e$e@I(e^L+(t*1000))}^1k^ss.d.`m="+"k+'`Lv!`X?v:'[[B]]')$o path=/;'+(^c?' expires$le.toGMT`w()$o'`Y+(d?"+"' domain$ld$o'`Y;`2^kk)==v}`20`9eh`3o,e,r,f`4,b='s^fe+'^f@i,n=-1,l,"+"i,x`6!^Ml)^Ml`c@2;l=^Ml^Ei=0;i<l`A&&n<0;i++`Vl[i].o==o&&l[i].e==e)n"+"=i^1n<0@Si;l[n]`C}x$tx.o=o;x.e=e;f=r?x.b:f`6r||f$G.b=r?0:o[e];x.o[e"+"]=f^1x.b$G.o[b]=x.b;`2b}`20`9cet`3f,a,t,o,b`4,r`6`J>=5^X!s.^S||`J>="+"7))@5'$Q^0$3a)`zr=s.m(t)?s[t](e):t(e)}^d`t{$6^B^au`1$R4@P0)r=s.m(b)"+"?s$sa):b(a);`t{^M(`D,'^w',0,o);^0$3a`Teh(`D,'^w',1)}}`2r`9g^Jet`3e`"+'4;`2`o`9g^Joe`8;^M(@G,"^w",1`Te^J=1;`Oc=s.t()`6c)s.d.write(c`Te^J'+"=0;`2@b'`Tg^Jfb`3a){`2@G`9g^Jf`3w`4,p=w@1,l=w`F;`o=w`6p&&p`F!=l&&p`"+"F`x==l`x){`o=p;`2s.g^Jf(`o)}`2`o`9g^J`3`4`6!`o){`o=`D`6!s.e^J)`o=s."+"cet('g^J^e`o,'g^Jet@z.g^Joe,'g^Jfb')}`2`o`9mrq`3u`4,l=^l],n,r;^l]=0"+"`6l)for(n=0;n<l`A;n$ir$ts.mr(0,0,r.t,r.u,r.r)}`9mr`3@c,q,ta,u,rs`4,"+"dc=$Z,t1=s.^6@Z,t2=s.^6@ZSecure,ns=s.`W`jspace,un=u?u:$Bs.f$7,unc=`"+"y$P'_`s-'),r`C,l,imn@ki^f($7,im,b,e`6!rs){rs='http'+@M?'s'`Y+'://'+"+"(t1?@M@Q2?t2:t1):($B@M?'102':unc))+'.'+($Z?$Z:112)+'.2o7.net')@yb/s"+"s/'+^2+'/1/H.14/'+@c+'?[AQB]&ndh=1'+(q?q`Y+'&[AQE]'`6^N@v^B`V`J>5.5"+")rs=^Vrs,4095);`t rs=^Vrs,2047)}^1s.d.images&&`J>=3^X!s.^S||`J>=7)^"+"X@8<0||`J>=6.1)`V!s.rc)s.rc`C`6!^G){^G=1`6!s.rl)s.rl`C;^ln]`c@2;set"+"@Iout('$6`N,750)}`t{l=^ln]`6l){r.t=ta;r.u=un;r.r=rs;l[l`A]=r;`2''}i"+"mn+='^f^G;^G$Eim=`D[imn]`6!im)im=`D[imn]`cImage;im^jl=0;im.@H`cFun`"+"K('e`s^u^jl=1`6`N);im$S=rs`6rs`1@n=@P0^X!ta||ta^D_self'||ta^D_top'|"+"|(`D.^h@Qa==`D.^h))){b=e`c^g;`S!im^jl&&e^L-b^L<500)e`c^g}`2''}`2'<i"+"m'+'g sr'+'c=\"'+rs+'\" width=1 $K=1 border=0 alt=\"\">'`9gg`3v`4`6"+"!`D['s^fv])`D['s^fv]`X;`2`D['s^fv]`9glf`3t,a`Vt`00,2)^D$C`02);`Os=^"+"u,v=s.gg(t)`6v)s[t]=v`9gl`3v`4`6$V)`Pv`Rgl^e0)`9gv`3v`4;`2s['vpm^fv"+"]?s['vpv^fv]:(s[v]?s[v]`Y`9havf`3t,a`4,b=t`00,4),x=t`04),n=`nx),k='"+"g^ft,m='vpm^ft,q=t,v=s.`I@DVars,e=s.`I@D$c;@F@ot)`6s.@3||^3){v=v?v+"+"`s+^O+`s+^O2:''`6v@v`Pv`Ris^et))s[k]`X`6`E$L'&&e)@Fs.fs(s[k],e)}s[m"+"]=0`6`E`WID`Gvid';`5`E^9^qg'`Z`5`E`u^qr'`Z`5`Evmk`Gvmt';`5`E^v^qce'"+"`6s[k]&&s[k]`B()^DAUTO')@F'ISO8859-1';`5s[k]^aem==2)@F'UTF-8'}`5`E`"+"W`jspace`Gns';`5`Ec`Q`Gcdp';`5`E`m^n`Gcl';`5`E^Y`Gvvp';`5`E^x`Gcc';"+"`5`E$5`Gch';`5`E$b`KID`Gxact';`5`E@d`Gv0';`5`E^K`Gs';`5`E`v`Gc';`5`"+"E`k`Gj';`5`E`b`Gv';`5`E`m^p`Gk';`5`E`r^o`Gbw';`5`E`r^Q`Gbh';`5`E@B`"+"K`p`Gct';`5`E^i`Ghp';`5`Ep^C`Gp';`5$Wx)`Vb^Dprop`Gc$J;`5b^DeVar`Gv$"+"J;`5b^Dhier^qh$J`Z^1s[k]@Q$k`I`j'@Q$k`I`p')@p+='&'+q+'`Ls[k]);`2''`"+"9hav`3`4;@p`X;`P^P`Rhav^e0);`2@p`9lnf`3^R`7^b`7:'';`Ote=t`1@R`6t@Qe"+">0&&h`1t`0te@T>=0)`2t`00,te);`2''`9ln`3h`4,n=s.`I`js`6n)`2`Pn`Rln^e"+"h);`2''`9ltdf`3^R`7^b`7:'';`Oqi=h`1'?^dh=qi>=0?h`00,qi):h`6t&&h`0h`"+"A-(t`A@T^D.'+t)`21;`20`9ltef`3^R`7^b`7:''`6t&&h`1t)>=0)`21;`20`9lt`"+"3h`4,lft=s.`I^IFile`ps,lef=s.`IEx`h,@e=s.`IIn`h;@e=@e?@e:`D`F`x^h;h"+"=h`7`6s.^6^ILinks&&lft&&`Plft`Rltd^eh))`2'd'`6s.^6^t^Xlef||@e)^X!le"+"f||`Plef`Rlte^eh))^X!@e||!`P@e`Rlte^eh)))`2'e';`2''`9lc`8,b=^M(^u,"+'"`g"`T@3=@h^u`Tt(`T@3=0`6b)`2^u$se);`2@b\'`Tbc`8,f`6s.d^ad.all^ad.'+'all.cppXYctnr)return;^3=^z?^z:e$8;@5"$Q$6^3^X^3.tag`j||^3.par`i||^'+"3@1Nod$I@Vcatch$p}\"`Teo=0'`Toh`3o`4,l=`D`F,h=^m?^m:'',i,j,k,p;i=h`"+"1':^dj=h`1'?^dk=h`1'/')`6h^Xi<0||(j>=0$rj)||(k>=0$rk))$1o`U&&o`U`A>"+"1?o`U:(l`U?l`U`Y;i=l.path^h`d/^dh=(p?p+'//'`Y+(o`x?o`x:(l`x?l`x`Y)+"+"(h`00,1)$k/'?l.path^h`00,i<0?0:i@y'`Y+h}`2h`9ot`3o){`Ot=o.tag`j;t=t"+"@Q`B?t`B$2`6`ESHAPE')t`X`6t`V`E$T&&@L&&@L`B)t=@L`B();`5^m)t='A';}`2"+"t`9oid`3o`4,^5,p,c,n`X,x=0`6t@v`q$1o`U;c=o.`g`6^m^X`EA'||`EAREA')^X"+'!c||!p||p`7`1\'javascript$F0))n@X`5c@S`ys.rep(`ys.rep@wc,"\\r@W"\\'+"n@W\"\\t@W' `s^dx=2}`5$9^X`E$T||`ESUBMIT')@S$9;x=3}`5o$S&&`EIMAGE')"+"n=o$S`6n){`q=^Vn@g;`qt=x}}`2`q`9rqf`3t,un`4,e=t`1@R,u=e>=0?`s+t`00,"+"e)+`s:'';`2u&&u`1`s+un+`s)>=0?@Jt`0e@T:''`9rq`3un`4,c=un`1`s),v=^k'"+"s_sq'),q`X`6c<0)`2`Pv,'&`srq^e$7;`2`Pun`Rrq',0)`9sqp`3t,a`4,e=t`1@R"+",q=e<0$j@Jt`0e+1)`Tsqq[q]`X`6e>=0)`Pt`00,e)`R@s`20`9sqs`3$Pq`4;^4u["+"un]=q;`20`9sq`3q`4,k@ksq',v=^kk),x,c=0;^4q`C;^4u`C;^4q[q]`X;`Pv,'&`"+"ssqp',0);`P^2`R@sv`X^E@j^4u`M)^4q[^4u[x]]+=(^4q[^4u[x]]?`s`Y+x^E@j^"+"4q`M&&^4q[x]^Xx==q||c<2)){v+=(v$n'`Y+^4q[x]+'`Lx);c$E`2@Kk,v,0)`9wd"+'l`8,r=@b,b=^M(`D,"@H"),i,o,oc`6b)r=^u$se)^Ei=0;i<s.d.`Is`A;i$io=s'+'.d.`Is[i];oc=o.`g?""+o.`g:""`6(oc`1"@a$m0||oc`1"^joc@x0)&&oc`'+'1".tl$m0)^M(o,"`g",0,s.lc);}`2r^d`Ds`3`4`6`J>3^X!^N||!^B||`J$q`V'+"s.b^a^r)s.^r('`g@z.bc);`5s.b&&^H)^H('click@z.bc,false);`t ^M(`D,'@H"+"',0,`Dl)}`9vs`3x`4,v=s.`W^F,g=s.`W^F$fk@kvsn^f^2+(g?'^fg`Y,n=^kk),e"+"`c^g,y=e.get@t);e$e@ty+10@Y1900:0))`6v){v*=100`6!n`V!@Kk,x,$I`20;n="+"x^1n%10000>v)`20}`21`9dyasmf`3t,m`Vt&&m&&m`1t)>=0)`21;`20`9dyasf`3t"+",m`4,i=t?t`1@R:-1,n,x`6i>=0&&m){`On=t`00,i),x=t`0i+1)`6`Px`Rdyasm^e"+"m))`2n}`20`9uns`3`4,x=s.`HSele`K,l=s.`HList,m=s.`H$gn,i;^2=^2`7`6x&"+"&l`V!m)m=`D`F`x`6!m.toLowerCase)m`X+m;l=l`7;m=m`7;n=`Pl,';`sdyas^em"+")`6n)^2=n}i=^2`1`s`Tfun=i<0?^2:^2`00,i)`9sa`3un`4;^2=un`6!@A)@A=un;"+"`5(`s+@A+`s)`1$7<0)@A+=`s+un;^2s()`9t`3`4,$M=1,tm`c^g,sed=Math&&@6$"+"N?@6$U@6$N()*10000000000000):`e@I(),@c='s'+@6$U`e@I()/10800000)%10+"+"sed,y=`e@t),vt=`e^g(@y'+`eMonth(@y'@Yy+1900:y)+@U`eHour$0`eMinute$0"+"`eSeconds()+@U`eDay()+@U`e@IzoneO@l(),^J=s.g^J(),ta`X,q`X,qs`X@0`Tu"+"ns()`6!s.td){`Otl=^J`F,a,o,i,x`X,c`X,v`X,p`X,bw`X,bh`X,^70',k=@K's_"+"cc`s@b',0^8,hp`X,ct`X,pn=0,ps`6`w&&`w.prototype){^71'`6j.match){^72"+"'`6tm$eUTC^g){^73'`6^N&&^B&&`J$q^74'`6pn.toPrecision){^75';a`c@2`6a"+".forEach){^76';i=0;o`C;@5'$Qi`cIterator(o)`z}')`6i&&i.next)^77'}}}}"+"^1`J>=4)x=^Uwidth+'x'+^U$K`6s.isns||s.^S`V`J>=3$4`b(^8`6`J>=4){c=^U"+"pixelDepth;bw=`D$a^o;bh=`D$a^Q}}@q=s.n.p^C}`5^N`V`J>=4$4`b(^8;c=^U`"+"v`6`J$q{bw=s.d.@9`i.o@l^o;bh=s.d.@9`i.o@l^Q`6!^B^ab){`fh$D^dhp=s.b."+'isH$D(tl^8`z}");`fclientCaps^dct=s.b.@B`K`p`z}")}}}`t r`X^1@q)`Sp'+"n<@q`A&&pn<30){ps=^V@q[pn].^h@g$o'`6p`1ps)<0)p+=ps;pn$Es.^K=x;s.`v="+"c;s.`k=j;s.`b=v;s.`m^p=k;s.`r^o=bw;s.`r^Q=bh;s.@B`K`p=ct;s.^i=hp;s."+"p^C=p;s.td=1^1s.useP^C)s.doP^C(s);`Ol=`D`F,r=^J.@9ent.`u`6!s.^9)s.^"+"9=l`6!s.`u)s.`u=r`6s.@3||^3){`Oo=^3?^3:s.@3`6!o)`2'';`Op=@o'$d`j'),"+"w=1,^5,@N,x=`qt,h,l,i,oc`6^3&&o==^3){`So@vn@Q$kBODY'){o=o.par`i?o.p"+"ar`i:o@1Node`6!o)`2'';^5;@N;x=`qt}oc=o.`g?''+o.`g:''`6(oc`1\"@a@x0&"+"&oc`1\"^joc$m0)||oc`1\".tl@x0)`2''}ta=n?o$8:1;h@Xi=h`1'?^dh=s.`I@O`"+"w||i<0?h:h`00,i);l=s.`I`j?s.`I`j:s.ln(h);t=s.`I`p?s.`I`p`7:s.lt(h)`"+"6t^Xh||l))q+=@n=@3^f(`Ed'||`Ee'?$Xt):'o')+(h?@nv1`Lh)`Y+(l?@nv2`Ll)"+"`Y;`t $M=0`6s.^6@C`V!p$1@o'^9^dw=0}^5;i=o.sourceIndex`6^Z@S^Z;x=1;i"+"=1^1p&&n@Q)qs='&pid`L^Vp,255))+(w$npidt$lw`Y+'&oid`L^Vn@g)+(x$noidt"+"$lx`Y+'&ot`Lt)+(i$noi$li`Y}^1!$M@vqs)`2''`6s.p_r)s.p_r();`O$O`X`6$M"+"^avs(sed))$O=s.mr(@c,(vt$nt`Lvt)`Y+s.hav()+q+(qs?qs:s.rq(^2)),ta`Ts"+"q($M$jqs`T@3=^3=s.`I`j=s.`I`p=`D^jobjectID=s.ppu`X`6$V)`D^j@3=`D^je"+"o=`D^j`I`j=`D^j`I`p`X;`2$O`9tl`3o,t,n`4;s.@3=@ho`T`I`p=t;s.`I`j=n;s"+".t()`9ssl=(`D`F`U`7`1'https@P0`Td=@9ent;s.b=s.d.body;s.n=navigator;"+"s.u=s.n.userAgent;@8=s.u`1'N$A6/^d`Oapn@u`j,v@uVersion,ie=v`1$R'),o"+"=s.u`1'@4 '),i`6v`1'@4@P0||o>0)apn='@4';^N@r^DMicrosoft Internet Ex"+"plorer'`Tisns@r^DN$A'`T^S@r^D@4'`Tismac=(s.u`1'Mac@P0)`6o>0)`J`ls.u"+"`0o+6));`5ie>0){`J=`ni=v`0ie+5))`6`J>3)`J`li)}`5@8>0)`J`ls.u`0@8+10"+"));`t `J`lv`Tem=0`6`w$h^W){i=^T`w$h^W(256))`B(`Tem=(i^D%C4%80'?2:(i"+"^D%U0100'?1:0))}s.sa(un`Tvl_l='`WID,vmk,ppu,^v,`W`jspace,c`Q,`m^n,$"+"d`j,^9,`u,^x';^P=^O+',^Y,$5,server,$d`p,$b`KID,purchaseID,@d,state,"+"zip,$L,products,`I`j,`I`p'^E`On=1;n<51;n++)^P+=',prop$J+',eVar$J+',"+"hier$J;^O2='^K,`v,`k,`b,`m^p,`r^o,`r^Q,@B`K`p,^i,p^C';^P+=`s+^O2;s."+"vl_g=^P+',`W^F,`W^F$f`HSele`K,`HList,`H$g^6^ILinks,^6^t,^6@C,`I@O`w"+",`I^IFile`ps,`IEx`h,`IIn`h,`I@DVars,`I@D$c,`I`js,@3';$V=pg@0)`6!ss)"+"`Ds()}",w=window,l=w.s_c_il,n=navigator,u=n.userAgent,v=n.appVersion,e=v.indexOf("MSIE "),m=u.indexOf("Netscape6/"),a,i,s;if(un){un=un.toLowerCase();if(l){for(i=0;i<l.length;i++){s=l[i];if(s._c=="s_c"){if(s.oun==un){return s;}else{if(s.fs(s.oun,un)){s.sa(un);return s;}}}}}}eval(d);c=s_d(c);i=c.indexOf("function s_c(");eval(c.substring(0,i));if(!un){return 0;}c=c.substring(i);if(e>0){a=parseInt(i=v.substring(e+5));if(a>3){a=parseFloat(i);}}else{if(m>0){a=parseFloat(u.substring(m+10));}else{a=parseFloat(v);}}if(a>=5&&v.indexOf("Opera")<0&&u.indexOf("Opera")<0){eval(c);return new s_c(un,pg,ss);}else{s=s_c2f(c);}return s(un,pg,ss);}s_gi();var stories=new Array();var divs="";var timeout;var current=0;var currentLeft=0;var theInterval;var sliding;var windowWidth=452;var delay=3500;var storyCount=0;parseNewsXML=function(){var xmlhttp=new XMLHttpRequest();xmlhttp.open("GET","html/news.xml",false);xmlhttp.send("");oDomDoc=xmlhttp.responseXML;if(oDomDoc.parseError!=0){}else{rootNode=oDomDoc.firstChild;storyCount=0;for(var i=0;i<rootNode.childNodes.length;i++){if(rootNode.childNodes[i].nodeName=="story"){var storyNode=rootNode.childNodes[i];var title;var title_set;var link;var link_set;for(var j=0;j<storyNode.childNodes.length;j++){stories[storyCount]=new Array();if(storyNode.childNodes[j].nodeName=="title"){title=(typeof (storyNode.childNodes[j].textContent)!="undefined")?storyNode.childNodes[j].textContent:storyNode.childNodes[j].text;title_set=true;}if(storyNode.childNodes[j].nodeName=="link"){link=(typeof (storyNode.childNodes[j].textContent)!="undefined")?storyNode.childNodes[j].textContent:storyNode.childNodes[j].text;link_set=true;}if(title_set&&link_set){divs+=addDiv(storyCount,link,title);title_set=false;link_set=false;}}storyCount++;}}}$("ticker_container").innerHTML=divs;$("item_"+(storyCount-1)).style.left=-1*windowWidth+"px";};function addDiv(i,story_link,story_title){var str="<div class='ticker_item' style='left:"+(i*windowWidth)+"px;'id='item_"+i+"'>";if(story_link!=""){str+="<a href='"+story_link+"'>";}str+=story_title;if(story_link!=""){str+="</a>";}str+="</div>";return str;}init=function(){parseNewsXML();Event.observe($("left"),"click",doLeft,false);Event.observe($("right"),"click",doRight,false);theInterval=setInterval('slide("right")',delay);};function slide(direction){if(direction=="right"){if(current==0){prev_item=storyCount-1;}else{prev_item=current-1;}var leftpos=parseInt($("item_"+prev_item).style.left);leftpos+=windowWidth*(storyCount);$("item_"+prev_item).style.left=leftpos+"px";current++;if(current==storyCount){current=0;}currentLeft=currentLeft-windowWidth;}else{if(current==0){prev_item=storyCount-1;}else{prev_item=current-1;}if(prev_item==0){last_item=storyCount-1;}else{last_item=prev_item-1;}leftpos=parseInt($("item_"+prev_item).style.left)-windowWidth;$("item_"+last_item).style.left=leftpos+"px";current--;if(current<0){current=storyCount-1;}currentLeft=currentLeft+windowWidth;}doSlide($("ticker_container"),currentLeft,400);}function doSlide(element,target,dur){var start=new Date().getTime();var current=start;var startPos;sliding=true;if(element.style.left==""){startPos=0;}else{startPos=parseInt(element.style.left);}slideInterval=setInterval(function(){if(current-start>dur){element.style.left=target+"px";clearInterval(slideInterval);sliding=false;}else{current=new Date().getTime();delta=(current-start)/dur;if(delta<1){var newPos=(target-startPos)*delta+startPos;element.style.left=newPos+"px";}}},20);}doLeft=function(){if(sliding){return ;}if(theInterval){clearInterval(theInterval);}slide("left");};doRight=function(){if(sliding){return ;}if(theInterval){clearInterval(theInterval);}slide("right");};function setSavedCardInForm(cardName,cardType,val){cardName.value=val.split("|")[0];cardType.value=val.split("|")[1];showHideSecurityCode(cardType.value,"savedCardCodeTd");}function showHideSecurityCode(cardType,securityCodeId){if(cardType=="UATP"){document.getElementById(securityCodeId).style.visibility="hidden";}else{document.getElementById(securityCodeId).style.visibility="visible";}}