function contactAA(pageName){window.open(pageName,"ContactAA","scrollbars=yes,menubar=no,resizable=yes,width=680,height=430,top=100,left=100");}function printPage(pageName){window.open(pageName,"Print","scrollbars=yes,menubar=yes,resizable=yes,width=680,height=430,screenX=100,screenY=100,top=100,left=100");}function printAAdvEnrolPage(pageName){window.open(pageName,"Print","scrollbars=yes,menubar=yes,resizable=yes,width=705,height=430,screenX=100,screenY=100,top=100,left=100");}function printBoardingPass(pageName){var w=780;var h=screen.height-20;var winl=(screen.width-w)/2;var wint=0;window.open(pageName,"Print","scrollbars=yes,menubar=yes,resizable=yes,width="+w+",height="+h+",top="+wint+",left="+winl+"");}function printViewMiles(pageName){window.open(pageName,"Print","scrollbars=yes,menubar=yes,resizable=yes,width=720,height=430,screenX=100,screenY=100,top=100,left=100");}var popupHandle=null;var prevUrl;function closePopup(){if(navigator.userAgent.indexOf("Netscape6")==(-1)){if(popupHandle!=null&&!popupHandle.closed){popupHandle.close();}}}function displayPopup(position,strUrl,strName,height,width){if(strName=="Help"){var properties="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes";}else{var properties="toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes";}properties=properties+",width="+width+",height="+height;var leftprop,topprop,screenX,screenY,cursorX,cursorY,padAmt;if(navigator.appName=="Microsoft Internet Explorer"){screenY=document.body.offsetHeight;screenX=window.screen.availWidth;}else{screenY=window.outerHeight;screenX=window.outerWidth;}if(position==1){cursorX=evnt.screenX;cursorY=evnt.screenY;padAmtX=10;padAmtY=10;if((cursorY+height+padAmtY)>screenY){padAmtY=(-30)+(height*-1);}if((cursorX+width+padAmtX)>screenX){padAmtX=(-30)+(width*-1);}if(navigator.appName=="Microsoft Internet Explorer"){leftprop=cursorX+padAmtX;topprop=cursorY+padAmtY;}else{leftprop=(cursorX-pageXOffset+padAmtX);topprop=(cursorY-pageYOffset+padAmtY);}}else{leftvar=(screenX-width)/2;rightvar=(screenY-height)/2;if(navigator.appName=="Microsoft Internet Explorer"){leftprop=leftvar;topprop=rightvar;}else{leftprop=(leftvar-pageXOffset);topprop=(rightvar-pageYOffset);}}properties=properties+",left="+leftprop;properties=properties+",top="+topprop;if(popupHandle==null||popupHandle.closed){popupHandle=window.open(strUrl,strName,properties);}else{if(prevUrl!=strUrl){popupHandle.close();popupHandle=window.open(strUrl,strName,properties);popupHandle.focus();}else{popupHandle.focus();}}prevUrl=strUrl;}function checkInvalidSlaveForm(form){for(var i=0;i<form.elements.length;i++){var element=form.elements[i];eval("var value = ("+form.invalidJavaScript+") ? true : false;");if(value==true){return true;}}return false;}function checkInvalidForms(form){for(var i=0;i<document.forms.length;i++){if(document.forms[i]==form){continue;}if(document.forms[i].invalidJavaScript!=null&&checkInvalidSlaveForm(document.forms[i])){if(document.forms[i].onsubmit==null){addActionParameter(document.forms[i]);document.forms[i].submit();return false;}var submitValue=document.forms[i].onsubmit();if(submitValue==false){return false;}addActionParameter(document.forms[i]);document.forms[i].submit();return false;}}return true;}function addActionParameter(form){var action=form.action;if(action==null){return;}if(action.indexOf("?")==-1){action=action+"?invalidForm=true";}else{action=action+"&invalidForm=true";}form.action=action;}function popupCentered(pageURL,title,w,h){var left=(screen.width-w)/2;var top=(screen.availHeight-h)/2;var targetWin=window.open(pageURL,title,"scrollbars=yes,toolbar=no,resizable=yes,status=yes,location=no,menubar=no,width="+w+",height="+h+",top="+top+",left="+left);}function submitform(){document.getElementById("subscribeAAVacationForm").submit();return false;}function setVisibilityAwardMiles(){document.getElementById("pbnMillionMilerMilesBody").style.display="none";document.getElementById("tblpbnMillionMilerMilesBody").style.display="none";document.getElementById("tblpbnSummaryBody").style.display="block";document.getElementById("A_miles_printLink").style.display="inline";document.getElementById("M_miles_printLink").style.display="none";}function setVisibilityMillionMiler(){document.getElementById("tblpbnSummaryBody").style.display="none";document.getElementById("pbnMillionMilerMilesBody").style.display="block";document.getElementById("tblpbnMillionMilerMilesBody").style.display="block";document.getElementById("A_miles_printLink").style.display="none";document.getElementById("M_miles_printLink").style.display="inline";}
