if(typeof(SB)=="undefined"||SB==null){var SB=new Object();SB.customer=new Object();}else{if(typeof(SB.customer)=="undefined"||SB.customer==null){SB.customer=new Object();}}SB.customer.registration=new Object();var bubble_info_unavailable="A címet nem találjuk, kérjük, próbálja újra.";var bubble_info_select="Please confirm your address by selecting an address and clicking on Use this address";var bubble_info_UsernameExists="Sorry. The username you have chosen is already taken, please pick another.";var bubble_info_UsernameRequired="Felhasználóneve 6-12 karakterből álljon, számokból és betűkből,valamint használható az alsóvonás karakter. A felhasználónév érzékeny a kis és nagy betűkre.";var bubble_info_UsernameInfo="Felhasználóneve 6-12 karakterből álljon, számokból és betűkből,valamint használható az alsóvonás karakter. A felhasználónév érzékeny a kis és nagy betűkre.";var userNameInValid="invalid";SB.customer.registration.setKeyword=function(){if(document.getElementById("registration_modCustRegKeyword")!=null){var b=document.getElementById("registration_modCustRegKeyword").value;if(b!=null&&b!=""){var a=new SB.customer.registration.KeywordHandler(b);var c=new AjaxService(a);c.GetRequest("/misc/webServices/registration/TrackingService.aspx?action=keyword&item="+encodeURIComponent(b));c=null;a=null;}else{SB.customer.registration.ShowHowHear();}}};SB.customer.registration.KeywordHandler=function(a){this.avoidCaching=true;this.traceLevel=3;this.process=function(b){if(b.xmlHttp.responseXML!=null&&b.xmlHttp.responseXML.documentElement!=null){if(b.xmlHttp.responseXML.documentElement.childNodes.length>0){SB.base.HideRow(registration.trHowHearMain);SB.base.HideRow(registration.trHowHearSub);return;}else{SB.customer.registration.ShowHowHear();}}else{SB.customer.registration.ShowHowHear();}};};SB.customer.registration.ShowHowHear=function(){var a=document.getElementById(registration.trHowHearMain);if(a!=null){if(a.style.display=="none"&&document.getElementById("registration_modCustRegDdlTrackingMain")!=null){SB.base.ShowRow(registration.trHowHearMain);}}};SB.customer.registration.setTrackingSelectSub=function(){var d=document.getElementById("registration_modCustRegDdlTrackingMain").value;var b=document.getElementById("registration_modCustRegDdlTrackingSub");if(d==null||b==null){return;}var c=false;for(var f=0;f<registration.trackingMenuArray.length;f++){if(registration.trackingMenuArray[f]==d){SB.base.RemoveAllOptions(b);childArray=registration.trackingMenuSubArray[f];for(var a=0;a<childArray.length;a++){var e=childArray[a];if(e=="RADIO MARCA"){today=new Date();if(today.getDay()>15){e="R MARCA NACIONAL";}}SB.base.AddOption(b,e,childArray[a]);c=true;}}}if(c==true){if(document.getElementById("ddlTrackingLabel")!=null){document.getElementById("ddlTrackingLabel").innerHTML=d;}SB.base.ShowRow(registration.trHowHearSub);}else{SB.base.RemoveAllOptions(b);SB.base.HideRow(registration.trHowHearSub);}};SB.customer.registration.InitialiseTrackingSubMenu=function(){if(document.getElementById("registration_modCustRegDdlTrackingSub")!=null&&document.getElementById("registration_modCustRegDdlTrackingSub").options.length>0){SB.base.ShowRow(registration.trHowHearSub);}};SB.customer.registration.setCountry=function(b){if(SB.customer.registration.handleExcludedCountry(b)){return;}Global_processingMessage="Az űrlap töltődik";var c=document.getElementById("registration_modCustRegDdlCountry").value;var a=new SB.customer.registration.CountryHandler(c);var d=new AjaxService(a);d.GetRequest("/misc/webServices/registration/CountryService.aspx?item="+c,null);d=null;a=null;};SB.customer.registration.handleExcludedCountry=function(b){var a=SB.customer.registration.getExclusionInformationFor(b[b.selectedIndex].value.toUpperCase());if(a){b.selectedIndex=0;SB.customer.registration.setCountry(b);SB.customer.registration.setGlobalProcessingMessage();SB.base.OpenDiv(a.warningPopupUrl,"popBadSelect2","popVeil2","popLayer2");return true;}return false;};SB.customer.registration.getExclusionInformationFor=function(a){return SB.customer.registration.excludedCountryCodes[a];};SB.customer.registration.CountryHandler=function(b){this.avoidCaching=true;this.traceLevel=3;var d=document.getElementById("registration_modCustRegBtnCountry");var a=document.getElementById("registration_txtLastCountry");this.process=function(g){if(g.xmlHttp.responseXML!=null){var c=g.xmlHttp.responseXML.documentElement;}if(c!=null){var f=c.getElementsByTagName("addressLookup")[0];if(typeof(f)!="undefined"&&f!=null){var e=c.getElementsByTagName("addressLookup")[0].childNodes[0].nodeValue;}if(c.childNodes.length>0||e=="true"){a.value="true";d.click();}else{if(a.value=="true"){a.value="false";d.click();}else{if(document.getElementById("registration_modCustRegAddress")!=null){document.getElementById("registration_modCustRegAddress").focus();}}}SB.customer.registration.PersonalIndentityNumberDisplay();}};};SB.customer.registration.displayAddressLookupFields=function(){if(document.getElementById("registration_modCustRegDdlCountry").value=="GB"&&document.getElementById("registration_modCustRegAddress").value==""){SB.customer.registration.showAddressLookup();}};SB.customer.registration.ValidateDoorNumber=function(a){if(/^[\w\s\-]*$/i.test(a)){return true;}else{return false;}};SB.customer.registration.ValidatePostcode=function(a){if(/^[a-z\s\d]*$/i.test(a)){return true;}else{return false;}};SB.customer.registration.getAddressLookupList=function(b){var d=document.getElementById("registration_modCustRegDoorNumber").value;var c=document.getElementById("registration_modCustRegPostcode").value;var f=document.getElementById("registration_ico_doorNumber");var e=document.getElementById("registration_ttt_doorNumber");Global_processingMessage="Kérjük, várjon, amíg megkeressük a címet.";Global_processingTitle="Cím keresése";SB.base.holdingDiv("show");if(SB.customer.registration.ValidateDoorNumber(d)&&SB.customer.registration.ValidatePostcode(c)){var a=new SB.customer.registration.AddressLookupCallback(b);var g=new AjaxService(a);g.GetRequest("/misc/webServices/registration/AddressLookUpService.aspx?doorNumber="+d+"&postcode="+c);g=null;a=null;}else{SB.base.holdingDiv("hide");SB.base.initializeTooltip(f,e,bubble_info_unavailable);}};SB.customer.registration.AddressLookupCallback=function(b){this.avoidCaching=true;this.traceLevel=3;var d=false;var c=new Array();var a=0;this.process=function(l){var o=l.xmlHttp.responseXML;if(o!=null&&o.documentElement!=null){if(o.documentElement.childNodes.length>0){d=true;for(var k=0;k<o.documentElement.childNodes.length;k++){var e=o.documentElement.childNodes[k];if(e.hasChildNodes()&&e.firstChild.nodeType==3){c[a]=e.firstChild.nodeValue;a++;}}if(c.length==1){SB.customer.registration.setAddressInFields(c[0]);if(b){SB.customer.registration.dopostback();}}else{SB.customer.registration.showAddressLookUpResults();var p=new RegExp(", ,","g");for(var m=0;m<c.length;m++){var h=c[m].replace(p,",");SB.base.AddOption(document.getElementById("AddressLookUpListbox"),h,c[m]);}}}}if(d==false){var f=document.getElementById("registration_ico_doorNumber");var g=document.getElementById("registration_ttt_doorNumber");SB.base.holdingDiv("hide");SB.base.initializeTooltip(f,g,bubble_info_unavailable);SB.customer.registration.AddressLookupFailed();}SB.base.holdingDiv("hide");};};SB.customer.registration.AddressLookupFailed=function(){SB.base.ToggleElement("errorCouldNotFindAddress","display","block");SB.base.ShowRow("trEnterManuallyButton");};SB.customer.registration.setAddressInFields=function(b){var a=b.split(",");document.getElementById("registration_modCustRegAddress").value=SB.base.TrimString(a[0]);document.getElementById("registration_modCustRegAddressTwo").value=SB.base.TrimString(a[1]);document.getElementById("registration_ico_address").className="icons";document.getElementById("registration_modCustRegCity").value=SB.base.TrimString(a[2]);document.getElementById("registration_ico_city").className="icons";document.getElementById("registration_modCustRegCounty").value=SB.base.TrimString(a[3]);document.getElementById("registration_ico_county").className="icons";document.getElementById("registration_modCustRegPostcode").value=SB.base.TrimString(a[4]);document.getElementById("registration_ico_postCode").className="icons";SB.customer.registration.hideAddressLookUp();SB.customer.registration.showFullAddress();};SB.customer.registration.selectAddress=function(){var d=document.getElementById("registration_ico_AddressLookUpListbox");var a=document.getElementById("registration_ttt_AddressLookUpListbox");var c=document.getElementById("AddressLookUpListbox");if(c!=null){if(c.selectedIndex==-1){SB.base.initializeTooltip(d,a,bubble_info_select);}else{var b=c.options[c.selectedIndex].value;SB.customer.registration.setAddressInFields(b);}}};SB.customer.registration.showAddressLookup=function(){SB.base.HideRow("trAddressOne");SB.base.HideRow("HideAddress2");SB.base.HideRow("HideCity");SB.base.HideRow("trCounty");SB.base.ShowRow("trAddressLookup");SB.base.ToggleElement("AddressLookUpLink","display","block");};SB.customer.registration.hideAddressLookUp=function(){SB.base.HideRow("trEnterManuallyButton");SB.base.HideRow("trAddressLookup");SB.base.HideRow("trAddressLookupList");SB.base.HideRow("trAddressLookupButtons");SB.base.ToggleElement("AddressLookUpLink","display","none");};SB.customer.registration.showAddressLookUpResults=function(){SB.base.HideRow("trAddressLookup");SB.base.HideRow("trPostcode");SB.base.HideRow("AddressLookUpLink");SB.base.ShowRow("trAddressLookupList");SB.base.HideRow("AddressLookUpLink");SB.base.ShowRow("trAddressLookupButtons");SB.base.ShowRow("trEnterManuallyButton");};SB.customer.registration.showFullAddress=function(){SB.customer.registration.hideAddressLookUp();SB.customer.registration.populateFirstAddressLine();SB.base.ShowRow("trAddressOne");SB.base.ShowRow("HideAddress2");SB.base.ShowRow("HideCity");SB.base.ShowRow("trCounty");SB.base.ShowRow("trPostcode");SB.base.HideRow("trEnterManuallyButton");};SB.customer.registration.populateFirstAddressLine=function(){var b=document.getElementById("registration_modCustRegDoorNumber");var a=document.getElementById("registration_modCustRegAddress");if(b!=null&&a.value==""){document.getElementById("registration_modCustRegAddress").value=b.value;}};SB.customer.registration.doPostbackWrapper=function(a){if(a.attributes["class"].value=="disableClick"){return;}SB.customer.registration.dopostback();};SB.customer.registration.dopostback=function(){var b=document.getElementById("registration_modCustRegAddress").value;var e=document.getElementById("registration_modCustRegPostcode").value;var d=document.getElementById("registration_ico_AddressLookUpListbox");var a=document.getElementById("registration_ttt_AddressLookUpListbox");if(document.getElementById("trAddressLookupList").style.display!="none"){var c=document.getElementById("AddressLookUpListbox");if(c.selectedIndex>-1){SB.customer.registration.setAddressInFields(c.options[c.selectedIndex].value);}else{if(c.options.length>0&&document.getElementById("trAddressOne").style.display=="none"){if(d!=null&&a!=null){SB.base.initializeTooltip(d,a,bubble_info_select);}return;}}}else{if(e!=""&&(document.getElementById("AddressLookUpLink").style.display=="block")&&b==""){SB.customer.registration.getAddressLookupList(true);if(d!=null&&a!=null){SB.base.initializeTooltip(d,a,bubble_info_select);}return;}else{if(e!=""&&(document.getElementById("AddressLookUpLink").style.display=="none")&&b==""){SB.customer.registration.getAddressLookupList(false);SB.customer.registration.showAddressLookup();if(d!=null&&a!=null){SB.base.initializeTooltip(d,a,bubble_info_select);}return;}}}__doPostBack("registration$modCustRegisterButton","");};SB.customer.registration.getUsernameCheck=function(d){try{var g=d.value;var b=document.getElementById("registration_ico_username");var f=document.getElementById("registration_ttt_username");if(g!=null&&g!=""){var k=new SB.customer.registration.UsernameCheckHandler(d);var h=new AjaxService(k);var c=encodeURIComponent(g);h.GetRequest("/misc/webServices/registration/UsernameCheckService.aspx?username="+escape(c),null);h=null;k=null;}else{var e="Felhasználóneve 6-12 karakterből álljon, számokból és betűkből,valamint használható az alsóvonás karakter. A felhasználónév érzékeny a kis és nagy betűkre.";b.className="icons icoError";f.className="toolTipText tttError";SB.base.removeExistingTooltipMessage(f);SB.base.createTooltipMessageTag(f,e);if(d.className.indexOf("usrNameTaken")==-1){d.className=(d.className+" usrNameTaken").replace(/^ /,"");}}}catch(a){}};SB.customer.registration.UsernameCheckHandler=function(a){this.avoidCaching=true;this.traceLevel=3;this.process=function(k){if(document.getElementById("registration_ico_username")!=null){var e=document.getElementById("registration_ico_username");}if(document.getElementById("registration_ttt_username")!=null){var d=document.getElementById("registration_ttt_username");}if(k.xmlHttp.responseXML!=null){var f=k.xmlHttp.responseXML.documentElement;}if(f!=null){var g=f.getElementsByTagName("available")[0];if(typeof(g)!="undefined"&&g!=null){var c=f.getElementsByTagName("available")[0].childNodes[0].nodeValue;}if(f.childNodes.length>0&&c=="false"){var b="Sorry. The username you have chosen is already taken, please pick another.";e.className="icons icoError";d.className="toolTipText tttError";SB.base.removeExistingTooltipMessage(d);SB.base.createTooltipMessageTag(d,b);if(a.className.indexOf("usrNameTaken")==-1){a.className=(a.className+" usrNameTaken").replace(/^ /,"");}}else{if(f.childNodes.length>0&&c==userNameInValid){e.className="icons icoError";d.className="toolTipText tttError";SB.base.removeExistingTooltipMessage(d);SB.base.createTooltipMessageTag(d,k.xmlHttp.responseXML.documentElement.getElementsByTagName("validationErrorMessage")[0].childNodes[0].nodeValue);if(a.className.indexOf("usrNameTaken")==-1){a.className=(a.className+" usrNameTaken").replace(/^ /,"");}}else{var h="Felhasználóneve 6-12 karakterből álljon, számokból és betűkből,valamint használható az alsóvonás karakter. A felhasználónév érzékeny a kis és nagy betűkre.";e.className="icons icoInfo";d.className="toolTipText tttInfo";SB.base.removeExistingTooltipMessage(d);SB.base.createTooltipMessageTag(d,h);a.className=a.className.replace(/usrNameTaken/,"").replace(/ $/,"");}}}};};SB.customer.registration.SetTextMessageOption=function(){var a=document.getElementById("registration_modCustRegCbxSmsContact");var c=document.getElementById("registration_modCustRegMobile");if(a!=null&&c!=null){var b=/\S/;if(b.test(c.value)){a.checked="true";}else{a.checked="";}}};SB.customer.registration.setGlobalProcessingMessage=function(){Global_processingMessage="Az űrlap töltődik";};SB.customer.registration.PersonalIndentityNumberDisplay=function(){var a=document.getElementById("registration_modCustRegDdlCountry");if(document.getElementById("site_code")!=null&&document.getElementById("site_code").value=="miapuesta-cl"&&a.options[a.selectedIndex].value=="CL"){document.getElementById("registration_divPersonalIdentity").style.display="block";return;}if(document.getElementById("registration_divPersonalIdentity")!=null){document.getElementById("registration_divPersonalIdentity").style.display="none";}};SB.customer.registration.FormatRUTNumber=function(){ttSlim.Hide("registration_ico_personalIdentity");if(document.getElementById("site_code")!=null&&document.getElementById("site_code").value=="miapuesta-cl"){var c=document.getElementById("registration_modCustRegPersonalIdentity").value;if(c==""){return;}var d=c;d=d.split(",").join("");d=d.split(".").join("");d=d.split("-").join("");var a=d.length;if(a==8){d="0"+d;a=a+1;}if(a<8){alert("El RUT es inválido por falta de caracteres.");}var b=a-7;c=d.substring(0,b)+"."+d.substring(b,b+3)+"."+d.substring(b+3,b+6)+"-"+d.substring(a-1);document.getElementById("registration_modCustRegPersonalIdentity").value=c;}};if(typeof(SB)=="undefined"||SB==null){var SB=new Object();}SB.accounts=new Object();SB.accounts.onWithdrawClick=function(){SB.accounts.loadWithdrawlMethod();};SB.accounts.loadWithdrawlMethod=function(){Global_processingMessage="<p>Az űrlap töltődik</p>";Global_processingTitle="Kérjük, várjon...";var b="";if(SB.accounts.getSelectedWithdrawPaymentMethod().indexOf("separator")==0){var a="/t/funding/WithdrawalPopUp.aspx";SB.base.RecallOpenDiv(a,"popBadSelect1","popVeil1","popLayer1");}else{if(SB.accounts.isUserWithdrawPaymentAccountSelected()){b="currentPPID="+SB.accounts.getCurrentWithdrawPPID()+"&userPaymentAccountID="+SB.accounts.getUserWithdrawPaymentAccountID();}else{b="currentPPID="+SB.accounts.getCurrentWithdrawPPID();}var a="/t/funding/WithdrawalPopUp.aspx?"+b;SB.base.RecallOpenDiv(a,"popBadSelect1","popVeil1","popLayer1");}};SB.accounts.loadManageCard=function(){var b="";if(SB.accounts.isUserWithdrawPaymentAccountSelected()){b="currentPPID="+SB.accounts.getCurrentWithdrawPPID()+"&userPaymentAccountID="+SB.accounts.getUserWithdrawPaymentAccountID();}else{b="currentPPID="+SB.accounts.getCurrentWithdrawPPID();}var a="/t/funding/ManageCardPopup.aspx?"+b;SB.base.RecallOpenDiv(a,"popBadSelect1","popVeil1","popLayer1");};SB.accounts.isUserWithdrawPaymentAccountSelected=function(){if(SB.accounts.getSelectedWithdrawPaymentMethod().indexOf("userPaymentAccounts")>=0){return true;}else{return false;}};SB.accounts.loadDepositCard=function(){var b="";if(SB.accounts.isUserWithdrawPaymentAccountSelected()){b="currentPPID="+SB.accounts.getCurrentWithdrawPPID()+"&userPaymentAccountID="+SB.accounts.getUserWithdrawPaymentAccountID();}else{b="currentPPID="+SB.accounts.getCurrentWithdrawPPID();}var a="/t/funding/depositPopup.aspx?"+b;SB.base.RecallOpenDiv(a,"popBadSelect1","popVeil1","popLayer1");};SB.accounts.closePage=function(a){if(a=="deposit"){SB.accounts.loadDepositCard();}else{SB.base.divPopUp(1,"hide");}};SB.accounts.getSelectedWithdrawPaymentMethod=function(){var b=document.getElementById("modFundingDepositddlPaymentMethod");var a=b.options[b.selectedIndex].value;return a;};SB.accounts.getCurrentWithdrawPPID=function(){var a=SB.accounts.getSelectedWithdrawPaymentMethod();var c=a.split(".");var b=c[1];return b;};SB.accounts.getUserWithdrawPaymentAccountID=function(){var a=SB.accounts.getSelectedWithdrawPaymentMethod();var b=a.split(".");var c=b[2];if(SB.accounts.isUserWithdrawPaymentAccountSelected()){c=b[2];}return c;};SB.accounts.onCreditCardWithdraw=function(){if(document.getElementById("cardAction").value=="withdraw"){__doPostBack("","");}else{alert(service.labels.selectValidCard);}};if(typeof(SB)=="undefined"||SB==null){var SB=new Object();SB.customer=new Object();}if(typeof(SB.customer)=="undefined"||SB.customer==null){SB.customer=new Object();}SB.customer.myAccounts=new Object();SB.customer.myAccounts.LoadContent=function(b,c){var a=new Object();a.timeout=10000;a.textonly=true;a.Content=c;a.errorHandler=SB.customer.myAccounts.ErrorHandler;HTTP.get(b,SB.customer.myAccounts.CallBackLoadContent,a);};SB.customer.myAccounts.CallBackLoadContent=function(returnOutput,Content){if(returnOutput!=null){document.getElementById(Content).innerHTML=returnOutput;var scripts=SB.base.extractScripts(returnOutput);for(var scriptCount=0;scriptCount<scripts.length;scriptCount++){try{eval(scripts[scriptCount]);}catch(e){}}}};SB.customer.myAccounts.ErrorHandler=function(a,c,b){if(b.Content){errorInnerHtml=document.getElementById("unhandledServerError").innerHTML;document.getElementById(b.Content).innerHTML=errorInnerHtml;}else{alert(a+": "+c);}};SB.customer.myAccounts.Funding=function(a){popupOptions["switch"]="btnFunding";popupOptions.div="dvFunding";popupOptions.session="funding";popupOptions.src="../../t/customer/fundingoptions.aspx";popupOptions.divBar="dvFundingBar";popupOptions.divLink="modLayoutMyaccountTabsFundingLink";popupOptions.aClass="awake bar";popupOptions.iClass="asleep bar";SB.customer.myAccounts.UpdatePage();};SB.customer.myAccounts.PersonalDetails=function(a){popupOptions.divBar="dvPersonalDetailsBar";popupOptions.divLink="modLayoutMyaccountTabPersonalDetailsLink";popupOptions.aClass="awake bar";popupOptions.iClass="asleep bar";popupOptions["switch"]="btnPD";popupOptions.div="dvPersonalDetails";popupOptions.session="details";popupOptions.src="../../t/customer/detailsAndPreference.aspx?Readonly=true";SB.customer.myAccounts.UpdatePage();};SB.customer.myAccounts.PersonalLimits=function(a){popupOptions.divBar="dvLimitsBar";popupOptions.divLink="dvLimitsLink";popupOptions.aClass="awake bar";popupOptions.iClass="asleep bar";popupOptions["switch"]="btnLim";popupOptions.div="dvLimits";popupOptions.session="limits";popupOptions.src="../../t/customer/PersonalLimits.aspx?Readonly=true";SB.customer.myAccounts.UpdatePage();};SB.customer.myAccounts.CngPassword=function(a){popupOptions["switch"]="btnSec";popupOptions.div="dvSecurity";popupOptions.session="security";popupOptions.src="../../t/customer/mySecurity.aspx";popupOptions.divBar="dvSecurityBar";popupOptions.divLink="modLayoutMyaccountTabSecurityLink";popupOptions.aClass="awake bar";popupOptions.iClass="asleep bar";SB.customer.myAccounts.UpdatePage();};SB.customer.myAccounts.EuroPromotions=function(a){popupOptions["switch"]="btnEPromos";popupOptions.div="dvEPromotions";popupOptions.session="promotions";popupOptions.src="../../t/customer/euroPromotions.aspx";popupOptions.divBar="dvEPromotionsBar";popupOptions.divLink="dvEPromotionsLink";popupOptions.aClass="awake bar";popupOptions.iClass="asleep bar";SB.customer.myAccounts.UpdatePage();};AgeVerification=function(){openIFrameInDivRefresh("dvAccHist","../../t/customer/verification.aspx","iFrmReg","Hide","Age Verification",oState,cState);};var isLoggedIn=true;SB.customer.myAccounts.visibilityServiceHandler=function(a){this.avoidCaching=true;this.traceLevel=3;this.process=function(b){if(b.xmlHttp.responseXML!=null&&b.xmlHttp.responseXML.documentElement!=null){if(b.xmlHttp.responseXML.documentElement.childNodes.length>0){if(b.xmlHttp.responseXML.documentElement.childNodes[0].nodeValue=="false"){isLoggedIn=false;SB.base.closeDivRefreshWindow();}}}};};SB.customer.myAccounts.UpdatePage=function(){var h=new SB.customer.myAccounts.visibilityServiceHandler();var g=new AjaxService(h);var a=popupOptions.div;var e=popupOptions.divBar;var d=popupOptions.divLink;var c=popupOptions["switch"];var f=popupOptions.src;var b=document.getElementById(c);var k=document.getElementById(d);if(b.value=="0"){if(isLoggedIn){SB.customer.myAccounts.LoadContent(f+"?"+new Date().getTime(),a);b.value="1";k.innerHTML=popupOptions.cState;document.getElementById(e).className=popupOptions.aClass;document.getElementById(a).style.display="block";}}else{g.GetRequest("/misc/webServices/userControl/setvisibilityservice.aspx?key="+popupOptions.session+"&value=false&"+new Date().getTime());b.value="0";k.innerHTML=popupOptions.oState;document.getElementById(a).style.display="none";document.getElementById(e).className=popupOptions.iClass;if(document.getElementById("dvWaitContentLoading")!=null){document.getElementById(a).innerHTML=document.getElementById("dvWaitContentLoading").innerHTML;}}g=null;h=null;};$(document).ready(function(){var a=window.location.toString();if(a.indexOf("displayPersonalLimits")!=-1){SB.customer.myAccounts.Funding(popupOptions);SB.customer.myAccounts.PersonalLimits(popupOptions);}});fundingGlobals=new Object();fundingGlobals.card=new Object();fundingGlobals.list=new Object();if(typeof(SB)=="undefined"||SB==null){var SB=new Object();}if(typeof(SB.funding)=="undefined"||SB.funding==null){SB.funding=new Object();}GetVisibleDivStyle=function(){return"";};GetHiddenDivStyle=function(){return"none";};SB.funding.loadFundingLabels=function(){var a=new LabelsHandler();var b=new AjaxService(a);b.GetRequest("/config/translation/funding/FundingScriptLabels.xml");b=null;a=null;};SB.funding.onCardDelete=function(b){SB.funding.loadFundingLabels();document.getElementById("cardID").value=b;document.getElementById("cardAction").value="remove";if(document.getElementById("popBox2")){var c=service.labels.CardDeleteProcessing;var a="<p>"+service.labels.CardDeleteProcessingMessage+"</p>";document.getElementById("popBox2").innerHTML=SB.base.processingAnimationContent(c,a);}__doPostBack("","");};SB.funding.onCardUpdate=function(){SB.funding.loadFundingLabels();document.getElementById("cardAction").value="update";__doPostBack("","");};SB.funding.SetWalletRedirect=function(e,b){var c=document.getElementById("divMessage");if(c!=null){c.style.display="none";}var d=document.getElementById("redirectIFrame");var a=document.getElementById("divIframe");if(d!=null&&a!=null&&e!=""){SB.base.reStyler("add","ctrlDepositMethodList_divContent","hide");SB.base.reStyler("add",d,("pm"+b));SB.base.reStyler("add","VbVControl","hide");}a.style.display="block";d.src=e;d.style.display="";SB.base.divPopUp(1,"refresh");};SB.funding.SetSpeedCardRedirect=function(c,b){var a=document.getElementById("speedCardPollerIframe");if(a!=undefined){a.src=b;}SB.funding.SetWalletRedirect(c,"SCD");};SB.funding.SetVBVRedirect=function(c){var b=document.getElementById("redirectIFrame");var a=document.getElementById("divIframe");if(b!=null&&a!=null&&c!=""){SB.base.reStyler("add","ctrlDepositMethodList_divContent","hide");SB.base.reStyler("add",b,"pmVBV");}a.style.display="block";b.src=c;b.style.display="";};SB.funding.SetRedirectIFrameContentURLToPBP=function(a){alert("SetRedirectIFrameContentURLToPBP - change to use generic function! - See funding.js line 86");SetRedirectIFrameContent(a,"PBP");};SB.funding.SetRedirectIFrameContentURLToPaysafe=function(a){alert("SetRedirectIFrameContentURLToPaysafe - change to use generic function! - See funding.js line 94");SetRedirectIFrameContent(a,"PS");};SB.funding.ResetCardForm=function(){var a=document.getElementById("popupBox");var d=a.getElementsByTagName("div");for(i=0;i<d.length;i++){if((d[i].id.indexOf("divValidationErrors")>-1)||(d[i].id.indexOf("errCardHolder")>-1)||(d[i].id.indexOf("errStartDate")>-1)||(d[i].id.indexOf("errIssueNo")>-1)||(d[i].id.indexOf("errExpiryDate")>-1)||(d[i].id.indexOf("errCardNo")>-1)||(d[i].id.indexOf("errCvv2")>-1)||(d[i].id.indexOf("errCardCurrency")>-1)||(d[i].id.indexOf("errAmount")>-1)){d[i].style.display=GetHiddenDivStyle();}}oAnchors=SB.base.getElementsByClass("error",a,"a");for(x=0;x<oAnchors.length;x++){SB.base.reStyler("remove",oAnchors[x],"error");}var c=document.getElementsByTagName("select");for(i=0;i<c.length;i++){if((c[i].id.indexOf("ddlValidFromMonth")>-1)||(c[i].id.indexOf("ddlValidToMonth")>-1)||(c[i].id.indexOf("ddlValidFromYear")>-1)||(c[i].id.indexOf("ddlValidToYear")>-1)||(c[i].id.indexOf("ddlCurrency")>-1)){if(c[i].options.length>0){c[i].selectedIndex=0;}else{c[i].selectedIndex=-1;}}}var b=document.getElementsByTagName("input");for(i=0;i<b.length;i++){if((b[i].id.indexOf("txtIssueno")>-1)||(b[i].id.indexOf("txtCardno")>-1)||(b[i].id.indexOf("txtCvv2")>-1)||(b[i].id.indexOf("txtAmount")>-1)||(b[i].id.indexOf("txtDepositConvertedAmount")>-1)){b[i].value="";}}};SB.funding.onCardWithdraw=function(){if(document.cardForm.cardAction.value=="withdraw"){document.cardForm.submit();}else{alert(service.labels.selectValidCard);}};onWithdrawCardSelect=function(a){};SB.funding.onDepositCardSelect=function(k,g,a,f){var b=document.getElementById("cardRow1");var e=document.getElementById("cardRow2A");var c=document.getElementById("cardRow2B");var p=document.getElementById("cardRow3A");var o=document.getElementById("cardRow3B");var r=document.getElementById("cardRow4");var q=document.getElementById("cardRow5");var m=document.getElementById("cardRow7");var l=document.getElementById("cvv2_"+k);var d=document.getElementById(fundingGlobals.card.ddlCardTypeID);var h=document.getElementById("cardId"+k);var d=document.getElementById(fundingGlobals.card.ddlCardListID);if(f=="true"){SB.funding.ResetCardForm();}if(SB.funding.isNewCard(k)){document.getElementById("cardAction").value="add";SB.funding.ShowNewCardRows(d,b,e,c,p,o,r,q,m,a);}else{document.getElementById("cardAction").value="deposit";SB.funding.InitialiseExistingCardRows(b,e,c,p,o,r,l,q,m);SB.funding.ShowExistingRetariusMessage(g,k);}SB.funding.onCardTypeChange(a,k,e,c,m);SB.funding.displayDepositAmounts(a,k,g);b=null;e=null;c=null;p=null;o=null;r=null;q=null;m=null;l=null;d=null;h=null;};SB.funding.onDepositNewCardSelect=function(h,g,a,f){var b=document.getElementById("cardRow1");var e=document.getElementById("cardRow2A");var c=document.getElementById("cardRow2B");var o=document.getElementById("cardRow3A");var m=document.getElementById("cardRow3B");var q=document.getElementById("cardRow4");var p=document.getElementById("cardRow5");var l=document.getElementById("cardRow7");var k=document.getElementById("cvv2_"+h);var d=document.getElementById(fundingGlobals.card.ddlCardListID);if(SB.funding.isNewCard(h)){SB.funding.ShowNewCardRows(d,b,e,c,o,m,q,p,l,a);}b=null;e=null;c=null;o=null;m=null;q=null;p=null;l=null;k=null;d=null;oCardRadio=null;};SB.funding.displayDepositAmounts=function(b,g,a){var e=document.getElementById(fundingGlobals.card.ddlDepositAmountID);var f=document.getElementById(fundingGlobals.card.txtAmountID);var d=document.getElementById("ctrlDepositMethodList__ctl0_noSymbol");var c=document.getElementById(fundingGlobals.card.lblPPMsgID);if(e!=null){if(e.length>0){if(b=="WM"||a=="IV"){e.style.display="none";f.style.display="";d.style.display="";}else{e.style.display="";f.style.display="none";d.style.display="none";}}else{e.style.display="none";f.style.display="";d.style.display="";}}c.innerHTML="";for(i=0;i<fundingGlobals.card.ppLabels.length;i++){if(fundingGlobals.card.ppLabels[i].indexOf(b)>=0){c.innerHTML=fundingGlobals.card.ppLabels[i].substring(fundingGlobals.card.ppLabels[i].indexOf(b)+3);}}};SB.funding.ShowExistingRetariusMessage=function(c,b){var a=fundingGlobals.card.customerCurrency;if(c=="WT"&&a!="GBP"&&a!="EUR"&&a!="USD"){document.getElementById("existingAccount").style.display=GetVisibleDivStyle();document.getElementById(fundingGlobals.card.currencyLabelID).style.display=GetHiddenDivStyle();}else{document.getElementById("existingAccount").style.display=GetHiddenDivStyle();document.getElementById(fundingGlobals.card.currencyLabelID).style.display=GetVisibleDivStyle();}};SB.funding.ShowNewCardRows=function(e,b,d,c,h,g,l,k,f,a){b.style.display=GetVisibleDivStyle();d.style.display=GetVisibleDivStyle();c.style.display=GetVisibleDivStyle();h.style.display=GetVisibleDivStyle();g.style.display=GetVisibleDivStyle();if(l!=null){l.style.display=GetVisibleDivStyle();}if((a=="unknown")&&(e!=null)){e.selectedIndex=0;}k.style.display=GetHiddenDivStyle();f.style.display=GetHiddenDivStyle();};SB.funding.InitialiseExistingCardRows=function(a,c,b,g,f,k,e,h,d){a.style.display=GetHiddenDivStyle();c.style.display=GetHiddenDivStyle();b.style.display=GetHiddenDivStyle();g.style.display=GetHiddenDivStyle();f.style.display=GetHiddenDivStyle();if(k!=null){if((e!=null)&&(e.value=="True")){k.style.display=GetVisibleDivStyle();}else{k.style.display=GetHiddenDivStyle();}}h.style.display=GetHiddenDivStyle();d.style.display=GetHiddenDivStyle();};SB.funding.ShowPaymentProviderLogos=function(a,c){var b=document.getElementById("providerDivs");if(b!=null){var d=b.getElementsByTagName("div");if(a==true){for(i=0;i<d.length;i++){if(d[i].id==c){d[i].style.display=GetVisibleDivStyle();}else{d[i].style.display=GetHiddenDivStyle();}}}else{for(i=0;i<d.length;i++){d[i].style.display=GetHiddenDivStyle();}}d=null;}b=null;};SB.funding.onNewCardTypeChange=function(a){var c=document.getElementById("cardRow2A");var b=document.getElementById("cardRow2B");var d=document.getElementById("cardRow7");SB.funding.onCardTypeChange(a.value,"new",c,b,d);c=null;b=null;d=null;SB.funding.displayDepositAmounts(a.value);};SB.funding.onCardTypeChange=function(a,d,c,b,e){SB.funding.DisplayValidFrom(d,a,c,b);SB.funding.DisplayCurrencyDropdown(a,d);SB.funding.SetDepositAmountCurrency(a,d);SB.funding.DisplayCurrencyConversionLabels(d,a,e);SB.funding.CalculateConversionAmount(d,a);SB.funding.DisplayMaestroLabel(a);SB.funding.HideCCV2(a);SB.funding.DisplayWireCardLabel(d,a,e);SB.funding.ShowPaymentProviderLogos(true,SB.funding.GetCardTypePaymentProviderId(a));};SB.funding.isNewCard=function(a){if(a=="new"){return true;}else{return false;}};SB.funding.GetCardTypePaymentProviderId=function(a){var b=null;if(fundingGlobals.card.cardTypeData.length==1){b=fundingGlobals.card.cardTypeData[0][3];}else{for(i=0;i<fundingGlobals.card.cardTypeData.length;i++){if(a==fundingGlobals.card.cardTypeData[i][0]){b=fundingGlobals.card.cardTypeData[i][3];break;}}}return b;};SB.funding.CardTypeDoesCurrencyConversion=function(a){for(i=0;i<fundingGlobals.card.currencyConvertedCardTypes.length;i++){if(a==fundingGlobals.card.currencyConvertedCardTypes[i]){return true;}}return false;};SB.funding.DisplayValidFrom=function(d,a,c,b){if(SB.funding.isNewCard(d)&&(a=="MA"||a=="SW"||a=="unknown")){c.style.display=GetVisibleDivStyle();b.style.display=GetVisibleDivStyle();}else{c.style.display=GetHiddenDivStyle();b.style.display=GetHiddenDivStyle();}};SB.funding.DisplayCurrencyDropdown=function(a,c){if(SB.funding.CardTypeDoesCurrencyConversion(a)&&SB.funding.isNewCard(c)){document.getElementById("cardRow5").style.display=GetVisibleDivStyle();var b=document.getElementById(fundingGlobals.card.ddlCurrencyID);SB.base.RemoveAllOptions(b);for(i=0;i<fundingGlobals.card.currencyConvertedCardTypes.length;i++){if(fundingGlobals.card.currencyConvertedCardTypes[i]==a){for(j=0;j<fundingGlobals.card.cardTypeCurrencies[i].length;j++){SB.base.AddOption(b,fundingGlobals.card.cardTypeCurrencies[i][j],fundingGlobals.card.cardTypeCurrencies[i][j]);}}}b.selectedIndex=0;b=null;}else{document.getElementById("cardRow5").style.display=GetHiddenDivStyle();}};SB.funding.SetDepositAmountCurrency=function(a,b){document.getElementById(fundingGlobals.card.currencyLabelID).innerHTML=SB.funding.GetSelectedCurrency(a,b);};SB.funding.GetSelectedCurrency=function(a,c){if(SB.funding.CardTypeDoesCurrencyConversion(a)){if(SB.funding.isNewCard(c)){var b=document.getElementById(fundingGlobals.card.ddlCurrencyID);return b.options[b.selectedIndex].text;}else{return document.getElementById("currencyCode_"+c).value;}}else{return fundingGlobals.card.customerCurrency;}};SB.funding.GetCheckedCardId=function(){var a=document.getElementById("cardID").value;return a;};SB.funding.GetCardType=function(b){if(SB.funding.isNewCard(b)){var a=document.getElementById(fundingGlobals.card.ddlCardTypeID);return a.value;}else{return document.getElementById("cardType_"+b).value;}};SB.funding.GetCardTypeDescription=function(d){var a=SB.funding.GetCardType(d);var c=document.getElementById(fundingGlobals.card.ddlCardListID);if(c!=null){for(var b=0;b<c.length;b++){if(c[b].value==a){return c[b].text;}}}return"";};SB.funding.GetSelectedCurrencyConversionRate=function(a){for(i=0;i<fundingGlobals.card.allCardCurrencies.length;i++){if(fundingGlobals.card.allCardCurrencies[i]==a){return fundingGlobals.card.allCardCurrencyRates[i];}}};SB.funding.CalculateConversionAmount=function(b,a){SB.funding.SetConvertedAmount(a,b,"SB.funding.CalculateConversionAmount");};SB.funding.UpdateConvertedAmount=function(b){var c=SB.funding.GetCheckedCardId();if(c!=""){var a=SB.funding.GetCardType(c);SB.funding.SetConvertedAmount(a,c,b);a=null;}c=null;};SB.funding.SetConvertedAmount=function(b,g,c){if(SB.funding.CardTypeDoesCurrencyConversion(b,g)){if(c=="ddlCurrency"){SB.funding.SetDepositAmountCurrency(b,g);}var f=document.getElementById(fundingGlobals.card.txtAmountID);if(f!=null&&f.value!=""&&!isNaN(f.value)){var d=SB.funding.GetSelectedCurrency(b,g);var e=SB.funding.GetSelectedCurrencyConversionRate(d);var h=fundingGlobals.card.customerCurrencyConversionRate;var a=(parseFloat(h)/parseFloat(e))*parseFloat(f.value);document.getElementById(fundingGlobals.card.txtDepositConvertedAmountID).value=a.toFixed(2);d=null;e=null;h=null;a=null;}f=null;}};SB.funding.DisplayCurrencyConversionLabels=function(b,a,c){if(SB.funding.CardTypeDoesCurrencyConversion(a)){c.style.display=GetVisibleDivStyle();document.getElementById(fundingGlobals.card.lblMinDepositID).style.display=GetHiddenDivStyle();document.getElementById(fundingGlobals.card.lblMaxDepositID).style.display=GetHiddenDivStyle();document.getElementById("removedFromYourAccount").innerHTML=fundingGlobals.card.removedFromYourAccount.replace("[PLACEHOLDER]",SB.funding.GetCardTypeDescription(b));document.getElementById("removedFromYourAccount").style.display=GetVisibleDivStyle();document.getElementById("currencyOfYourCard").innerHTML=fundingGlobals.card.currencyOfYourCard.replace("[PLACEHOLDER]",SB.funding.GetCardTypeDescription(b));document.getElementById("currencyOfYourCard").style.display=GetVisibleDivStyle();}else{if(c!=null){c.style.display=GetHiddenDivStyle();}document.getElementById(fundingGlobals.card.lblMinDepositID).style.display=GetVisibleDivStyle();document.getElementById(fundingGlobals.card.lblMaxDepositID).style.display=GetVisibleDivStyle();document.getElementById("removedFromYourAccount").style.display=GetHiddenDivStyle();document.getElementById("currencyOfYourCard").style.display=GetHiddenDivStyle();}};SB.funding.DisplayWireCardLabel=function(c,a){if(a=="WM"){if(SB.funding.isNewCard(c)){document.getElementById("cardRowHelpText").style.display=GetVisibleDivStyle();}else{document.getElementById("cardRowHelpText").style.display=GetHiddenDivStyle();}document.getElementById(fundingGlobals.card.lblMaxCustomerCxyDeposit).style.display=GetHiddenDivStyle();document.getElementById("wirecardDepositHelp").style.display=GetVisibleDivStyle();}else{document.getElementById("cardRowHelpText").style.display=GetHiddenDivStyle();document.getElementById(fundingGlobals.card.lblMaxCustomerCxyDeposit).style.display=GetVisibleDivStyle();var b=document.getElementById("wirecardDepositHelp");if(b!=null){b.style.display=GetHiddenDivStyle();}b=null;}};SB.funding.getSelectedPaymentMethod=function(){var a=document.getElementById("ctrlWithdrawMethodList_modFundingWithdrawddlPaymentMethod");if(a==null){a=document.getElementById("ctrlDepositMethodList_modFundingDepositddlPaymentMethod");}if(a==null){return null;}else{paymentMethod=a.options[a.selectedIndex].value;}return paymentMethod;};SB.funding.getCurrentPPID=function(){var a=SB.funding.getSelectedPaymentMethod();if(a!=null){var c=a.split("^");var b=c[1];return b;}else{return null;}};SB.funding.getUserPaymentAccountID=function(){if(SB.funding.getSelectedPaymentMethod()!=null){var a=SB.funding.getSelectedPaymentMethod();var b=a.split("^");var c=b[2];if(SB.funding.isUserPaymentAccountSelected()){c=b[2];}return c;}else{return null;}};SB.funding.getSubPaymentProvider=function(){var a=SB.funding.getSelectedPaymentMethod();if(SB.funding.paymentMethod!=null){if(SB.funding.isSubPaymentProviderSelected()){var b=a.split("^");return b[2];}else{return null;}}else{return null;}};SB.funding.getPopupPaymentProviderSelected=function(){var a=SB.funding.getSelectedPaymentMethod();if(a!=null){if(SB.funding.isPopupPaymentProviderSelected()){var b=a.split("^");return b[2];}else{return null;}}else{return null;}};SB.funding.isSubPaymentProviderSelected=function(){if(SB.funding.getSelectedPaymentMethod().indexOf("subMethods")>=0){return true;}else{return false;}};SB.funding.isPopupPaymentProviderSelected=function(){if(SB.funding.getSelectedPaymentMethod().indexOf("popupMethods")>=0){return true;}else{return false;}};SB.funding.isUserPaymentAccountSelected=function(){if(SB.funding.getSelectedPaymentMethod().indexOf("userPaymentAccounts")>=0){return true;}else{return false;}};SB.funding.loadPaymentMethod=function(c){var d=null;var b="";var a="";if($("#processOriginHidden").val()!=""){b="processOrigin="+$("#processOriginHidden").val();}if(c){d="/t/funding/depositPopUp.aspx?";}else{d="/t/funding/WithdrawalPopUp.aspx?";}Global_processingTitle="hidden";document.getElementById("divProcessingAnimation").className="show";document.getElementById("divShowContent").className="hide";if(SB.funding.getSelectedPaymentMethod().indexOf("separator")>=0){SB.base.RecallOpenDiv((d+b),"popBadSelect1","popVeil1","popLayer1");return false;}if(SB.funding.isPopupPaymentProviderSelected()){a="&currentPPID="+SB.funding.getCurrentPPID();}else{if(SB.funding.isUserPaymentAccountSelected()){a="&currentPPID="+SB.funding.getCurrentPPID()+"&userPaymentAccountID="+SB.funding.getUserPaymentAccountID();}else{if(SB.funding.isSubPaymentProviderSelected()){a="&currentPPID="+SB.funding.getCurrentPPID()+"&subPPID="+SB.funding.getUserPaymentAccountID();}else{a="&currentPPID="+SB.funding.getCurrentPPID();}}}SB.base.RecallOpenDiv((d+b+a),"popBadSelect1","popVeil1","popLayer1");if(SB.funding.isPopupPaymentProviderSelected()){SB.funding.openPopUpOnSuccess();}};SB.funding.openPopUpOnSuccess=function(){var a;if(rState==responseState.success){PopNewWindow(SB.funding.getPopupPaymentProviderSelected());}else{if(rState==responseState.waiting){a=setTimeout("SB.funding.openPopUpOnSuccess()",100);}else{clearTimeout(a);}}};SB.funding.getPaymentMethodInputControl=function(c,e){var a=c.id.split("_");var b=a[0]+"__ctl0_"+e;var d=document.getElementById(b);return d;};SB.funding.ValidateAndDeposit=function(a){document.getElementById("ctrlDepositMethodList_divContent").style.display=GetHiddenDivStyle();if(document.getElementById("_ctl0_divValidationErrors")){document.getElementById("_ctl0_divValidationErrors").style.display=GetHiddenDivStyle();}if(document.getElementById("divFailureResult")){document.getElementById("divFailureResult").style.display=GetHiddenDivStyle();}if(document.getElementById("divSuccessResult")){document.getElementById("divSuccessResult").style.display=GetHiddenDivStyle();}document.getElementById("divMessage").style.display=GetHiddenDivStyle();submitDeposit();};SB.funding.submitDeposit=function(){document.depositForm.submit();};SB.funding.showValidationErrorMessage=function(a){if(a){document.getElementById("divValidationErrors").style.display="block";if(document.getElementById("divError")!=null){document.getElementById("divError").style.display="none";}}else{document.getElementById("divValidationErrors").style.display="none";if(document.getElementById("divError")!=null){document.getElementById("divError").style.display="block";}}};SB.funding.HideCancelButton=function(){var a=SB.funding.getCurrentPPID();if(document.getElementById("divDisplayProgress")!=null){document.getElementById("divDisplayProgress").style.display=GetHiddenDivStyle();}if(a=="BW"){document.getElementById("ctrlDepositMethodList_modFundingDepositBtnCancel").style.display="none";}};SB.funding.onDepositRegisterOnly=function(a){var c=document.forms[0];if(c!=null){var b=c.elements.registerOnly;if(b!=null){b.value="true";}}SB.funding.onSubmitDepositOrWithdrawal(a);};SB.funding.onSubmitDepositOrWithdrawal=function(a){Global_processingMessage="<p>Az űrlap töltődik</p>";Global_processingTitle="Kérjük, várjon...";__doPostBack("","");};SB.funding.showProcessingTransaction=function(){Global_processingMessage="<p>Az űrlap töltődik</p>";Global_processingTitle="Kérjük, várjon...";SB.base.holdingDiv("show");};SB.funding.refreshBalance=function(b){var a=document.getElementById("modCustDisplayBalance");if(a!=null){a.innerHTML=b;}};SB.funding.iFrameRedirection=function(b){var a=document.getElementById("btnRedirect").value;SB.base.RecallOpenDiv(a,"popBadSelect1","popVeil1","popLayer1");};OpenPageInLayer2=function(a){SB.base.OpenDiv(a,"popBadSelect2","popVeil2","popLayer2");};AgeVerification=function(){location.href="/t/customer/myaccount.aspx";};SB.funding.getBankDetails=function(){var a;var b="/t/funding/BTBankDetails.aspx?BankID=";a=document.getElementById("ctrlDepositMethodList__ctl0_lstCurrencyList").selectedIndex;b=b+document.getElementById("ctrlDepositMethodList__ctl0_lstCurrencyList").options[a].value;SB.funding.LoadHTML(b,"");};SB.funding.LoadHTML=function(b,c){var a=new Object();a.timeout=2000;a.textonly=true;a.Content=c;HTTP.getText(b,SB.funding.CallBackLoadHTML,a);};SB.funding.CallBackLoadHTML=function(a,b){if(a!=null){if(document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails")!=null){document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails").innerHTML=a;}else{if(document.getElementById("more_dvBankDetails")!=null){document.getElementById("more_dvBankDetails").innerHTML=a;}}}if(document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails")!=null){SB.base.divPopUp(1,"refresh");}};SB.funding.getPrintDetails=function(a){var c="<input id='btnCancel' type='button' value='Cancel' runat='server' onclick='SB.base.hideLayer1();' />";var b=document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails").innerHTML;document.getElementById("dvLoadPrintDetails").innerHTML=b+c;if(a=="False"){document.getElementById("email").value="";document.getElementById("dvLoadPrintDetails").style.display="none";document.getElementById("dvSendEmail").style.display="";}else{document.getElementById("dvLoadPrintDetails").style.display="";document.getElementById("dvSendEmail").style.display="none";window.print();SB.funding.hideLayer2();}};SB.funding.getBankDetailText=function(){var a="";if(document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails")!=null){a=document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails").innerHTML;}return a;};SB.funding.sendEmail=function(){var b=document.getElementById("txtEmailAddress").value;if(b!=""){var a="/t/modules/funding/deposit/PrintPopUp.aspx?emailaddress="+b+"&bankDetail="+SB.funding.getBankDetailText();SB.base.RecallOpenDiv(a,"popBadSelect2","popVeil2","popLayer2");}};SB.funding.hideLayer2=function(){SB.base.reStyler("swap","popLayer2, popVeil2, popBadSelect2","show","hide");};PopNewWindow=function(a){var b=window.open(a);b=null;return;};SB.funding.LoadMethodforModule=function(a){switch(a){case"deposit":if(typeof(SB.funding.loadPaymentMethod)=="function"){SB.funding.loadPaymentMethod(true);}else{setTimeout("SB.funding.LoadMethodforModule('"+a+"')",10);}break;case"withdraw":if(typeof(SB.funding.loadPaymentMethod)=="function"){SB.funding.loadPaymentMethod(false);}else{setTimeout("SB.funding.LoadMethodforModule('"+a+"')",10);}break;case"carddeposit":if(typeof(SB.funding.cardDeposit.OnDropdownSelectionChange)=="function"){SB.funding.cardDeposit.OnDropdownSelectionChange();}else{setTimeout("SB.funding.LoadMethodforModule('"+a+"')",10);}break;case"cardwithdraw":if(typeof(OnWithdrawDropdownSelectionChange)=="function"){OnWithdrawDropdownSelectionChange();}else{setTimeout("SB.funding.LoadMethodforModule('"+a+"')",10);}break;default:break;}};SB.funding.DisplayMaestroLabel=function(a){if(a=="MA"||a=="SW"){document.getElementById("issueNumberTip").style.display=GetVisibleDivStyle();}else{document.getElementById("issueNumberTip").style.display=GetHiddenDivStyle();}};SB.funding.HideCCV2=function(a){if(a=="LS"){document.getElementById("ctrlDepositMethodList__ctl0_txtCvv2").value="123";document.getElementById("cardRow4").style.display="none";}};SB.funding.ResetTooltipError=function(){if(fundingGlobals.card.hasNoErrors=="false"){var a=document.getElementById("divFunding").getElementsByTagName("strong");for(i=0;i<a.length;i++){if(a[i].className=="icons icoError"){if(a[i].id.indexOf("cvv2No")!=-1){a[i].className="icons icoInfo";document.getElementById(a[i].id.replace(/ico_?/i,"ttt_")).className="toolTipText tttInfo";document.getElementById(a[i].id.replace(/ico_?/i,"ttt_")).innerHTML='<span class="tttContent">'+SB.funding.CVVInfoMessage+"</span>";continue;}a[i].className="icons";document.getElementById(a[i].id.replace(/ico_?/i,"ttt_")).innerHTML="";}}}};SB.funding.ProcessCardSelectionChange=function(a){switch(a){case"carddeposit":SB.funding.ResetTooltipError();SB.funding.resetErrorState();SB.funding.cardDeposit.clearLuhnCheckIndicator();SB.funding.LoadMethodforModule(a);break;case"cardwithdraw":SB.funding.ResetTooltipError();SB.funding.ResetCardForm();SB.funding.resetErrorState();SB.funding.LoadMethodforModule(a);break;}};SB.funding.resetErrorState=function(){fundingGlobals.card.hasNoErrors="true";};SB.funding.calculateConversionForSpeedCard=function(d){var e=document.getElementById("convertedCurrency");if(e!=null){while(e.hasChildNodes()){e.removeChild(e.firstChild);}var b=NaN;if(d){b=parseFloat(document.getElementById("ctrlDepositMethodList__ctl0_modFundingDepositSCDAmount").value);}else{b=parseFloat(document.getElementById("ctrlWithdrawMethodList__ctl0_modFundingWithdrawSCDAmount").value);}var c=parseFloat(document.getElementById("conversionRate").value);if(isNaN(b)||isNaN(c)){e.appendChild(document.createTextNode("0"));}else{var a=(Math.round(b*c*100)/100);e.appendChild(document.createTextNode(a.toString()));}}};SB.funding.BankTranfer=function(a){this.div=a;this.setup();};SB.funding.BankTranfer.prototype={setup:function(){var a=this;$("select.bankName",this.div).change(function(){a.handleOtherOption(this);});},handleOtherOption:function(b){var a=$(":selected",b).val().toLowerCase();var c=$(":text.bankName",this.div);a=="other"?c.removeClass("hidden"):c.addClass("hidden");}};var fundingJSLoaded=true;if(typeof(SB)=="undefined"||SB==null){var SB=new Object();}if(typeof(SB.funding)=="undefined"||SB.funding==null){SB.funding=new Object();}SB.funding.cardDeposit=new Object();SB.funding.cardDeposit.onNewCardTypeChange_Card=function(a){var b=document.getElementById("cardRow4");var c=document.getElementById("cardRow9");SB.funding.onCardTypeChange(a.value,"new",b,c);oCardRow2=null;oCardRow7=null;SB.funding.displayDepositAmounts(a.value,"new");};SB.funding.cardDeposit.validateCARD=function(b){var a=true;return a;};SB.funding.cardDeposit.disableDepositExpiredCard=function(e,b,d,c){var a=new Date();var f="false";if((c>b)||(c==b&&d>e)){f="true";}if(f=="true"){document.getElementById("lnkActiveCard").style.display="none";document.getElementById("lnkExpiredCard").style.display="";document.getElementById("lnkUpdateCard").className="show";document.getElementById("ErrorIcon").style.display="";document.getElementById("InfoIcon").style.display="none";SB.funding.cardDeposit.initializeTooltip();SB.funding.cardDeposit.ToggleCardExpiry();}else{document.getElementById("lnkUpdateCard").className="hide";document.getElementById("ErrorIcon").style.display="none";document.getElementById("InfoIcon").style.display="";}};SB.funding.cardDeposit.initializeTooltip=function(){SB.base.holdingDiv("hide");var a=document.getElementById("ctrlDepositMethodList__ctl0_ico_expiryDate");var b=document.getElementById("ctrlDepositMethodList__ctl0_ttt_expiryDate");a.className="icons icoError";b.className="toolTipText tttError";SB.funding.cardDeposit.removeExistingTooltipMessage(b);bubble_info_message="Az Ön kártyája lejárt.";SB.funding.cardDeposit.createTooltipMessageTag(b);};SB.funding.cardDeposit.ToggleCardExpiry=function(){SB.base.ToggleElement("cardExpired","display","block");};SB.funding.cardDeposit.loadManageCard=function(){var d="";var c="";var a=SB.funding.getCurrentPPID();var b=document.getElementById("cardID").value;Global_processingTitle="Kérjük, várjon...";Global_processingMessage="<p>Az űrlap töltődik</p>";d="currentPPID="+a+"&userPaymentAccountID="+b+"&source=deposit";c="/t/funding/ManageCardPopup.aspx?"+d;SB.base.RecallOpenDiv(c,"popBadSelect1","popVeil1","popLayer1");};SB.funding.cardDeposit.OnDropdownSelectionChange=function(){document.getElementById("lnkActiveCard").style.display="";document.getElementById("lnkExpiredCard").style.display="none";var h=document.getElementById("ctrlDepositMethodList__ctl0_dpdwnCardList");var o=h.options[h.selectedIndex].value;document.getElementById("dropdownSelection").value=o;var e=new Array();e=o.split("_");SB.funding.cardDeposit.createHiddenControls(e);if(e.length>1){var t=e[0];var g=e[1];var B=e[2];var z=e[3];var s=e[4];var b=e[5];var a=e[6];var v=e[7];var p=e[8];var w=e[9];var f=e[10];var C=e[11];var l=e[12];document.getElementById("dvSavedCards").style.display="";document.getElementById("ctrlDepositMethodList__ctl0_ddlCardType").value=B;document.getElementById("cardID").value=t;document.getElementById("ctrlDepositMethodList__ctl0_InvoiceHelpDiv").style.display=(g=="IV")?"block":"none";SB.funding.onDepositCardSelect(t,g,B,fundingGlobals.card.hasNoErrors);var u=document.getElementById("ctrlDepositMethodList__ctl0_lblCardType");u.innerHTML=z;u.style.display="";document.getElementById("ctrlDepositMethodList__ctl0_spCardType").style.display="";var q=document.getElementById("ctrlDepositMethodList__ctl0_lblCardNumber");q.innerHTML=s;q.style.display="";document.getElementById("ctrlDepositMethodList__ctl0_spCardNumber").style.display="";var d=document.getElementById("ctrlDepositMethodList__ctl0_lblExpiryMonth");d.innerHTML=a;d.style.display="";document.getElementById("ctrlDepositMethodList__ctl0_spExpiryDate").style.display="";var k=document.getElementById("ctrlDepositMethodList__ctl0_lblExpiryYear");k.innerHTML=v;k.style.display="";SB.funding.cardDeposit.disableDepositExpiredCard(a,v,C,l);var b=e[5];if(b!=""&&b!=null){if(B=="MA"||B=="SW"||B=="unknown"){var A=b.substr(4,2);var y=b.substr(0,4);var r=document.getElementById("ctrlDepositMethodList__ctl0_lblStartMonth");r.innerHTML=A;r.style.display="";document.getElementById("ctrlDepositMethodList__ctl0_spStartDate").style.display="";var m=document.getElementById("ctrlDepositMethodList__ctl0_lblStartYear");m.innerHTML=y;m.style.display="";var c=document.getElementById("ctrlDepositMethodList__ctl0_lblIssueNumber");c.innerHTML=p;c.style.display="";document.getElementById("ctrlDepositMethodList__ctl0_spIssueNumber").style.display="";}else{SB.funding.cardDeposit.hideStartDateAndIssueNo();}}else{SB.funding.cardDeposit.hideStartDateAndIssueNo();}}else{document.getElementById("cardID").value="new";SB.funding.onDepositCardSelect("new","unknown",false,fundingGlobals.card.hasNoErrors);SB.funding.cardDeposit.hideSavedCardAttributes();SB.funding.onNewCardTypeChange(h);document.getElementById("ctrlDepositMethodList__ctl0_ddlCardType").value=o;document.getElementById("cardType").value=o;document.getElementById("ctrlDepositMethodList__ctl0_InvoiceHelpDiv").style.display="none";}};SB.funding.cardDeposit.hideStartDateAndIssueNo=function(){document.getElementById("ctrlDepositMethodList__ctl0_lblStartMonth").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_spStartDate").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_lblStartYear").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_lblIssueNumber").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_spIssueNumber").style.display="none";};SB.funding.cardDeposit.hideSavedCardAttributes=function(){document.getElementById("dvSavedCards").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_lblCardType").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_spCardType").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_lblCardNumber").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_spCardNumber").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_spExpiryDate").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_lblExpiryMonth").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_lblExpiryYear").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_spStartDate").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_lblStartMonth").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_lblStartYear").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_lblIssueNumber").style.display="none";document.getElementById("ctrlDepositMethodList__ctl0_spIssueNumber").style.display="none";};SB.funding.cardDeposit.createHiddenControls=function(a){var b=new Array();b=a;SB.funding.cardDeposit.createHiddenProviderId(b[0],b[1]);SB.funding.cardDeposit.createHiddenCardType(b[0],b[2]);SB.funding.cardDeposit.createHiddenCvv2(b[0],b[9]);SB.funding.cardDeposit.createHiddenCurrencyCode(b[0],b[10]);};SB.funding.cardDeposit.createHiddenProviderId=function(d,a){var b=document.getElementById("placeholderHiddenControls");var c=document.createElement("input");c.setAttribute("type","hidden");c.setAttribute("id","cardProviderID_"+d);c.setAttribute("name","cardProviderID_"+d);c.setAttribute("value",a);b.appendChild(c);};SB.funding.cardDeposit.createHiddenCardType=function(d,a){var b=document.getElementById("placeholderHiddenControls");var c=document.createElement("input");c.setAttribute("type","hidden");c.setAttribute("id","cardType_"+d);c.setAttribute("name","cardType_"+d);c.setAttribute("value",a);b.appendChild(c);};SB.funding.cardDeposit.createHiddenCvv2=function(c,d){var a=document.getElementById("placeholderHiddenControls");var b=document.createElement("input");b.setAttribute("type","hidden");b.setAttribute("id","cvv2_"+c);b.setAttribute("name","cvv2_"+c);b.setAttribute("value",d);a.appendChild(b);};SB.funding.cardDeposit.onCardDeposit=function(a){var b=document.getElementById(fundingGlobals.card.ddlDepositAmountID);var c=document.getElementById(fundingGlobals.card.txtAmountID);if(b!=null){if(b.style.display!="none"){c.value=b.value;}}Global_processingMessage="<p>Tranzakciója feldolgozás alatt...</p>";Global_processingTitle="Kérjük, várjon...";__doPostBack("","");};SB.funding.cardDeposit.createHiddenCurrencyCode=function(d,a){var b=document.getElementById("placeholderHiddenControls");var c=document.createElement("input");c.setAttribute("type","hidden");c.setAttribute("id","currencyCode_"+d);c.setAttribute("name","currencyCode_"+d);c.setAttribute("value",a);b.appendChild(c);};SB.funding.cardDeposit.clearLuhnCheckIndicator=function(){var a=document.getElementById("ctrlDepositMethodList__ctl0_ico_CardNumber");a.className="icons";var b=document.getElementById("ctrlDepositMethodList__ctl0_ttt_CardNumber");b.className="toolTipText";SB.funding.cardDeposit.removeExistingTooltipMessage(b);};var Cards;var MC;var VI;var AmExCard;var DinersClubCard;var DiscoverCard;var enRouteCard;var JCBCard;var LuhnCheckSum;var MA;var SW;var VE;var MD;var VD;var bubble_info_message="Kérjük, ellenőrizze kártyaadatait, mert hibásnak tűnnek.";SB.funding.cardDeposit.InitialializeCardObjects=function(){Cards=new Array(13);Cards[0]=new SB.funding.cardDeposit.CardType("MC","51,52,53,54,55","16");MC=Cards[0];Cards[1]=new SB.funding.cardDeposit.CardType("VI","4","13,16");VI=Cards[1];Cards[2]=new SB.funding.cardDeposit.CardType("AmExCard","34,37","15");AmExCard=Cards[2];Cards[3]=new SB.funding.cardDeposit.CardType("DinersClubCard","30,36,38","14");DinersClubCard=Cards[3];Cards[4]=new SB.funding.cardDeposit.CardType("DiscoverCard","6011","16");DiscoverCard=Cards[4];Cards[5]=new SB.funding.cardDeposit.CardType("enRouteCard","2014,2149","15");enRouteCard=Cards[5];Cards[6]=new SB.funding.cardDeposit.CardType("JCBCard","3088,3096,3112,3158,3337,3528","16");JCBCard=Cards[6];LuhnCheckSum=Cards[7]=new SB.funding.cardDeposit.CardType();Cards[8]=new SB.funding.cardDeposit.CardType("MA","50,56,57,58,6","16");MA=Cards[8];Cards[9]=new SB.funding.cardDeposit.CardType("SW","4903,4905,4911,4936,564182,633110,6333,6759","16,18,19");SW=Cards[9];Cards[10]=new SB.funding.cardDeposit.CardType("VE","4","13,16");VE=Cards[10];Cards[11]=new SB.funding.cardDeposit.CardType("MD","51,52,53,54,55","16");MD=Cards[11];Cards[12]=new SB.funding.cardDeposit.CardType("VD","4","13,16");VD=Cards[12];};var LuhnCheckUnchecked="unchecked";var LuhnCheckPassed="passed";var LuhnCheckFailed="failed";SB.funding.cardDeposit.luhnCheckCardNumber=function(){var c=LuhnCheckUnchecked;SB.funding.cardDeposit.InitialializeCardObjects();document.getElementById("imgCardNumberIncorrect").style.display="none";document.getElementById("imgCardNumberCorrect").style.display="none";c=SB.funding.cardDeposit.CheckNumberOnChange();var a=document.getElementById("ctrlDepositMethodList__ctl0_ico_CardNumber");var b=document.getElementById("ctrlDepositMethodList__ctl0_ttt_CardNumber");if(c==LuhnCheckPassed){a.className="icons icoTrue";b.className="toolTipText";SB.funding.cardDeposit.removeExistingTooltipMessage(b);}else{if(c==LuhnCheckFailed){a.className="icons icoFalse";b.className="toolTipText tttError";SB.funding.cardDeposit.removeExistingTooltipMessage(b);SB.funding.cardDeposit.createTooltipMessageTag(b);}else{if(c==LuhnCheckUnchecked){SB.funding.cardDeposit.clearLuhnCheckIndicator();}}}};SB.funding.cardDeposit.removeExistingTooltipMessage=function(a){a.innerHTML="";};SB.funding.cardDeposit.createTooltipMessageTag=function(a){a.innerHTML='<span class="tttContent">'+bubble_info_message+"</span>";};SB.funding.cardDeposit.CardType=function(){var f;var a=SB.funding.cardDeposit.CardType.arguments;var d=SB.funding.cardDeposit.CardType.arguments.length;this.objname="object CardType";var c=(d>0)?a[0]:"CardObject";var e=(d>1)?a[1]:"0,1,2,3,4,5,6,7,8,9";var b=(d>2)?a[2]:"13,14,15,16,19";this.setCardNumber=setCardNumber;this.setCardType=setCardType;this.setLen=setLen;this.setRules=setRules;this.setExpiryDate=setExpiryDate;this.setCardType(c);this.setLen(b);this.setRules(e);if(d>4){this.setExpiryDate(a[3],a[4]);}this.checkCardNumber=checkCardNumber;this.getExpiryDate=SB.funding.cardDeposit.getExpiryDate;this.getCardType=SB.funding.cardDeposit.getCardType;this.isCardNumber=isCardNumber;this.isExpiryDate=isExpiryDate;this.luhnCheck=luhnCheck;return this;};SB.funding.cardDeposit.CheckNumberOnChange=function(){var a=document.getElementById("ctrlDepositMethodList__ctl0_txtCardno").value;var d=document.getElementById("ctrlDepositMethodList__ctl0_ddlValidToYear").value;var b=document.getElementById("ctrlDepositMethodList__ctl0_ddlValidToMonth").value;var c=document.getElementById("ctrlDepositMethodList__ctl0_dpdwnCardList").value;if(a.length==0||d.length==0||b.length==0){return LuhnCheckUnchecked;}else{return SB.funding.cardDeposit.CheckCardNumber(a,d,b,c);}};SB.funding.cardDeposit.CheckCardNumber=function(usrCardNumber,lExpiryYear,lExpiryMonth,lCardType){var tmpyear;if(lExpiryYear.length==0){bubble_info_message="Kérjük, adja meg kártyája lejárati dátumát.";return LuhnCheckFailed;}tmpyear=lExpiryYear;tmpmonth=lExpiryMonth;if(!(new CardType()).isExpiryDate(tmpyear,tmpmonth)){bubble_info_message="Az Ön kártyája lejárt.";return LuhnCheckFailed;}var card=lCardType;var retval=eval(card+'.checkCardNumber("'+usrCardNumber+'", '+tmpyear+", "+tmpmonth+");");cardname="";if(retval){return LuhnCheckPassed;}else{for(var n=0;n<Cards.size;n++){if(Cards[n].checkCardNumber(usrCardNumber,tmpyear,tmpmonth)){cardname=Cards[n].SB.funding.cardDeposit.getCardType();break;}}if(cardname.length>0){var str_message="Ez egy card1 számnak tűnik, nem pedig egy card2 számnak.";str_message.replace("card1",cardname);str_message.replace("card2",card);bubble_info_message=str_message;return LuhnCheckFailed;}else{bubble_info_message="Kérjük, ellenőrizze kártyaszámát, mert hibásnak tűnik.";return LuhnCheckFailed;}}};CardType=function(){var f;var a=CardType.arguments;var d=CardType.arguments.length;this.objname="object CardType";var c=(d>0)?a[0]:"CardObject";var e=(d>1)?a[1]:"0,1,2,3,4,5,6,7,8,9";var b=(d>2)?a[2]:"13,14,15,16,19";this.setCardNumber=setCardNumber;this.setCardType=setCardType;this.setLen=setLen;this.setRules=setRules;this.setExpiryDate=SB.funding.cardDeposit.setExpiryDate;this.setCardType(c);this.setLen(b);this.setRules(e);if(d>4){this.setExpiryDate(a[3],a[4]);}this.checkCardNumber=checkCardNumber;this.getExpiryDate=SB.funding.cardDeposit.getExpiryDate;this.getCardType=SB.funding.cardDeposit.getCardType;this.isCardNumber=isCardNumber;this.isExpiryDate=isExpiryDate;this.luhnCheck=luhnCheck;return this;};checkCardNumber=function(){var a=checkCardNumber.arguments;var e=checkCardNumber.arguments.length;var c=(e>0)?a[0]:this.cardnumber;var b=(e>1)?a[1]:this.year;var d=(e>2)?a[2]:this.month;this.setCardNumber(c);this.setExpiryDate(b,d);if(!this.isCardNumber()){return false;}if(!this.isExpiryDate()){return false;}return true;};SB.funding.cardDeposit.getCardType=function(){return this.cardtype;};SB.funding.cardDeposit.getExpiryDate=function(){return this.month+"/"+this.year;};isCardNumber=function(){var b=isCardNumber.arguments;var d=isCardNumber.arguments.length;var c=(d>0)?b[0]:this.cardnumber;if(!this.luhnCheck()){return false;}for(var f=0;f<this.len.size;f++){if(c.toString().length==this.len[f]){for(var a=0;a<this.rules.size;a++){var e=c.substring(0,this.rules[a].toString().length);if(e==this.rules[a]){return true;}}return false;}}return false;};isExpiryDate=function(){var a=isExpiryDate.arguments;var b=isExpiryDate.arguments.length;year=b>0?a[0]:this.year;month=b>1?a[1]:this.month;if(!isNum(year+"")){return false;}if(!isNum(month+"")){return false;}today=new Date();expiry=new Date(year,month);if(today.getTime()>expiry.getTime()){return false;}else{return true;}};isNum=function(a){a=a.toString();if(a.length==0){return false;}for(var b=0;b<a.length;b++){if(a.substring(b,b+1)<"0"||a.substring(b,b+1)>"9"){return false;}}return true;};luhnCheck=function(){var a=luhnCheck.arguments;var g=luhnCheck.arguments.length;var f=g>0?a[0]:this.cardnumber;if(!isNum(f)){return false;}var b=f.length;var c=b&1;var d=0;for(var e=0;e<b;e++){var h=parseInt(f.charAt(e));if(!((e&1)^c)){h*=2;if(h>9){h-=9;}}d+=h;}if(d%10==0){return true;}else{return false;}};makeArray=function makeArray(a){this.size=a;return this;};setCardNumber=function(a){this.cardnumber=a;return this;};setCardType=function(a){this.cardtype=a;return this;};setExpiryDate=function(a,b){this.year=a;this.month=b;return this;};setLen=function(a){if(a.length==0||a==null){a="13,14,15,16,19";}var c=a;n=1;while(c.indexOf(",")!=-1){c=c.substring(c.indexOf(",")+1,c.length);n++;}this.len=new makeArray(n);n=0;while(a.indexOf(",")!=-1){var b=a.substring(0,a.indexOf(","));this.len[n]=b;a=a.substring(a.indexOf(",")+1,a.length);n++;}this.len[n]=a;return this;};setRules=function(c){if(c.length==0||c==null){c="0,1,2,3,4,5,6,7,8,9";}var b=c;n=1;while(b.indexOf(",")!=-1){b=b.substring(b.indexOf(",")+1,b.length);n++;}this.rules=new makeArray(n);n=0;while(c.indexOf(",")!=-1){var a=c.substring(0,c.indexOf(","));this.rules[n]=a;c=c.substring(c.indexOf(",")+1,c.length);n++;}this.rules[n]=c;return this;};var cardJSLoaded=true;if(typeof(SB)=="undefined"||SB==null){var SB=new Object();}if(typeof(SB.funding)=="undefined"||SB.funding==null){SB.funding=new Object();}SB.funding.cardWithdraw=new Object();SB.funding.cardWithdraw.validateWithdrawExpiry=function(){var k=true;var f=new Date();var e=f.getMonth();var c=f.getYear();var d=0;var h=0;var a=new Array();d=document.getElementById(fundingGlobals.card.wStartYear).innerText;h=document.getElementById(fundingGlobals.card.wExpiryYear).innerText;var g=document.getElementById(fundingGlobals.card.wStartMonth).innerText;var b=document.getElementById(fundingGlobals.card.wExpiryMonth).innerText;};SB.funding.cardWithdraw.cardValidityDates=function(a){var e=false;var b=new Date();var d=b.getMonth()+1;var c=b.getYear();if(a[0]==null||a[2]==null){e=false;return e;}else{if(a[0]<c){}else{if(a[0]==c){if(d>a[2]||d==a[2]){}else{e=false;return e;}}else{if(a[0]>c){e=false;return e;}}}}if(c<a[1]){}else{if(c==a[1]){if(d<a[3]||d==a[3]){}else{e=false;return e;}}else{if(c>a[1]){e=false;return e;}}}e=true;return e;};OnWithdrawDropdownSelectionChange=function(){if(document.getElementById("lnkActiveCard")){document.getElementById("lnkActiveCard").style.display="";}if(document.getElementById("lnkExpiredCard")){document.getElementById("lnkExpiredCard").style.display="none";}var p=document.getElementById("ctrlWithdrawMethodList__ctl0_dpdwnCardList");var k=p.options[p.selectedIndex].value;document.getElementById("dropdownSelection").value=k;var h=new Array();h=k.split("_");SB.funding.cardWithdraw.createHiddenControls(h);if(h.length>1){document.getElementById(fundingGlobals.card.wDdlCardType).value=h[2];document.getElementById("cardID").value=h[0];var o=document.getElementById(fundingGlobals.card.wLblCardType);o.innerHTML=h[3];o.style.display="";var e=document.getElementById(fundingGlobals.card.wLblCardNumber);e.innerHTML=h[4];e.style.display="";var g=document.getElementById(fundingGlobals.card.wExpiryMonth);g.innerHTML=h[6];g.style.display="";var b=document.getElementById(fundingGlobals.card.wExpiryYear);b.innerHTML=h[7];b.style.display="";var c=h[5];if(c!=""&&c!=null){if(h[2]=="MA"||h[2]=="SW"||h[2]=="unknown"){var m=c.substr(4,2);var l=c.substr(0,4);var d=document.getElementById(fundingGlobals.card.wStartMonth);d.innerHTML=m;d.style.display="";if(document.getElementById(fundingGlobals.card.wDivspStartDate)){document.getElementById(fundingGlobals.card.wDivspStartDate).style.display="";}var f=document.getElementById(fundingGlobals.card.wStartYear);f.innerHTML=l;f.style.display="";var a=document.getElementById(fundingGlobals.card.wLblIssueNumber);a.innerHTML=h[8];a.style.display="";if(document.getElementById(fundingGlobals.card.wDivspIssueNumber)){document.getElementById(fundingGlobals.card.wDivspIssueNumber).style.display="";}}else{SB.funding.cardWithdraw.hideStartDateAndIssueNo();}}else{SB.funding.cardWithdraw.hideStartDateAndIssueNo();}}else{document.getElementById("cardID").value="new";SB.funding.onDepositCardSelect("new","unknown",false,fundingGlobals.card.hasNoErrors);SB.funding.cardDeposit.hideSavedCardAttributes();SB.funding.onNewCardTypeChange(p);document.getElementById(fundingGlobals.card.wDdlCardType).value=k;document.getElementById("cardType").value=k;}SB.funding.cardWithdraw.stopWithdrawOnExpiredCard(document.getElementById(fundingGlobals.card.wExpiryMonth),document.getElementById(fundingGlobals.card.wExpiryYear));};SB.funding.cardWithdraw.hideStartDateAndIssueNo=function(){document.getElementById(fundingGlobals.card.wDivspStartDate).style.display="none";document.getElementById(fundingGlobals.card.wDivspIssueNumber).style.display="none";};SB.funding.cardWithdraw.createHiddenControls=function(a){var b=new Array();b=a;SB.funding.cardWithdraw.createHiddenProviderId(b[0],b[1]);SB.funding.cardWithdraw.createHiddenCardType(b[0],b[2]);SB.funding.cardWithdraw.createHiddenCvv2(b[0],b[9]);SB.funding.cardWithdraw.createHiddenCurrencyCode(b[0],b[10]);};SB.funding.cardWithdraw.createHiddenProviderId=function(d,a){var b=document.getElementById("placeholderHiddenControls");var c=document.createElement("input");c.setAttribute("type","hidden");c.setAttribute("id","cardProviderID_"+d);c.setAttribute("name","cardProviderID_"+d);c.setAttribute("value",a);b.appendChild(c);};SB.funding.cardWithdraw.createHiddenCardType=function(d,a){var b=document.getElementById("placeholderHiddenControls");var c=document.createElement("input");c.setAttribute("type","hidden");c.setAttribute("id","cardType_"+d);c.setAttribute("name","cardType_"+d);c.setAttribute("value",a);b.appendChild(c);};SB.funding.cardWithdraw.createHiddenCvv2=function(c,d){var a=document.getElementById("placeholderHiddenControls");var b=document.createElement("input");b.setAttribute("type","hidden");b.setAttribute("id","cvv2_"+c);b.setAttribute("name","cvv2_"+c);b.setAttribute("value",d);a.appendChild(b);};SB.funding.cardWithdraw.createHiddenCurrencyCode=function(d,a){var b=document.getElementById("placeholderHiddenControls");var c=document.createElement("input");c.setAttribute("type","hidden");c.setAttribute("id","currencyCode_"+d);c.setAttribute("name","currencyCode_"+d);c.setAttribute("value",a);b.appendChild(c);};SB.funding.cardWithdraw.stopWithdrawOnExpiredCard=function(a,l){var e=new Date();var b=false;var d=e.getMonth();var c=e.getFullYear();var h=a.innerHTML;var f=l.innerHTML;if(f>c){}else{if(f==c){if(h<d){b=true;}}else{b=true;}}var k=document.getElementById(fundingGlobals.card.wActiveCardLink);var g=document.getElementById(fundingGlobals.card.wExpiredCardLink);if(b){k.style.display="none";g.style.display="";}else{k.style.display="";g.style.display="none";}};SB.Login=function(a){this.balanceUrl="/misc/webservices/funding/balanceservice.aspx";this.div=a;this.triggerLoginStatus();this.setupBalanceRefresh();this.setupUserStateRefresh();};SB.Login.prototype={triggerLoginStatus:function(){var a=this;$("input.loginStatus",a.div).each(function(){SB.EventHub.trigger("login-status",$(this).val());});},setupBalanceRefresh:function(){var a=this;SB.EventHub.bind("balance-refresh",function(b){if(a!=b){a.forceBalance(b.forceRefresh==true);}});},setupUserStateRefresh:function(){var a=this;if($(a.div).hasClass("inPlayLoginBox")){SB.EventHub.bind("user-state-refresh",function(b){if(a!=b){window.location.href=window.location.href;}});}},forceBalance:function(c){var a=this;var b={type:"GET",url:this.balanceUrl+"?forceRefresh="+c+"&cacheBuster="+new Date().getTime(),success:function(e,d){a.refreshBalance(e);},error:function(){alert("error");}};jQuery.ajax(b);},refreshBalance:function(b){var a=this;var c=$("string",b).text();$("span.balance",a.div).html(c);}};$(document).ready(function(){$("div.loginBox").each(function(){new SB.Login(this);});});SB.ui.WebTrends=function(a){if(typeof(a)!="undefined"){this.trackingFunction=a;}else{if(typeof(dcsMultiTrack)!="undefined"){this.trackingFunction=dcsMultiTrack;}else{this.trackingFunction=function(){};}}};SB.ui.WebTrends.prototype={trackUserEvent:function(b,c,d){try{this.trackingFunction("WT.ti",b,"WT.si_n",c,"WT.si_p",d);}catch(a){}},trackEvent:function(a){try{this.trackingFunction("DCS.dcsuri",a.pageUrl,"WT.ti",a.pageTitle,"WT.cg_n",a.contentGroup,"WT.cg_s",a.contentSubGroup,"WT.si_n",a.scenarioReport,"WT.si_p",a.scenarioReportStep,"DCSext.login",a.dcsextLogin);}catch(b){}}};SB.ui.Gomez=function(gomezPageId){var gomez={gs:new Date().getTime(),acctId:"62CFD0",pgId:gomezPageId,grpId:""};window.gomez=gomez;gomez=gomez?gomez:{};gomez.h3=function(d,s){for(var p in s){d[p]=s[p];}return d;};gomez.h3(gomez,{b3:function(r){if(r<=0){return false;}return Math.random()<=r&&r;},b0:function(n){var c=document.cookie;var v=c.match(new RegExp(";[ ]*"+n+"=([^;]*)"));if(!v){v=c.match(new RegExp(n+"=([^;]*)"));}if(v){return unescape(v[1]);}return"";},c2:function(n,v,e,p,d,s){try{var t=this,a=location.hostname;var c=n+"="+escape(v)+(e?";expires="+e.toGMTString():"")+(p?";path="+p:";path=/")+(d?";domain="+d:";domain="+a)+(s?";secure":"");document.cookie=c;}catch(e){}},z0:function(n){var t=this;if(n){var s=t.b0("__g_c");if(!s){return"";}var v=s.match(new RegExp(n+":([^|]*)"));if(v){return unescape(v[1]);}return"";}else{return"";}},z1:function(n,m){var t=this;if(n){var s=t.b0("__g_c");if(s){if(s.indexOf(n+":")!=-1){s=s.replace(new RegExp("("+n+":[^|]*)"),n+":"+m);}else{s=s==" "?n+":"+m:s+"|"+n+":"+m;}t.c2("__g_c",s);}else{t.c2("__g_c",n+":"+m);}}}});if(gomez.wrate){gomez.i0=gomez.z0("w");if(gomez.i0){gomez.runFlg=parseInt(gomez.i0)>0?true:false;}else{if(gomez.b3(parseFloat(gomez.wrate))){gomez.runFlg=true;gomez.z1("w",1);}else{gomez.runFlg=false;gomez.z1("w",0);}}}else{if(gomez.wrate==undefined){gomez.runFlg=true;gomez.z1("w",1);}else{gomez.runFlg=false;gomez.z1("w",0);}}if(gomez.runFlg){gomez.h1=function(v,d){return v?v:d;};gomez.gs=gomez.h1(gomez.gs,new Date().getTime());gomez.acctId=gomez.h1(gomez.acctId,"");gomez.pgId=gomez.h1(gomez.pgId,"");gomez.grpId=gomez.h1(gomez.grpId,"");gomez.E=function(c){this.s=c;};gomez.E.prototype={g1:function(e){var t=gomez,i=t.g6(e);if(i){i.e=t.b5();}}};gomez.L=function(m){this.a=m;};gomez.L.prototype={g2:function(m){var t=gomez,n=t.b5();var s=document.getElementsByTagName(m);var e=t.k;if(m=="script"){e=t.j;}if(m=="iframe"){e=t.l;}if(s){var l=s.length;for(var i=0;i<l;i++){var u=s[i].src||s[i].href;if(u&&!e[u]){var r=new gomez.E(e);t.grm[u]=r;e[u]=new t.c7(u,n);if(t.gIE&&m=="script"){t.e2(s[i],"readystatechange",t.d2,false);}else{t.e2(s[i],"load",r.g1,false);}}}}}};gomez.L.m=new Object;gomez.L.m.script=new gomez.L();gomez.L.m.link=new gomez.L();gomez.L.m.iframe=new gomez.L();gomez.S=function(){var t=this,h=gomez.acctId+".r.axf8.net";t.x=location.protocol+"//"+h+"/mr/b.gif?";t.y=location.protocol+"//"+h+"/mr/a.gif?";};gomez.h2=function(){var t=this;t.gIE=false;t.f=new Object;t._h=0;t.j=new Object;t.k=new Object;t.l=new Object;t.m=location.href;t.p=-1;t.q=-1;t.t=new Array;t.u=new Array;t._w=false;t.gSfr=/KHTML|WebKit/i.test(navigator.userAgent);t.gc={n:"c"};t.grm=new Object;t.b;t.a=0;t.d=false;t.x=false;t.s=new gomez.S;t._a=false;t.h6=false;};gomez.h3(gomez,{h5:function(u){try{var s=document.createElement("script");s.src=u;s.type="text/javascript";if(document.body){document.body.appendChild(s);}else{if(document.documentElement.getElementsByTagName("head")[0]){document.documentElement.getElementsByTagName("head")[0].appendChild(s);}}}catch(e){}},a9:function(){var t=gomez,i=t.z0("a"),g=t.b0("__g_u");t.gc.h=t.z0("b");if(!t.gc.h){t.gc.h=1;}t.z1("b",parseInt(t.gc.h)+1);if(i){t.a=parseInt(i);if(t.a==1){t._w=true;}else{if(t.a==3){t.x=true;t._w=true;}}t.d=true;t.gc.c=t.z0("c");t.gc.d=t.z0("d");t.gc.i=t.z0("e");t.gc.j=t.z0("f");if(t._w&&!t._a){t.h7();t._a=true;}}else{if(!t.gc.a){return;}var s="v=1";t.c2("__g_u","1",new Date(t.gt()+1000));if(t.b0("__g_u")&&g&&g!="1"&&g.indexOf("NaN")==-1&&g.indexOf("undefined")==-1){s="v=0";var r=g.split("_");t.b2(parseInt(r[0]),parseInt(r[1])+1);if(r[4]&&r[4]!="0"&&t.gt()<parseInt(r[5])&&r[2]&&r[2]!="0"){t.b1(parseFloat(r[2]),parseFloat(r[3]),parseFloat(r[4]),parseInt(r[5]));return;}}t.h6=true;s=t.s.y+"a="+t.gc.a+"&"+s;if(t.gSfr){document.write("<script src='"+s+"'><\/script>");}else{t.h5(s);}}t.b=t.z0("g");},h7:function(){var t=gomez,u=t.tloc?t.tloc:location.protocol+"//"+t.acctId+".t.axf8.net/js/gtag4.js";if(t.gSfr){document.write("<script src='"+u+"'><\/script>");}else{t.h5(u);}},b1:function(v,s,q,f){var t=this;if(t._a){return;}if(t.b3(v)){t._w=true;t.a=1;var p=parseFloat(s/v);if(t.b3(p)){t.x=true;t.a=3;}}t.d=true;t.z1("a",t.a);t.z1("e",v);t.z1("f",s);t.gc.i=v;t.gc.j=s;t.h4(v,s,q,f);if(t._w){t.h7();t._a=true;}},b2:function(v,s){var t=this,f=new Date(t.gt()+946080000000),g=""+v+"_"+s;if(t._a){return;}t.c2("__g_u",g,f);t.gc.c=v;t.gc.d=s;t.z1("c",v);t.z1("d",s);},h4:function(o,p,q,d){var t=this,f=new Date(t.gt()+946080000000),g=t.b0("__g_u");if(g&&g!="1"&&g.indexOf("NaN")==-1&&g.indexOf("undefined")==-1){var r=g.split("_"),s;if(d){s=d;}else{if(q&&q>=0){s=new Date(t.gt()+parseInt(q*86400000)).getTime();}else{q=5;s=new Date(t.gt()+432000000).getTime();}}g=""+r[0]+"_"+r[1]+"_"+o+"_"+p+"_"+q+"_"+s;t.c2("__g_u",g,f);}},gt:function(){return new Date().getTime();},b5:function(){return new Date().getTime()-gomez.gs;},b6:function(){var t=gomez;t.p=t.b5();},f8:function(){var t=this;if(t.pollId1){clearInterval(t.pollId1);}if(t.pollId2){clearInterval(t.pollId2);}if(t.pollId3){clearInterval(t.pollId3);}if(t.pollId4){clearInterval(t.pollId4);}},b7:function(){var t=gomez;t.f8();t.q=t.b5();},c7:function(u,s){var t=this;t.m=u;t.s=s;},c8:function(){var t=gomez,n=t.b5(),l=document.images.length;if(l>t._h){for(var i=t._h;i<l;++i){var u=document.images[i].src;if(u){var r=new gomez.E(t.f);t.grm[u]=r;t.f[u]=new t.c7(u,n);t.e2(document.images[i],"load",t.c4,false);t.e2(document.images[i],"error",t.c5,false);t.e2(document.images[i],"abort",t.c6,false);}}}t._h=l;},c4:function(e){var t=gomez,i=t.g6(e);if(i){i.e=t.b5();}},c5:function(e){var t=gomez,i=t.g6(e);if(i){i.e=t.b5();i.b=1;}},c6:function(e){var t=gomez,i=t.g6(e);if(i){i.a=t.b5();}},g6:function(e){var t=gomez,e=window.event?window.event:e,a=t.d8(e),i;if(t.grm[a.src||a.href]&&t.grm[a.src||a.href].s){i=t.grm[a.src||a.href].s[a.src||a.href];}return i;},d2:function(){var t=gomez;var e=window.event?window.event:e,s=t.d8(e);if(s.readyState=="loaded"||s.readyState=="complete"){var o=t.j[s.src];if(o){o.e=t.b5();}}},setPair:function(name,value){var t=this;t.t[t.t.length]={n:"p",a:name,b:value};},nameEvent:function(n){var t=this;t.f6(n,1);},startInterval:function(n){var t=this;t.f6(n,2,1);},endInterval:function(n){var t=this;t.f6(n,2,2);},f6:function(n,p,b){if(n&&n.length>20){n=n.substring(0,20);}var t=this,f=t.u;f[f.length]={n:"a",a:n,b:t.b5(),e:p,f:b};},d8:function(e){if(gomez.gIE){return e.srcElement||{};}else{return e.currentTarget||e.target||{};}},e2:function(e,p,f,c){var n="on"+p;if(e.addEventListener){e.addEventListener(p,f,c);}else{if(e.attachEvent){e.attachEvent(n,f);}else{var x=e[n];if(typeof e[n]!="function"){e[n]=f;}else{e[n]=function(a){x(a);f(a);};}}}},i1:function(){var d=window.document,done=false,i2=function(){if(!done){done=true;gomez.b6();gomez.a9();}};(function(){try{d.documentElement.doScroll("left");}catch(e){setTimeout(arguments.callee,50);return;}i2();})();d.onreadystatechange=function(){if(d.readyState=="complete"){d.onreadystatechange=null;i2();}};},g7:function(){try{var t=gomez;t.gc.a=t.acctId;
/*@cc_ont.gIE = true; @*/
if(t.gIE){t.i1();window.attachEvent("onload",t.b7);}else{if(t.gSfr){var m=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(m);delete m;t.b6();t.b7();}},10);}else{if(window.addEventListener){window.addEventListener("DOMContentLoaded",t.b6,false);window.addEventListener("load",t.b7,false);}else{return;}}}t.c8();t.pollId1=setInterval(t.c8,1);gomez.L.m.link.g2("link");t.pollId3=setInterval("gomez.L.m['link'].g2('link')",1);gomez.L.m.iframe.g2("iframe");t.pollId4=setInterval("gomez.L.m['iframe'].g2('iframe')",1);if(!t.gIE){t.a9();}}catch(e){return;}}});gomez.h2();gomez.g7();}};SB.ui.GomezAjax=function(a){this.gomezPageId=a;this.gomezAjax=gomez;};SB.ui.GomezAjax.prototype={ajaxStart:function(){this.gomezAjax.startInterval(this.gomezPageId);},ajaxFinish:function(){this.gomezAjax.endInterval(this.gomezPageId);}};var ieDOM=false,nsDOM=false;var stdDOM=document.getElementById;initMethod=function(){if(!stdDOM){ieDOM=document.all;if(!ieDOM){nsDOM=((navigator.appName.indexOf("Netscape")!=-1)&&(parseInt(navigator.appVersion)==4));}}passwordChanged();};getObject=function(a){if(stdDOM){return document.getElementById(a);}if(ieDOM){return document.all[a];}if(nsDOM){return document.layers[a];}};getObjectStyle=function(a){if(nsDOM){return getObject(a);}var b=getObject(a);return b.style;};showDefault=function(a){showCell(a,"#E2E2E2","#E2E2E2");};showCell=function(a,c,b){getObjectStyle(a).color=c;getObjectStyle(a).backgroundColor=b;};changeCells=function(a,b){b=(b/5);b=b+1;for(i=1;i<b;i++){showCell("TD"+i,"Black",a);}for(i=b;i<21;i++){showDefault("TD"+i);}};showVeryPoor=function(b,a){changeCells("#EE0000",b);};showPoor=function(b,a){changeCells("#FF6103",b);};showAverage=function(b,a){changeCells("#FFE303",b);};showGood=function(b,a){changeCells("#98FB98",b);};showStrong=function(b,a){changeCells("#228B22",b);};showUndetermined=function(){showVeryPoor(0,"#EE0000");};passwordChanged=function(g,k,e,a,d,o){var m=0;var h=k;var f=new RegExp("(?=.*[A-Z])(?=.*[a-z]).*","g");var c=new RegExp("(?=.*[0-9]).*","g");var b=new RegExp("(?=.*[_]).*","g");var l=document.getElementById(g).value;m=l.length*5;if(f.test(l)){m=m+20;}if(c.test(l)){m=m+15;}if(b.test(l)){m=m+10;}if(m<31){showVeryPoor(m);}else{if(m<46){showPoor(m);h=e;}else{if(m<66){showAverage(m);h=a;}else{if(m<91){showGood(m);h=d;}else{if(m>90){h=o;if(m>100){m=100;}showStrong(m);}else{showVeryPoor(m);}}}}}document.getElementById("txtDisplay").innerHTML=h;};if(typeof SB=="undefined"){var SB={};}if(typeof SB.sharedWallet=="undefined"){SB.sharedWallet={};}SB.accounts.Login=function(){};SB.accounts.Login.BindPopup=function(){$("div.loginContent").each(function(){var a=new SB.sharedWallet.LoginPopup(this);a.setupEnterSubmit();a.bindLoginClick();});};SB.sharedWallet.LoginPopup=function(a){this.div=a;};SB.sharedWallet.LoginPopup.prototype={setupEnterSubmit:function(){var a=this;$("input").keydown(function(b){if(b.keyCode==13){a.handleLogin();return false;}});},bindLoginClick:function(){var a=this;$("#modCustLoginIFrameLogin").click(function(){a.handleLogin();});},handleLogin:function(){$("#requestedPopupUrl").val(popUpDivURL);new SB.sharedWallet.AhahFormSubmitter("#dvpage form[name='loginBox']").withHoldingDivEnabled(true).withSuccessTarget("#popLayer1").execute();return false;}};$(document).ready(function(){$("#modCustLoginLogin").click(function(){$("form[name='loginBox']").submit();return false;});$("#modCustLoginLogout").click(function(){$("form[name='logout']").submit();return false;});$("#modCustLoginRegister").click(function(){var a=location.href.split(":")[0];var b=$(this).attr("popup");if(a=="http"){SB.base.deferWindowCommand(b+"","popup",false);}else{SB.base.OpenDivCheckLoginStatus(b+"","popBadSelect1","popVeil1","popLayer1",false);}return false;});$("#modCustLoginForgottenPw.notOnHttps").click(function(){SB.base.deferWindowCommand(this.href+"","popup",false);return false;});$("#modCustLoginForgottenPw.onHttps").click(function(){SB.base.OpenDivCheckLoginStatus(this.href+"","popBadSelect1","popVeil1","popLayer1",false);return false;});$("#usernameLabel").focus(function(){$(this).hide();$("#modCustLoginUsername").show().focus();});$("#passwordLabel").focus(function(){$(this).hide();$("#modCustLoginPassword").show().focus();});$("#modCustLoginUsername").blur(function(){if(this.value==""){$(this).hide();$("#usernameLabel").show();}});$("#modCustLoginPassword").blur(function(){if(this.value==""){$(this).hide();$("#passwordLabel").show();}});$('input[name="showThePopup"]').each(function(){SB.base.OpenDiv(this.value,"popBadSelect1","popVeil1","popLayer1");});});if(typeof SB=="undefined"){var SB={};}if(typeof SB.sharedWallet=="undefined"){SB.sharedWallet={};}SB.sharedWallet.AhahRequest=function(){this.serverErrorSelector="#unhandledServerError";};SB.sharedWallet.AhahRequest.prototype={MakeGeneralAhahRequest:function(c,b){var a=this;$.ajax({url:c,type:"POST",success:b});},MakeInlineErrorHandledRequest:function(c,d,b){var a=this;$.ajax({url:c,type:"POST",success:b,error:function(f){var e=$(a.serverErrorSelector);$(d).html(e.html());}});},MakeInlineErrorHandledDivReplacementWithProcessingImg:function(c,d,b){var a=this;$(d).html("<img src='/modules/customer/myAccounts/loader/ajax-loader-round.gif' style='margin-left: 250px; margin-top: 50px;margin-bottom: 50px;' alt='Loading Content'/>");$.ajax({url:c,type:"POST",success:function(e,f){b(e,f);},error:function(f){var e=$(a.serverErrorSelector);$(d).html(e.html());}});},PostPopupFormWithDefaultErrorHandling:function(d,b){var a=this;var c=$(d);SB.base.holdingDiv("show");c.ajaxForm({success:function(e){SB.base.holdingDiv("hide");if(b){b(e);}else{$("#popupContent").html(e);}},error:function(e){SB.base.holdingDiv("hide");a.popupErrorHandler("#popLayer2",2);}});c.submit();},popupErrorHandler:function(b,a){$(b).html($(this.serverErrorSelector).html());$(".popupHead a",b).attr("id","closeServerError");$(".popupHead a",b).removeAttr("onclick");$("a#closeServerError",b).click(function(){SB.base.divPopUp(a,"hide");return false;});SB.base.divPopUp(a,"show");SB.base.centerPopWin(a);},defaultDivErrorHandler:function(a){var b=$(this.serverErrorSelector);$(a).html(b.html());},defaultDivSuccessHandler:function(b,a){$(b).html(a);}};SB.sharedWallet.AhahRequest=new SB.sharedWallet.AhahRequest();SB.sharedWallet.AhahDivReplacer=function(a,b){this.url=a;this.targetDiv=b;this.postSuccessHandler=function(){};this.postErrorHandler=function(){};this.successHandler=SB.sharedWallet.AhahRequest.defaultDivSuccessHandler;this.errorHandler=SB.sharedWallet.AhahRequest.defaultDivErrorHandler;this.hasProcessingImg=false;this.processingHandler=function(){};};SB.sharedWallet.AhahDivReplacer.prototype={withPostSuccessHandler:function(a){this.postSuccessHandler=a;return this;},withSuccessHandler:function(a){this.successHandler=a;return this;},withErrorHandler:function(a){this.errorHandler=a;return this;},withPostErrorHandler:function(a){this.postErrorHandler=a;return this;},withFrameErrorHandler:function(){this.errorHandler=function(a){SB.sharedWallet.AhahRequest.popupErrorHandler("#popLayer2",2);};return this;},withProcessingImg:function(){this.hasProcessingImg=true;return this;},withProcessingHandler:function(a){this.processingHandler=a;return this;},execute:function(){var a=this;if(this.hasProcessingImg){$(this.targetDiv).html("<img src='/modules/customer/myAccounts/loader/ajax-loader-round.gif' style='margin-left: 250px; margin-top: 50px;margin-bottom: 50px;' alt='Loading Content'/>");}else{this.processingHandler();}$.ajax({url:a.url,type:"GET",success:function(b){a.successHandler(a.targetDiv,b);a.postSuccessHandler(b);},error:function(b){a.errorHandler(a.targetDiv);a.postErrorHandler(b);}});}};SB.sharedWallet.AhahFormSubmitter=function(a){this.formSelector=a;this.successHandler=function(b){$("#popupContent").html(b);};};SB.sharedWallet.AhahFormSubmitter.prototype={withSuccessHandler:function(a){this.successHandler=a;this.holdingDivEnabled=true;return this;},withSuccessTarget:function(a){this.successHandler=function(b){$(a).html(b);};return this;},withHoldingDivEnabled:function(a){this.holdingDivEnabled=a;return this;},execute:function(){var a=this;var b=$(this.formSelector);this.holdingDivIfRequired("show");b.ajaxForm({success:function(c){a.holdingDivIfRequired("hide");a.successHandler(c);SB.base.centerPopWin();},error:function(c){a.holdingDivIfRequired("hide");SB.sharedWallet.AhahRequest.popupErrorHandler("#popLayer2",2);SB.base.centerPopWin();}});b.submit();},holdingDivIfRequired:function(a){if(this.holdingDivEnabled){SB.base.holdingDiv(a);}}};
