function PopupCalendar(a){if(a.style.overflow=="hidden"){a.style.overflow="visible"}else{a.style.overflow="hidden"}}function ShowCreditCardInfo(){var a="visible";var d="hidden";var f=document.getElementById("ctlPayerInfo_lblCreditCardInformation");var b=document.getElementById("ctlPayerInfo_rbCreditCard");var e=document.getElementById("ctlPayerInfo_divCreditCardInfo");var g=document.getElementById("ctlPayerInfo_divWesternUnion");if(b.checked){a="visible";d="hidden";e.style.display="block";g.style.display="none"}else{d="visible";a="hidden";e.style.display="none";g.style.display="block"}f.style.visibility=a;e.style.overflow=a;g.style.overflow=d}function DateCheck(){var j=true;var i=document.getElementById("ctlAvailCriteria_cboDepDay");var f=document.getElementById("ctlAvailCriteria_cboDepMon");var b=document.getElementById("ctlAvailCriteria_cboRetDay");var h=document.getElementById("ctlAvailCriteria_cboRetMon");var d=now.getYear();var e=now.getYear();if(f.Month<now.getMonth()){d+=1}if(h.Month<now.getMonth()){e+=1}var g=i+"/"+f+"/"+d;var a=b+"/"+h+"/"+e;if(Date.parse(g)){alert("No dice.");j=false}if(Date.parse(a)){alert("No dice.");j=false}return j}function AdultInfantCheck(){if(document.getElementById("ctlAvailCriteria_cboInfants")){var b=true;var d=document.getElementById("ctlAvailCriteria_cboInfants");var a=document.getElementById("ctlAvailCriteria_cboAdults");if(parseInt(a.value)<parseInt(d.value)){alert("There must be at least one adult passenger for every infant.");b=false}return b}}function k(e,a){var b=(a.which)?a.which:a.keyCode;var d=String.fromCharCode(b);var f=new Array(/[a-zA-Z\s\t\b]/,/[0-9\n\r\t\b\d]/,/[\-\/a-zA-Z0-9\n\r\t\s\b]/,/[0123456789A-Za-z\.\!\+\-\_\@\b\t\r\n\d]/,/[0-9\n\r\t\b\d.]/);e=(e<0||e>=f.length)?0:e;if(!f[e].test(d)){return false}else{d=d.toUpperCase();if(Browser.Engine.trident){a.keyCode=d.charCodeAt()}return true}}function c(a){$(a).value=$(a).value.toUpperCase()}function PasswordCharsCheck(d,a){var f=a.keyCode?a.keyCode:a.which;var b=String.fromCharCode(f);var e=new Array(/[0123456789A-Za-z\.\!\+\-\_\@]/);d=(d<0||d>=e.length)?0:d;if(!e[d].test(b)){return false}else{event.keyCode=b.charCodeAt();return true}}function unCheckINSUTermsAndConditions(b){var a=document.getElementById("ctlInsurance_chkInsuranceTermsAndConditions");if(a!=null){document.getElementById("ctlInsurance_chkInsuranceTermsAndConditions").checked=false}}function unCheckInsuranceTermsAndConditions(){document.getElementById("ctlInsurance_chkInsuranceTermsAndConditions").checked=false}function ShowHideElement(a,d){var b;if(document.getElementById){b=document.getElementById(a)}else{if(document.all){b=document.all[a]}}if(d==true){b.style.display="block";b.style.visibility="visible"}if(d==false){b.style.visibility="hidden";b.style.display="none"}}function changeClass(a,b){var d;if(document.getElementById){var d=document.getElementById(a)}else{if(document.all){var d=document.all[a]}}d.className=b}function ShowModalPopup(e,b,a,d){if(typeof window.showModalDialog!="undefined"){window.showModalDialog(e,b,"dialogWidth:"+a+";dialogHeight:"+d+";menubar:no;scrollbars:no;resizable:no;status:no;")}else{window.open(e,b,"Width="+a+", Height="+d+", menubar=no, scrollbars=no, resizable=no, status=no, modal=yes")}}function checkCapsLock(d){var b=0;var a=false;var f='<%= ControlResourceManager.GetString("profileEdit-CapsLockOn")%>';if(document.all){b=d.keyCode;a=d.shiftKey}else{if(document.layers){b=d.which;a=(b==16)?true:false}else{if(document.getElementById){b=d.which;a=(b==16)?true:false}}}if((b>=65&&b<=90)&&!a){alert(f)}else{if((b>=97&&b<=122)&&a){alert(f)}}}function SecureLink(b){var a=window.location.href;a=a.substring(0,a.lastIndexOf("/")+1);a=a+b;window.location.href=a}function SecurePages(){var b=["Main.aspx","login.aspx","TAChangePassword.aspx","Checkout.aspx","AgencyCreate.aspx","ModifyAgency.aspx","NewAgent.aspx","Register.aspx","ProfileLogin.aspx","ProfileChangePassword.aspx","ProfileModify.aspx","ProfileResDetails.aspx"];var d=window.location.href;for(var a=0;a<b.length;a++){if(d.search(b[a])!=-1){if(window.location.protocol!="https:"){window.location.protocol="https:"}break}}}function getPage(){var a=new String();a=window.location.href;strPage=a.substring(a.lastIndexOf("/")+1,a.lastIndexOf("?"));return strPage}var cX=0;var cY=0;var rX=0;var rY=0;function UpdateCursorPosition(a){cX=a.pageX;cY=a.pageY}function UpdateCursorPositionDocAll(a){cX=event.clientX;cY=event.clientY}if(document.all){document.onmousemove=UpdateCursorPositionDocAll}else{document.onmousemove=UpdateCursorPosition}function AssignPosition(a){if(self.pageYOffset){rX=self.pageXOffset;rY=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){rX=document.documentElement.scrollLeft;rY=document.documentElement.scrollTop}else{if(document.body){rX=document.body.scrollLeft;rY=document.body.scrollTop}}}if(document.all){cX+=rX;cY+=rY}a.style.left=(cX-100)+"px";a.style.top=(cY-100)+"px"}function moveSelectOption(e,i,a){var d=$(e);var g=false;var b=d.getElementsByTagName("option");$$(b).each(function(j){if(j.value==i){g=true;d.insertBefore(j,b[a])}});if(!g){var h=new Option(i,"");if(a==0){a=null}try{$(d).add(h,a)}catch(f){}}}function removeSelectOption(a,b){$$("option[value="+b+"]").each(function(d){d.dispose()})}Function.prototype.startsWith=function(){return false};Date.prototype.addHours=function(a){this.setHours(this.getHours()+a);return this};
