$(document).ready(function(){$("#loginLink").replaceWith(GetHeaderLogin());$("#hsnContainer").show();$("#centerModule > ul").tabs();$("#rightModule > ul").tabs();var C=rightModuleLoginInfo();$("#right_tab1_internal_container").append(C);initialize();if(center_tab_selected!=""){$("#centerModule > ul").tabs("select",center_tab_selected)}if(right_tab_selected!=""){$("#rightModule > ul").tabs("select",right_tab_selected)}$("#center-tab1").click(function(){historyStorage.put("center_tab_selected","1")});$("#center-tab2").click(function(){historyStorage.put("center_tab_selected","2")});$("#center-tab3").click(function(){historyStorage.put("center_tab_selected","3")});$("#right-tab1").click(function(){historyStorage.put("right_tab_selected","1")});$("#right-tab2").click(function(){historyStorage.put("right_tab_selected","2")});var B=$("form[name='MyReservationType']").get(0);if(B!=null){B.reset()}document.MyReservationType.reset();var D=get_cookie("WorldPerks");if(D!=""){var A=D.split("&");document.getElementById("WP").style.display="inline";document.getElementById("checkInTypeWP").selected=true;document.forms.form0.checkInLastName.value=A[1];document.forms.form0.WP.value=A[0];setCheckInType();document.getElementById("viewResTypeWP").selected=true;setMyReservationsType();omtr.tc.extra_info="mileage_balance="+A[6]+""}$.getScript("/includes/js/s_code.js",function(){s.pageName="HomePage";s.server="";s.channel="";s.pageType="";var E=s.t();if(E){$("html > body").append(E)}});$("#searchForVacationPackagesButton").bind("click",function(){WV_HP_Submit()})});var center_tab_selected="";var right_tab_selected="";window.dhtmlHistory.create({toJSON:function(A){return JSON.stringify(A)},fromJSON:function(A){return JSON.parse(A)}});function initialize(){dhtmlHistory.initialize();if(historyStorage.hasKey("center_tab_selected")==true){if(historyStorage.hasKey("center_tab_selected")==true){center_tab_selected=historyStorage.get("center_tab_selected")}}if(historyStorage.hasKey("right_tab_selected")==true){if(historyStorage.hasKey("right_tab_selected")==true){right_tab_selected=historyStorage.get("right_tab_selected")}}}var nwacook=get_cookie("nwa");if(nwacook!=""){remove_cookie("nwa")}var escook=get_cookie("nwa_es");if(escook!=""){window.location.href="http://www.nwa.com/us/espanol/"}var frcook=get_cookie("nwa_fr");if(frcook!=""){window.location.href="http://www.nwa.com/us/fr/"}function rightModuleLoginInfo(){var G=get_cookie("WorldPerks");if(G!=""){var C=G.split("&");var A=C[4];var J=C[6];var I=C[0];var D;var F;var B;if(J=="0"&&I.length!=10){D="";F="";B=" "}else{D="Available Miles:";B=Comma(J);F='&gt; <a href="https://www.nwa.com/cgi-bin/wp_acctsum.pro" class="GrayBodyText11Bold">Refresh Mileage</a>'}if(A.toLowerCase()=="base"){A=" "}else{A+=" Medallion"}var E='<br/><div class="BodyCopy12Bold">'+C[2]+" "+C[1]+'</div><div class="GrayBodyText11">SkyMiles '+A+' Member</div><br /><div class="GrayBodyText11" id="infoSplitDiv" style="padding-right: 20px;"><div style="float: left;">'+D+'<br /></div><div style="float: right;">'+B+'</div><div style="clear:both; height:0;"></div><br /><div class="GrayBodyText11Bold" style="float: left;">'+F+'</div><div style="float: right;"><input type="button" class="redButton120" value="  View My NWA Info  " onclick="location.href=\'https://www.nwa.com/cgi-bin/mynwainfo.pro\'" /></div><div style="clear:both; height:0;"></div><br /><div class="BlueBodyText">&gt; <a href="https://www.nwa.com/cgi-bin/wp_acctsum.pro" class="BlueBodyText11">Account Summary</a><br />&gt; <a href="https://www.nwa.com/skymiles/direct" class="BlueBodyText11">Manage My SkyMiles Account</a><br />&gt; <a href="https://www.nwa.com/cgi-bin/res_info.pro" class="BlueBodyText11">View/Change Reservations &amp; Seats</a><br />&gt; <a href="https://www.nwa.com/cgi-bin/res_info.pro" class="BlueBodyText11">Reconfirm Reservations</a><br />&gt; <a href="https://www.nwa.com/prefs/FlightUpdates" class="BlueBodyText11">My Travel Alert Preferences</a><br />&gt; <a href="https://www.nwa.com/prefs/NWAEmail" class="BlueBodyText11">NWA E-mail Subscribe/Modify</a><br />&gt; <a href="http://www.nwa.com/travel/viewecv/" class="BlueBodyText11">My Electronic Credit Vouchers</a></div></div>';return E;var H='<div class="BlueBodyTextBold" style="float: left; padding-left: 12px; padding-top: 7px;"><a href = "javascript:logout_skymiles_home();" class="DarkBlueTextLink11">Logout</a> &gt;</div>'}else{var E='<div class="BlueBodyTextBold">Login</div><br /><form method="post" action="https://www.nwa.com/cgi-bin/mynwainfo.pro" name="smlogin_login" id="smlogin_login"><div class ="BlueBodyTextBold">SkyMiles Number &nbsp;&nbsp;<a href="https://www.nwa.com/skymiles/findwp/" class="SmallLink">Reminder</a></div><input type="text" size=25 maxsize=15 maxlength=12 name="account" VALUE=""><div class ="BlueBodyTextBold">Last Name</div><input type=TEXT size=25 maxsize=25 maxlength=40 name="name" VALUE=""><div class ="BlueBodyTextBold">PIN &nbsp;&nbsp;<a href="https://www.nwa.com/skymiles/pin/reminder/index.shtml" class="SmallLink" target="_new">Reminder</a></div><input type=password size=10 maxsize=4 maxlength=4 name="pin"><br /><div style="padding-top: 12px !important; padding-top: 5px;"><input type="submit" value="  Login  " class="redButton50" /></div></form><div style="height: 10px !important; height: 0px;"></div><div class="BlueBodyTextBold" style="float: left; padding-top: 15px !important">> <a href = "https://www.delta.com/skymilesenrollment/skymiles/enrollment/index.jsp" target ="new" class="DarkBlueTextLink11">Join SkyMiles</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  > <a href = "https://www.nwa.com/prefs/Events/Express" class ="DarkBlueTextLink11">Enroll in NWA E-mail</a></div>';return E;var H='<div class="BlueBodyTextBold" style="float: left; padding-left: 12px; padding-top: 7px;">> <a href = "/cgi-bin/wp_enroll.pro?Country=US" class="DarkBlueTextLink11">Join SkyMiles</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  > <a href = "/prefs/Events/Express" class ="DarkBlueTextLink11">Enroll in NWA E-mail</a></div>'}}function rightModuleFooterData(){var D=get_cookie("WorldPerks");if(D!=""){var A=D.split("&");var C=A[4];if(C.toLowerCase()=="base"){C=""}var B='<div class="BlueBodyTextBold" style="float: left; padding-left: 12px; padding-top: 7px;"><a href = "javascript:logout_skymiles_home();" class="DarkBlueTextLink11">Logout</a> &gt;</div>';return B}else{var B='<div class="BlueBodyTextBold" style="float: left; padding-left: 12px; padding-top: 7px;">> <a href = "/cgi-bin/wp_enroll.pro?Country=US" class="DarkBlueTextLink11">Join SkyMiles</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  > <a href = "/prefs/Events/Express" class ="DarkBlueTextLink11">Enroll in NWA E-mail</a></div>';return B}}function setMyReservationsType(){var E=get_cookie("WorldPerks");if(E!=""){var A=E.split("&");document.forms.MyReservationType.WpNum.value=A[0];document.forms.MyReservationType.MemberName.value=A[1]}var D=document.forms.MyReservationType.viewResType.selectedIndex;var C=["RL","WP","ET"];var B=C[D];if(D==0){document.getElementById("pnrWrapper").style.display="inline";document.getElementById("wpWrapper").style.display="none";document.getElementById("eTktWrapper").style.display="none";document.getElementById("lastNameWrapper").style.display="inline";document.getElementById("passengerLastNameWrapper").style.display="none";document.getElementById("memberNameWrapper").style.display="none";document.getElementById("pinWrapper").style.display="none";document.getElementById("loginSubmitButton").style.display="none";document.getElementById("viewResSubmitButton").style.display="inline"}else{if(D==1){document.getElementById("pnrWrapper").style.display="none";document.getElementById("wpWrapper").style.display="inline";document.getElementById("eTktWrapper").style.display="none";document.getElementById("passengerLastNameWrapper").style.display="inline";document.getElementById("lastNameWrapper").style.display="none";document.getElementById("memberNameWrapper").style.display="inline";document.getElementById("pinWrapper").style.display="inline";document.getElementById("loginSubmitButton").style.display="inline";document.getElementById("viewResSubmitButton").style.display="none"}else{if(D==2){document.getElementById("pnrWrapper").style.display="none";document.getElementById("wpWrapper").style.display="none";document.getElementById("eTktWrapper").style.display="inline";document.getElementById("lastNameWrapper").style.display="inline";document.getElementById("passengerLastNameWrapper").style.display="none";document.getElementById("memberNameWrapper").style.display="none";document.getElementById("pinWrapper").style.display="none";document.getElementById("loginSubmitButton").style.display="none";document.getElementById("viewResSubmitButton").style.display="inline"}}}}var cityValues=[["CUN","CANCUN","Cancun"],["LAS","LAS VEGAS","Las Vegas"],["MBJ","MONTEGO BAY","Montego Bay"],["HNL","HONOLULU","Honolulu"],["OGG","MAUI","Maui"],["MCO","ORLANDO","Orlando"],["PVR","PUERTO VALLARTA","Puerto Vallarta"],["LIH","KAUAI","Kauai"],["KOA","KONA","Kona"],["RSW","FT. MYERS","Ft. Myers"],["TPA","TAMPA","Tampa"],["NAS","NASSAU","Nassau"],["SJD","CABO SAN LUCAS","Cabo San Lucas","LOS CABOS"],["CZM","COZUMEL","Cozumel"],["ZIH","ZIHUATANEJO","Ixtapa/Zihuatanejo"],["SFO","SAN FRANCISCO","San Francisco"],["PHX","PHOENIX","Phoenix"],["TUS","TUCSON","Tucson"],["GCM","GRAND CAYMAN","Grand Cayman"],["PUJ","PUNTA CANA","Punta Cana"],["MZT","MAZATLAN","Mazatlan"],["ZLO","MANZANILLO","Manzanillo"],["LIR","LIBERIA","Liberia"],["ACA","ACAPULCO","Acapulco"],["SJU","SAN JUAN","San Juan"],["STT","ST. THOMAS","St. Thomas"]];var selectedCityCode;function mltCitySearch(A){var C=document.getElementById(A).value;C=C.toUpperCase();if(C.length>="3"){for(var B=0;B<cityValues.length;B++){if(C==cityValues[B][0]||C==cityValues[B][1]||C==cityValues[B][3]){document.getElementById("searchForVacationPackagesButton").style.display="inline";selectedCityCode=cityValues[B][0];break}else{document.getElementById("searchForVacationPackagesButton").style.display="none"}}}else{document.getElementById("searchForVacationPackagesButton").style.display="none"}}function WV_HP_Submit(){for(i=0;i<document.orbot.searchBy.length;i++){if(document.orbot.searchBy[i].checked==true){val=document.orbot.searchBy[i].value}}document.getElementById("wvFrom").value=document.getElementById("departField0").value;document.getElementById("wvTo").value=selectedCityCode;document.getElementById("wvDepartDate").value=document.getElementById("departureDate").value;document.getElementById("wvReturnDate").value=document.getElementById("returnDate").value;document.getElementById("wvSearchBy").value=val;document.getElementById("wvAdults").value=document.getElementById("adults").value;if(document.getElementById("rtOption").checked){document.getElementById("wvTripType").value="roundtrip"}else{if(document.getElementById("owOption").checked){document.getElementById("wvTripType").value="oneway"}}document.WVForm.submit()};