Namespace.Manager.Register("AAI11L.ui");AAI11L.ui.loginDialog=function(){var a=new Date().getTime(),l="loginDialog"+a,o=jQuery("#LDTitle").html()||"Agency Login",b=jQuery("#LDinfoText").html()||"To access the agency pages please enter your IATA number below or request an access number from AA",h=jQuery("#LDinputText").html()||"IATA number:",j=jQuery("#LDinputBtn").html()||"Enter",c=jQuery("#LDRequestText").html()||"If you need access but have no IATA number please contact us at:",m=jQuery("#LDEmail").html()||"Z1012345.Agency.reference@aa.com",f=jQuery("#LDDisplayEmail").html()||"agency-request@aa.com",k=escape(jQuery("#LDEmailSubject").html()||"Agency Login Request"),i=jQuery("#LDCancelBtn").html()||"Cancel",n=jQuery("#LDInputError").html()||"Invalid number",e=jQuery("#LDLink").html()||"#",d=/^\d+$/,g=jQuery(' <div id="'+l+'" class="confirmDialog ui-helper-hidden ui-helper-hidden-accessible" style="font-size: 14px;"><div class="cDline"><div class="cDline2" id="loginDialogInfoText"><p>'+b+'</p></div></div><div class="cDline"><div class="cDline2"><div class="btnDialogRow" style="clear:both;margin-top:0;text-align:left;"><p>'+h+'<input type="text" id="'+l+'Input" style="margni-left: 5px;"><a class="btnDialogMain" id="'+l+'Btn"><span>'+j+'</span></a><span style="display:none; color: red; margni-left: 10px;" id="'+l+'Err">'+n+'</span></p></div></div></div><div class="cDline"><div class="cDline2"><p>'+c+' <a href="mailto:'+m+"?subject="+k+'">'+f+'</a></p></div></div><div class="cDline"><div class="cDline2"><div class="btnDialogRow" style="clear:both;margin-top:0;text-align:left;"><a class="btnDialogSecondary" id="'+l+'Cancel" ><span>'+i+"</span></a></div></div></div></div>");jQuery("body").append(g);if(!g.data("dialog")){g.dialog({autoOpen:false,modal:true,draggable:false,resizable:false,title:o,dialogClass:"aaComDialog i11lloginDialog i11lconfirmDialog",height:"auto",width:880,open:function(p,q){jQuery(this).removeClass("ui-helper-hidden ui-helper-hidden-accessible")}});if(jQuery.browser.msie){centeredX=(document.width-880)/2;g.dialog("option","position",[centeredX,50])}else{g.dialog("option","position","center");g.dialog("open");g.dialog("close")}jQuery("#loginDialog").remove()}jQuery("input.loginDialog, a.loginDialog").click(function(q){var p=jQuery.cookie("loginIATACookie");if(d.test(p)){jQuery.get("/content/images/common/wa2.gif?Log=1&v_agencyIata="+p,function(){document.location=e});return}g.dialog("open");if(jQuery.browser.msie){window.scroll(0,0)}return false});jQuery("#"+l+"Cancel").click(function(){g.dialog("close");return false});jQuery("#"+l+"Btn").click(function(){jQuery("#"+l+"Err").hide();var p=jQuery("#"+l+"Input").val().trim();if(p.length==0){return false}if(d.test(p)){jQuery.cookie("loginIATACookie",p,{expires:365});g.dialog("close");jQuery.get("/content/images/common/wa2.gif?Log=1&v_agencyIata="+p,function(){document.location=e})}else{jQuery("#"+l+"Err").show();return false}});jQuery("#"+l+"Input").keypress(function(p){if(p.keyCode==13){jQuery("#"+l+"Btn").click()}})};jQuery(document).ready(function(){AAI11L.ui.CSSpath="/intl/ie/apps/jQuery/css/";AAI11L.ui.loadCSS("confirmdialog.css");AAI11L.ui.ukmatch=0;jQuery("link").each(function(){if((this.href.indexOf("aa-reset")>-1)||(this.href.indexOf("aa-global")>-1)||(this.href.indexOf("aa-jquery")>-1)){AAI11L.ui.ukmatch++}});if(AAI11L.ui.ukmatch==0){AAI11L.ui.loadIECSS()}else{if((jQuery.browser.msie)&&(parseInt(jQuery.browser.version)<8)){AAI11L.ui.loadIECSS()}}AAI11L.ui.loginDialog()});
