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="Adresse nicht gefunden, bitte versuchen Sie es erneut.";var bubble_info_select="Bitte bestätigen Sie Ihre Adresse, indem Sie eine der Adressen wählen und diese über 'diese Adresse verwenden' bestätigen.";var bubble_info_UsernameExists="Es tut uns leid, Ihr gewählter Benutzername ist bereits vergeben. Bitte wählen Sie einen anderen.";var bubble_info_UsernameRequired="Bitte Ihren Benutzernamen eintragen. Dieser ist Klein/Großschreibungsempfindlich, muss 6-12 Zeichen lang sein und kann nur Buchstaben, Nummern und Unterstriche enthalten.";var bubble_info_UsernameInfo="Ihr Benutzername ist Klein/Großschreibungsempfindlich, muss 6-12 Zeichen lang sein und kann nur Buchstaben, Nummern und Unterstriche enthalten.";var userNameInValid="ungültig";SB.customer.registration.setKeyword=function(){if(document.getElementById("registration_modCustRegKeyword")!=null){var f=document.getElementById("registration_modCustRegKeyword").value;if(f!=null&&f!=""){var d=new SB.customer.registration.KeywordHandler(f);var e=new AjaxService(d);e.GetRequest("/misc/webServices/registration/TrackingService.aspx?action=keyword&item="+encodeURIComponent(f));e=null;d=null;}else{SB.customer.registration.ShowHowHear();}}};SB.customer.registration.KeywordHandler=function(b){this.avoidCaching=true;this.traceLevel=3;this.process=function(a){if(a.xmlHttp.responseXML!=null&&a.xmlHttp.responseXML.documentElement!=null){if(a.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 b=document.getElementById(registration.trHowHearMain);if(b!=null){if(b.style.display=="none"&&document.getElementById("registration_modCustRegDdlTrackingMain")!=null){SB.base.ShowRow(registration.trHowHearMain);}}};SB.customer.registration.setTrackingSelectSub=function(){var h=document.getElementById("registration_modCustRegDdlTrackingMain").value;var l=document.getElementById("registration_modCustRegDdlTrackingSub");if(h==null||l==null){return;}var k=false;for(var o=0;o<registration.trackingMenuArray.length;o++){if(registration.trackingMenuArray[o]==h){SB.base.RemoveAllOptions(l);childArray=registration.trackingMenuSubArray[o];for(var m=0;m<childArray.length;m++){var g=childArray[m];if(g=="RADIO MARCA"){today=new Date();if(today.getDay()>15){g="R MARCA NACIONAL";}}SB.base.AddOption(l,g,childArray[m]);k=true;}}}if(k==true){if(document.getElementById("ddlTrackingLabel")!=null){document.getElementById("ddlTrackingLabel").innerHTML=h;}SB.base.ShowRow(registration.trHowHearSub);}else{SB.base.RemoveAllOptions(l);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(){Global_processingMessage="laden...";var f=document.getElementById("registration_modCustRegDdlCountry").value;var d=new SB.customer.registration.CountryHandler(f);var e=new AjaxService(d);e.GetRequest("/misc/webServices/registration/CountryService.aspx?item="+f,null);e=null;d=null;};SB.customer.registration.CountryHandler=function(f){this.avoidCaching=true;this.traceLevel=3;var e=document.getElementById("registration_modCustRegBtnCountry");var c=document.getElementById("registration_txtLastCountry");this.process=function(d){if(d.xmlHttp.responseXML!=null){var b=d.xmlHttp.responseXML.documentElement;}if(b!=null){var h=b.getElementsByTagName("addressLookup")[0];if(typeof(h)!="undefined"&&h!=null){var a=b.getElementsByTagName("addressLookup")[0].childNodes[0].nodeValue;}if(b.childNodes.length>0||a=="true"){c.value="true";e.click();}else{if(c.value=="true"){c.value="false";e.click();}else{if(document.getElementById("registration_modCustRegAddress")!=null){document.getElementById("registration_modCustRegAddress").focus();}}}}};};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(b){if(/^[\w\s\-]*$/i.test(b)){return true;}else{return false;}};SB.customer.registration.ValidatePostcode=function(b){if(/^[a-z\s\d]*$/i.test(b)){return true;}else{return false;}};SB.customer.registration.getAddressLookupList=function(p){var m=document.getElementById("registration_modCustRegDoorNumber").value;var o=document.getElementById("registration_modCustRegPostcode").value;var k=document.getElementById("registration_ico_doorNumber");var l=document.getElementById("registration_ttt_doorNumber");Global_processingMessage="Bitte warten Sie während wir Ihre Adresse in unserem System suchen.";Global_processingTitle="Adresse wird gesucht";SB.base.holdingDiv("show");if(SB.customer.registration.ValidateDoorNumber(m)&&SB.customer.registration.ValidatePostcode(o)){var q=new SB.customer.registration.AddressLookupCallback(p);var h=new AjaxService(q);h.GetRequest("/misc/webServices/registration/AddressLookUpService.aspx?doorNumber="+m+"&postcode="+o);h=null;q=null;}else{SB.base.holdingDiv("hide");SB.base.initializeTooltip(k,l,bubble_info_unavailable);}};SB.customer.registration.AddressLookupCallback=function(g){this.avoidCaching=true;this.traceLevel=3;var e=false;var f=new Array();var h=0;this.process=function(s){var q=s.xmlHttp.responseXML;if(q!=null&&q.documentElement!=null){if(q.documentElement.childNodes.length>0){e=true;for(var t=0;t<q.documentElement.childNodes.length;t++){var c=q.documentElement.childNodes[t];if(c.hasChildNodes()&&c.firstChild.nodeType==3){f[h]=c.firstChild.nodeValue;h++;}}if(f.length==1){SB.customer.registration.setAddressInFields(f[0]);if(g){SB.customer.registration.dopostback();}}else{SB.customer.registration.showAddressLookUpResults();var d=new RegExp(", ,","g");for(var r=0;r<f.length;r++){var u=f[r].replace(d,",");SB.base.AddOption(document.getElementById("AddressLookUpListbox"),u,f[r]);}}}}if(e==false){var b=document.getElementById("registration_ico_doorNumber");var a=document.getElementById("registration_ttt_doorNumber");SB.base.holdingDiv("hide");SB.base.initializeTooltip(b,a,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(c){var d=c.split(",");document.getElementById("registration_modCustRegAddress").value=SB.base.TrimString(d[0]);document.getElementById("registration_modCustRegAddressTwo").value=SB.base.TrimString(d[1]);document.getElementById("registration_ico_address").className="icons";document.getElementById("registration_modCustRegCity").value=SB.base.TrimString(d[2]);document.getElementById("registration_ico_city").className="icons";document.getElementById("registration_modCustRegCounty").value=SB.base.TrimString(d[3]);document.getElementById("registration_ico_county").className="icons";document.getElementById("registration_modCustRegPostcode").value=SB.base.TrimString(d[4]);document.getElementById("registration_ico_postCode").className="icons";SB.customer.registration.hideAddressLookUp();SB.customer.registration.showFullAddress();};SB.customer.registration.selectAddress=function(){var e=document.getElementById("registration_ico_AddressLookUpListbox");var h=document.getElementById("registration_ttt_AddressLookUpListbox");var f=document.getElementById("AddressLookUpListbox");if(f!=null){if(f.selectedIndex==-1){SB.base.initializeTooltip(e,h,bubble_info_select);}else{var g=f.options[f.selectedIndex].value;SB.customer.registration.setAddressInFields(g);}}};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 c=document.getElementById("registration_modCustRegDoorNumber");var d=document.getElementById("registration_modCustRegAddress");if(c!=null&&d.value==""){document.getElementById("registration_modCustRegAddress").value=c.value;}};SB.customer.registration.doPostbackWrapper=function(b){if(b.attributes["class"].value=="disableClick"){return;}SB.customer.registration.dopostback();};SB.customer.registration.dopostback=function(){var h=document.getElementById("registration_modCustRegAddress").value;var l=document.getElementById("registration_modCustRegPostcode").value;var f=document.getElementById("registration_ico_AddressLookUpListbox");var k=document.getElementById("registration_ttt_AddressLookUpListbox");if(document.getElementById("trAddressLookupList").style.display!="none"){var g=document.getElementById("AddressLookUpListbox");if(g.selectedIndex>-1){SB.customer.registration.setAddressInFields(g.options[g.selectedIndex].value);}else{if(g.options.length>0&&document.getElementById("trAddressOne").style.display=="none"){if(f!=null&&k!=null){SB.base.initializeTooltip(f,k,bubble_info_select);}return;}}}else{if(l!=""&&(document.getElementById("AddressLookUpLink").style.display=="block")&&h==""){SB.customer.registration.getAddressLookupList(true);if(f!=null&&k!=null){SB.base.initializeTooltip(f,k,bubble_info_select);}return;}else{if(l!=""&&(document.getElementById("AddressLookUpLink").style.display=="none")&&h==""){SB.customer.registration.getAddressLookupList(false);SB.customer.registration.showAddressLookup();if(f!=null&&k!=null){SB.base.initializeTooltip(f,k,bubble_info_select);}return;}}}__doPostBack("registration$modCustRegisterButton","");};SB.customer.registration.getUsernameCheck=function(u){try{var r=u.value;var m=document.getElementById("registration_ico_username");var s=document.getElementById("registration_ttt_username");if(r!=null&&r!=""){var p=new SB.customer.registration.UsernameCheckHandler(u);var q=new AjaxService(p);var l=encodeURIComponent(r);q.GetRequest("/misc/webServices/registration/UsernameCheckService.aspx?username="+escape(l),null);q=null;p=null;}else{var t="Bitte Ihren Benutzernamen eintragen. Dieser ist Klein/Großschreibungsempfindlich, muss 6-12 Zeichen lang sein und kann nur Buchstaben, Nummern und Unterstriche enthalten.";m.className="icons icoError";s.className="toolTipText tttError";SB.base.removeExistingTooltipMessage(s);SB.base.createTooltipMessageTag(s,t);if(u.className.indexOf("usrNameTaken")==-1){u.className=(u.className+" usrNameTaken").replace(/^ /,"");}}}catch(o){util.Trace(this.responseHandler.traceLevel,"SB.customer.registration.getUsernameCheck: error = "+o);}};SB.customer.registration.UsernameCheckHandler=function(b){this.avoidCaching=true;this.traceLevel=3;this.process=function(r){if(document.getElementById("registration_ico_username")!=null){var o=document.getElementById("registration_ico_username");}if(document.getElementById("registration_ttt_username")!=null){var p=document.getElementById("registration_ttt_username");}if(r.xmlHttp.responseXML!=null){var m=r.xmlHttp.responseXML.documentElement;}if(m!=null){var l=m.getElementsByTagName("available")[0];if(typeof(l)!="undefined"&&l!=null){var q=m.getElementsByTagName("available")[0].childNodes[0].nodeValue;}if(m.childNodes.length>0&&q=="false"){var s="Es tut uns leid, Ihr gewählter Benutzername ist bereits vergeben. Bitte wählen Sie einen anderen.";o.className="icons icoError";p.className="toolTipText tttError";SB.base.removeExistingTooltipMessage(p);SB.base.createTooltipMessageTag(p,s);if(b.className.indexOf("usrNameTaken")==-1){b.className=(b.className+" usrNameTaken").replace(/^ /,"");}}else{if(m.childNodes.length>0&&q==userNameInValid){o.className="icons icoError";p.className="toolTipText tttError";SB.base.removeExistingTooltipMessage(p);SB.base.createTooltipMessageTag(p,r.xmlHttp.responseXML.documentElement.getElementsByTagName("validationErrorMessage")[0].childNodes[0].nodeValue);if(b.className.indexOf("usrNameTaken")==-1){b.className=(b.className+" usrNameTaken").replace(/^ /,"");}}else{var a="Ihr Benutzername ist Klein/Großschreibungsempfindlich, muss 6-12 Zeichen lang sein und kann nur Buchstaben, Nummern und Unterstriche enthalten.";o.className="icons icoInfo";p.className="toolTipText tttInfo";SB.base.removeExistingTooltipMessage(p);SB.base.createTooltipMessageTag(p,a);b.className=b.className.replace(/usrNameTaken/,"").replace(/ $/,"");}}}};};SB.customer.registration.SetTextMessageOption=function(){var d=document.getElementById("registration_modCustRegCbxSmsContact");var e=document.getElementById("registration_modCustRegMobile");if(d!=null&&e!=null){var f=/\S/;if(f.test(e.value)){d.checked="true";}else{d.checked="";}}};SB.customer.registration.setGlobalProcessingMessage=function(){Global_processingMessage="laden...";};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>laden...</p>";Global_processingTitle="Bitte einen Moment warten...";var c="";if(SB.accounts.getSelectedWithdrawPaymentMethod().indexOf("separator")==0){var d="/t/funding/WithdrawalPopUp.aspx";SB.base.RecallOpenDiv(d,"popBadSelect1","popVeil1","popLayer1");}else{if(SB.accounts.isUserWithdrawPaymentAccountSelected()){c="currentPPID="+SB.accounts.getCurrentWithdrawPPID()+"&userPaymentAccountID="+SB.accounts.getUserWithdrawPaymentAccountID();}else{c="currentPPID="+SB.accounts.getCurrentWithdrawPPID();}var d="/t/funding/WithdrawalPopUp.aspx?"+c;SB.base.RecallOpenDiv(d,"popBadSelect1","popVeil1","popLayer1");}};SB.accounts.loadManageCard=function(){var c="";if(SB.accounts.isUserWithdrawPaymentAccountSelected()){c="currentPPID="+SB.accounts.getCurrentWithdrawPPID()+"&userPaymentAccountID="+SB.accounts.getUserWithdrawPaymentAccountID();}else{c="currentPPID="+SB.accounts.getCurrentWithdrawPPID();}var d="/t/funding/ManageCardPopup.aspx?"+c;SB.base.RecallOpenDiv(d,"popBadSelect1","popVeil1","popLayer1");};SB.accounts.isUserWithdrawPaymentAccountSelected=function(){if(SB.accounts.getSelectedWithdrawPaymentMethod().indexOf("userPaymentAccounts")>=0){return true;}else{return false;}};SB.accounts.loadDepositCard=function(){var c="";if(SB.accounts.isUserWithdrawPaymentAccountSelected()){c="currentPPID="+SB.accounts.getCurrentWithdrawPPID()+"&userPaymentAccountID="+SB.accounts.getUserWithdrawPaymentAccountID();}else{c="currentPPID="+SB.accounts.getCurrentWithdrawPPID();}var d="/t/funding/depositPopup.aspx?"+c;SB.base.RecallOpenDiv(d,"popBadSelect1","popVeil1","popLayer1");};SB.accounts.closePage=function(b){if(b=="deposit"){SB.accounts.loadDepositCard();}else{SB.base.divPopUp(1,"hide");}};SB.accounts.getSelectedWithdrawPaymentMethod=function(){var c=document.getElementById("modFundingDepositddlPaymentMethod");var d=c.options[c.selectedIndex].value;return d;};SB.accounts.getCurrentWithdrawPPID=function(){var d=SB.accounts.getSelectedWithdrawPaymentMethod();var e=d.split(".");var f=e[1];return f;};SB.accounts.getUserWithdrawPaymentAccountID=function(){var d=SB.accounts.getSelectedWithdrawPaymentMethod();var f=d.split(".");var e=f[2];if(SB.accounts.isUserWithdrawPaymentAccountSelected()){e=f[2];}return e;};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(f,e){var d=new Object();d.timeout=10000;d.textonly=true;d.Content=e;d.errorHandler=SB.customer.myAccounts.ErrorHandler;HTTP.get(f,SB.customer.myAccounts.CallBackLoadContent,d);};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(d,e,f){if(f.Content){errorInnerHtml=document.getElementById("unhandledServerError").innerHTML;document.getElementById(f.Content).innerHTML=errorInnerHtml;}else{alert(d+": "+e);}};SB.customer.myAccounts.Funding=function(b){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(b){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(b){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(b){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(b){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(b){this.avoidCaching=true;this.traceLevel=3;this.process=function(a){if(a.xmlHttp.responseXML!=null&&a.xmlHttp.responseXML.documentElement!=null){if(a.xmlHttp.responseXML.documentElement.childNodes.length>0){if(a.xmlHttp.responseXML.documentElement.childNodes[0].nodeValue=="false"){isLoggedIn=false;SB.base.closeDivRefreshWindow();}}}};};SB.customer.myAccounts.UpdatePage=function(){var q=new SB.customer.myAccounts.visibilityServiceHandler();var r=new AjaxService(q);var o=popupOptions.div;var t=popupOptions.divBar;var u=popupOptions.divLink;var l=popupOptions["switch"];var s=popupOptions.src;var m=document.getElementById(l);var p=document.getElementById(u);if(m.value=="0"){if(isLoggedIn){SB.customer.myAccounts.LoadContent(s+"?"+new Date().getTime(),o);m.value="1";p.innerHTML=popupOptions.cState;document.getElementById(t).className=popupOptions.aClass;document.getElementById(o).style.display="block";}}else{r.GetRequest("/misc/webServices/userControl/setvisibilityservice.aspx?key="+popupOptions.session+"&value=false&"+new Date().getTime());m.value="0";p.innerHTML=popupOptions.oState;document.getElementById(o).style.display="none";document.getElementById(t).className=popupOptions.iClass;if(document.getElementById("dvWaitContentLoading")!=null){document.getElementById(o).innerHTML=document.getElementById("dvWaitContentLoading").innerHTML;}}r=null;q=null;};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 d=new LabelsHandler();var c=new AjaxService(d);c.GetRequest("/config/translation/funding/FundingScriptLabels.xml");c=null;d=null;};SB.funding.onCardDelete=function(f){SB.funding.loadFundingLabels();document.getElementById("cardID").value=f;document.getElementById("cardAction").value="remove";if(document.getElementById("popBox2")){var e=service.labels.CardDeleteProcessing;var d="<p>"+service.labels.CardDeleteProcessingMessage+"</p>";document.getElementById("popBox2").innerHTML=SB.base.processingAnimationContent(e,d);}__doPostBack("","");};SB.funding.onCardUpdate=function(){SB.funding.loadFundingLabels();document.getElementById("cardAction").value="update";__doPostBack("","");};SB.funding.SetWalletRedirect=function(e,g){var f=document.getElementById("redirectIFrame");var h=document.getElementById("divIframe");if(f!=null&&h!=null&&e!=""){SB.base.reStyler("add","ctrlDepositMethodList_divContent","hide");SB.base.reStyler("add",f,("pm"+g));SB.base.reStyler("add","VbVControl","hide");}h.style.display="block";f.src=e;f.style.display="";SB.base.divPopUp(1,"refresh");};SB.funding.SetVBVRedirect=function(e){var f=document.getElementById("redirectIFrame");var d=document.getElementById("divIframe");if(f!=null&&d!=null&&e!=""){SB.base.reStyler("add","ctrlDepositMethodList_divContent","hide");SB.base.reStyler("add",f,"pmVBV");}d.style.display="block";f.src=e;f.style.display="";};SB.funding.SetRedirectIFrameContentURLToPBP=function(b){alert("SetRedirectIFrameContentURLToPBP - change to use generic function! - See funding.js line 86");SetRedirectIFrameContent(b,"PBP");};SB.funding.SetRedirectIFrameContentURLToPaysafe=function(b){alert("SetRedirectIFrameContentURLToPaysafe - change to use generic function! - See funding.js line 94");SetRedirectIFrameContent(b,"PS");};SB.funding.ResetCardForm=function(){var h=document.getElementById("popupBox");var e=h.getElementsByTagName("div");for(i=0;i<e.length;i++){if((e[i].id.indexOf("divValidationErrors")>-1)||(e[i].id.indexOf("errCardHolder")>-1)||(e[i].id.indexOf("errStartDate")>-1)||(e[i].id.indexOf("errIssueNo")>-1)||(e[i].id.indexOf("errExpiryDate")>-1)||(e[i].id.indexOf("errCardNo")>-1)||(e[i].id.indexOf("errCvv2")>-1)||(e[i].id.indexOf("errCardCurrency")>-1)||(e[i].id.indexOf("errAmount")>-1)){e[i].style.display=GetHiddenDivStyle();}}oAnchors=SB.base.getElementsByClass("error",h,"a");for(x=0;x<oAnchors.length;x++){SB.base.reStyler("remove",oAnchors[x],"error");}var f=document.getElementsByTagName("select");for(i=0;i<f.length;i++){if((f[i].id.indexOf("ddlValidFromMonth")>-1)||(f[i].id.indexOf("ddlValidToMonth")>-1)||(f[i].id.indexOf("ddlValidFromYear")>-1)||(f[i].id.indexOf("ddlValidToYear")>-1)||(f[i].id.indexOf("ddlCurrency")>-1)){if(f[i].options.length>0){f[i].selectedIndex=0;}else{f[i].selectedIndex=-1;}}}var g=document.getElementsByTagName("input");for(i=0;i<g.length;i++){if((g[i].id.indexOf("txtIssueno")>-1)||(g[i].id.indexOf("txtCardno")>-1)||(g[i].id.indexOf("txtCvv2")>-1)||(g[i].id.indexOf("txtAmount")>-1)||(g[i].id.indexOf("txtDepositConvertedAmount")>-1)){g[i].value="";}}};SB.funding.onCardWithdraw=function(){if(document.cardForm.cardAction.value=="withdraw"){document.cardForm.submit();}else{alert(service.labels.selectValidCard);}};onWithdrawCardSelect=function(b){};SB.funding.onDepositCardSelect=function(F,H,C,I){var z=document.getElementById("cardRow1");var s=document.getElementById("cardRow2A");var y=document.getElementById("cardRow2B");var w=document.getElementById("cardRow3A");var B=document.getElementById("cardRow3B");var t=document.getElementById("cardRow4");var u=document.getElementById("cardRow5");var D=document.getElementById("cardRow7");var E=document.getElementById("cvv2_"+F);var v=document.getElementById(fundingGlobals.card.ddlCardTypeID);var G=document.getElementById("cardId"+F);var v=document.getElementById(fundingGlobals.card.ddlCardListID);if(I=="true"){SB.funding.ResetCardForm();}if(SB.funding.isNewCard(F)){document.getElementById("cardAction").value="add";SB.funding.ShowNewCardRows(v,z,s,y,w,B,t,u,D,C);}else{document.getElementById("cardAction").value="deposit";SB.funding.InitialiseExistingCardRows(z,s,y,w,B,t,E,u,D);SB.funding.ShowExistingRetariusMessage(H,F);}SB.funding.onCardTypeChange(C,F,s,y,D);SB.funding.displayDepositAmounts(C,F);z=null;s=null;y=null;w=null;B=null;t=null;u=null;D=null;E=null;v=null;G=null;};SB.funding.onDepositNewCardSelect=function(B,C,v,D){var u=document.getElementById("cardRow1");var E=document.getElementById("cardRow2A");var r=document.getElementById("cardRow2B");var t=document.getElementById("cardRow3A");var w=document.getElementById("cardRow3B");var F=document.getElementById("cardRow4");var s=document.getElementById("cardRow5");var y=document.getElementById("cardRow7");var z=document.getElementById("cvv2_"+B);var G=document.getElementById(fundingGlobals.card.ddlCardListID);if(SB.funding.isNewCard(B)){SB.funding.ShowNewCardRows(G,u,E,r,t,w,F,s,y,v);}u=null;E=null;r=null;t=null;w=null;F=null;s=null;y=null;z=null;G=null;oCardRadio=null;};SB.funding.displayDepositAmounts=function(m,o){var h=document.getElementById(fundingGlobals.card.ddlDepositAmountID);var g=document.getElementById(fundingGlobals.card.txtAmountID);var k=document.getElementById("ctrlDepositMethodList__ctl0_noSymbol");var l=document.getElementById(fundingGlobals.card.lblPPMsgID);if(h!=null){if(h.length>0){if(m=="WM"){h.style.display="none";g.style.display="";k.style.display="";}else{h.style.display="";g.style.display="none";k.style.display="none";}}else{h.style.display="none";g.style.display="";k.style.display="";}}l.innerHTML="";for(i=0;i<fundingGlobals.card.ppLabels.length;i++){if(fundingGlobals.card.ppLabels[i].indexOf(m)>=0){l.innerHTML=fundingGlobals.card.ppLabels[i].substring(fundingGlobals.card.ppLabels[i].indexOf(m)+3);}}};SB.funding.ShowExistingRetariusMessage=function(e,f){var d=fundingGlobals.card.customerCurrency;if(e=="WT"&&d!="GBP"&&d!="EUR"&&d!="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(m,q,o,p,u,v,s,t,w,r){q.style.display=GetVisibleDivStyle();o.style.display=GetVisibleDivStyle();p.style.display=GetVisibleDivStyle();u.style.display=GetVisibleDivStyle();v.style.display=GetVisibleDivStyle();if(s!=null){s.style.display=GetVisibleDivStyle();}if((r=="unknown")&&(m!=null)){m.selectedIndex=0;}t.style.display=GetHiddenDivStyle();w.style.display=GetHiddenDivStyle();};SB.funding.InitialiseExistingCardRows=function(o,l,m,r,s,p,t,q,u){o.style.display=GetHiddenDivStyle();l.style.display=GetHiddenDivStyle();m.style.display=GetHiddenDivStyle();r.style.display=GetHiddenDivStyle();s.style.display=GetHiddenDivStyle();if(p!=null){if((t!=null)&&(t.value=="True")){p.style.display=GetVisibleDivStyle();}else{p.style.display=GetHiddenDivStyle();}}q.style.display=GetHiddenDivStyle();u.style.display=GetHiddenDivStyle();};SB.funding.ShowPaymentProviderLogos=function(h,f){var g=document.getElementById("providerDivs");if(g!=null){var e=g.getElementsByTagName("div");if(h==true){for(i=0;i<e.length;i++){if(e[i].id==f){e[i].style.display=GetVisibleDivStyle();}else{e[i].style.display=GetHiddenDivStyle();}}}else{for(i=0;i<e.length;i++){e[i].style.display=GetHiddenDivStyle();}}e=null;}g=null;};SB.funding.onNewCardTypeChange=function(h){var f=document.getElementById("cardRow2A");var g=document.getElementById("cardRow2B");var e=document.getElementById("cardRow7");SB.funding.onCardTypeChange(h.value,"new",f,g,e);f=null;g=null;e=null;SB.funding.displayDepositAmounts(h.value);};SB.funding.onCardTypeChange=function(k,f,g,h,l){SB.funding.DisplayValidFrom(f,k,g,h);SB.funding.DisplayCurrencyDropdown(k,f);SB.funding.SetDepositAmountCurrency(k,f);SB.funding.DisplayCurrencyConversionLabels(f,k,l);SB.funding.CalculateConversionAmount(f,k);SB.funding.DisplayMaestroLabel(k);SB.funding.HideCCV2(k);SB.funding.DisplayWireCardLabel(f,k,l);SB.funding.ShowPaymentProviderLogos(true,SB.funding.GetCardTypePaymentProviderId(k));};SB.funding.isNewCard=function(b){if(b=="new"){return true;}else{return false;}};SB.funding.GetCardTypePaymentProviderId=function(d){var c=null;if(fundingGlobals.card.cardTypeData.length==1){c=fundingGlobals.card.cardTypeData[0][3];}else{for(i=0;i<fundingGlobals.card.cardTypeData.length;i++){if(d==fundingGlobals.card.cardTypeData[i][0]){c=fundingGlobals.card.cardTypeData[i][3];break;}}}return c;};SB.funding.CardTypeDoesCurrencyConversion=function(b){for(i=0;i<fundingGlobals.card.currencyConvertedCardTypes.length;i++){if(b==fundingGlobals.card.currencyConvertedCardTypes[i]){return true;}}return false;};SB.funding.DisplayValidFrom=function(e,h,f,g){if(SB.funding.isNewCard(e)&&(h=="MA"||h=="SW"||h=="unknown")){f.style.display=GetVisibleDivStyle();g.style.display=GetVisibleDivStyle();}else{f.style.display=GetHiddenDivStyle();g.style.display=GetHiddenDivStyle();}};SB.funding.DisplayCurrencyDropdown=function(d,e){if(SB.funding.CardTypeDoesCurrencyConversion(d)&&SB.funding.isNewCard(e)){document.getElementById("cardRow5").style.display=GetVisibleDivStyle();var f=document.getElementById(fundingGlobals.card.ddlCurrencyID);SB.base.RemoveAllOptions(f);for(i=0;i<fundingGlobals.card.currencyConvertedCardTypes.length;i++){if(fundingGlobals.card.currencyConvertedCardTypes[i]==d){for(j=0;j<fundingGlobals.card.cardTypeCurrencies[i].length;j++){SB.base.AddOption(f,fundingGlobals.card.cardTypeCurrencies[i][j],fundingGlobals.card.cardTypeCurrencies[i][j]);}}}f.selectedIndex=0;f=null;}else{document.getElementById("cardRow5").style.display=GetHiddenDivStyle();}};SB.funding.SetDepositAmountCurrency=function(d,c){document.getElementById(fundingGlobals.card.currencyLabelID).innerHTML=SB.funding.GetSelectedCurrency(d,c);};SB.funding.GetSelectedCurrency=function(d,e){if(SB.funding.CardTypeDoesCurrencyConversion(d)){if(SB.funding.isNewCard(e)){var f=document.getElementById(fundingGlobals.card.ddlCurrencyID);return f.options[f.selectedIndex].text;}else{return document.getElementById("currencyCode_"+e).value;}}else{return fundingGlobals.card.customerCurrency;}};SB.funding.GetCheckedCardId=function(){var b=document.getElementById("cardID").value;return b;};SB.funding.GetCardType=function(c){if(SB.funding.isNewCard(c)){var d=document.getElementById(fundingGlobals.card.ddlCardTypeID);return d.value;}else{return document.getElementById("cardType_"+c).value;}};SB.funding.GetCardTypeDescription=function(e){var h=SB.funding.GetCardType(e);var f=document.getElementById(fundingGlobals.card.ddlCardListID);if(f!=null){for(var g=0;g<f.length;g++){if(f[g].value==h){return f[g].text;}}}return"";};SB.funding.GetSelectedCurrencyConversionRate=function(b){for(i=0;i<fundingGlobals.card.allCardCurrencies.length;i++){if(fundingGlobals.card.allCardCurrencies[i]==b){return fundingGlobals.card.allCardCurrencyRates[i];}}};SB.funding.CalculateConversionAmount=function(c,d){SB.funding.SetConvertedAmount(d,c,"SB.funding.CalculateConversionAmount");};SB.funding.UpdateConvertedAmount=function(f){var e=SB.funding.GetCheckedCardId();if(e!=""){var d=SB.funding.GetCardType(e);SB.funding.SetConvertedAmount(d,e,f);d=null;}e=null;};SB.funding.SetConvertedAmount=function(s,m,r){if(SB.funding.CardTypeDoesCurrencyConversion(s,m)){if(r=="ddlCurrency"){SB.funding.SetDepositAmountCurrency(s,m);}var o=document.getElementById(fundingGlobals.card.txtAmountID);if(o!=null&&o.value!=""&&!isNaN(o.value)){var q=SB.funding.GetSelectedCurrency(s,m);var p=SB.funding.GetSelectedCurrencyConversionRate(q);var l=fundingGlobals.card.customerCurrencyConversionRate;var k=(parseFloat(l)/parseFloat(p))*parseFloat(o.value);document.getElementById(fundingGlobals.card.txtDepositConvertedAmountID).value=k.toFixed(2);q=null;p=null;l=null;k=null;}o=null;}};SB.funding.DisplayCurrencyConversionLabels=function(f,d,e){if(SB.funding.CardTypeDoesCurrencyConversion(d)){e.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(f));document.getElementById("removedFromYourAccount").style.display=GetVisibleDivStyle();document.getElementById("currencyOfYourCard").innerHTML=fundingGlobals.card.currencyOfYourCard.replace("[PLACEHOLDER]",SB.funding.GetCardTypeDescription(f));document.getElementById("currencyOfYourCard").style.display=GetVisibleDivStyle();}else{if(e!=null){e.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(e,d){if(d=="WM"){if(SB.funding.isNewCard(e)){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 f=document.getElementById("wirecardDepositHelp");if(f!=null){f.style.display=GetHiddenDivStyle();}f=null;}};SB.funding.getSelectedPaymentMethod=function(){var b=document.getElementById("ctrlWithdrawMethodList_modFundingWithdrawddlPaymentMethod");if(b==null){b=document.getElementById("ctrlDepositMethodList_modFundingDepositddlPaymentMethod");}if(b==null){return null;}else{paymentMethod=b.options[b.selectedIndex].value;}return paymentMethod;};SB.funding.getCurrentPPID=function(){var d=SB.funding.getSelectedPaymentMethod();if(d!=null){var e=d.split("^");var f=e[1];return f;}else{return null;}};SB.funding.getUserPaymentAccountID=function(){if(SB.funding.getSelectedPaymentMethod()!=null){var d=SB.funding.getSelectedPaymentMethod();var f=d.split("^");var e=f[2];if(SB.funding.isUserPaymentAccountSelected()){e=f[2];}return e;}else{return null;}};SB.funding.getSubPaymentProvider=function(){var d=SB.funding.getSelectedPaymentMethod();if(SB.funding.paymentMethod!=null){if(SB.funding.isSubPaymentProviderSelected()){var c=d.split("^");return c[2];}else{return null;}}else{return null;}};SB.funding.getPopupPaymentProviderSelected=function(){var d=SB.funding.getSelectedPaymentMethod();if(d!=null){if(SB.funding.isPopupPaymentProviderSelected()){var c=d.split("^");return c[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(d){var f=null;var e="";if(d){f="/t/funding/depositPopUp.aspx?";}else{f="/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((f+e),"popBadSelect1","popVeil1","popLayer1");return false;}if(SB.funding.isPopupPaymentProviderSelected()){e="currentPPID="+SB.funding.getCurrentPPID();}else{if(SB.funding.isUserPaymentAccountSelected()){e="currentPPID="+SB.funding.getCurrentPPID()+"&userPaymentAccountID="+SB.funding.getUserPaymentAccountID();}else{if(SB.funding.isSubPaymentProviderSelected()){e="currentPPID="+SB.funding.getCurrentPPID()+"&subPPID="+SB.funding.getUserPaymentAccountID();}else{e="currentPPID="+SB.funding.getCurrentPPID();}}}SB.base.RecallOpenDiv((f+e),"popBadSelect1","popVeil1","popLayer1");if(SB.funding.isPopupPaymentProviderSelected()){SB.funding.openPopUpOnSuccess();}};SB.funding.openPopUpOnSuccess=function(){var b;if(rState==responseState.success){PopNewWindow(SB.funding.getPopupPaymentProviderSelected());}else{if(rState==responseState.waiting){b=setTimeout("SB.funding.openPopUpOnSuccess()",100);}else{clearTimeout(b);}}};SB.funding.getPaymentMethodInputControl=function(g,l){var k=g.id.split("_");var h=k[0]+"__ctl0_"+l;var f=document.getElementById(h);return f;};SB.funding.ValidateAndDeposit=function(b){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(b){if(b){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 b=SB.funding.getCurrentPPID();if(document.getElementById("divDisplayProgress")!=null){document.getElementById("divDisplayProgress").style.display=GetHiddenDivStyle();}if(b=="BW"){document.getElementById("ctrlDepositMethodList_modFundingDepositBtnCancel").style.display="none";}};SB.funding.onSubmitDepositOrWithdrawal=function(b){Global_processingMessage="<p>laden...</p>";Global_processingTitle="Bitte einen Moment warten....";__doPostBack("","");};SB.funding.showProcessingTransaction=function(){Global_processingMessage="<p>laden...</p>";Global_processingTitle="Bitte einen Moment warten....";SB.base.holdingDiv("show");};SB.funding.refreshBalance=function(c){var d=document.getElementById("modCustDisplayBalance");if(d!=null){d.innerHTML=c;}};SB.funding.iFrameRedirection=function(c){var d=document.getElementById("btnRedirect").value;SB.base.RecallOpenDiv(d,"popBadSelect1","popVeil1","popLayer1");};OpenPageInLayer2=function(b){SB.base.OpenDiv(b,"popBadSelect2","popVeil2","popLayer2");};AgeVerification=function(){location.href="/t/customer/myaccount.aspx";};SB.funding.getBankDetails=function(){var d;var c="/t/funding/BTBankDetails.aspx?BankID=";d=document.getElementById("ctrlDepositMethodList__ctl0_lstCurrencyList").selectedIndex;c=c+document.getElementById("ctrlDepositMethodList__ctl0_lstCurrencyList").options[d].value;SB.funding.LoadHTML(c,"");};SB.funding.LoadHTML=function(f,e){var d=new Object();d.timeout=2000;d.textonly=true;d.Content=e;HTTP.getText(f,SB.funding.CallBackLoadHTML,d);};SB.funding.CallBackLoadHTML=function(d,c){if(d!=null){if(document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails")!=null){document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails").innerHTML=d;}else{if(document.getElementById("more_dvBankDetails")!=null){document.getElementById("more_dvBankDetails").innerHTML=d;}}}if(document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails")!=null){SB.base.divPopUp(1,"refresh");}};SB.funding.getPrintDetails=function(d){var e="<input id='btnCancel' type='button' value='Cancel' runat='server' onclick='SB.base.hideLayer1();' />";var f=document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails").innerHTML;document.getElementById("dvLoadPrintDetails").innerHTML=f+e;if(d=="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 b="";if(document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails")!=null){b=document.getElementById("ctrlDepositMethodList__ctl0_dvBankDetails").innerHTML;}return b;};SB.funding.sendEmail=function(){var c=document.getElementById("txtEmailAddress").value;if(c!=""){var d="/t/modules/funding/deposit/PrintPopUp.aspx?emailaddress="+c+"&bankDetail="+SB.funding.getBankDetailText();SB.base.RecallOpenDiv(d,"popBadSelect2","popVeil2","popLayer2");}};SB.funding.hideLayer2=function(){SB.base.reStyler("swap","popLayer2, popVeil2, popBadSelect2","show","hide");};PopNewWindow=function(d){var c=window.open(d);c=null;return;};SB.funding.LoadMethodforModule=function(b){switch(b){case"deposit":if(typeof(SB.funding.loadPaymentMethod)=="function"){SB.funding.loadPaymentMethod(true);}else{setTimeout("SB.funding.LoadMethodforModule('"+b+"')",10);}break;case"withdraw":if(typeof(SB.funding.loadPaymentMethod)=="function"){SB.funding.loadPaymentMethod(false);}else{setTimeout("SB.funding.LoadMethodforModule('"+b+"')",10);}break;case"carddeposit":if(typeof(SB.funding.cardDeposit.OnDropdownSelectionChange)=="function"){SB.funding.cardDeposit.OnDropdownSelectionChange();}else{setTimeout("SB.funding.LoadMethodforModule('"+b+"')",10);}break;case"cardwithdraw":if(typeof(OnWithdrawDropdownSelectionChange)=="function"){OnWithdrawDropdownSelectionChange();}else{setTimeout("SB.funding.LoadMethodforModule('"+b+"')",10);}break;default:break;}};SB.funding.DisplayMaestroLabel=function(b){if(b=="MA"||b=="SW"){document.getElementById("issueNumberTip").style.display=GetVisibleDivStyle();}else{document.getElementById("issueNumberTip").style.display=GetHiddenDivStyle();}};SB.funding.HideCCV2=function(b){if(b=="LS"){document.getElementById("ctrlDepositMethodList__ctl0_txtCvv2").value="123";document.getElementById("cardRow4").style.display="none";}};SB.funding.ResetTooltipError=function(){if(fundingGlobals.card.hasNoErrors=="false"){var b=document.getElementById("divFunding").getElementsByTagName("strong");for(i=0;i<b.length;i++){if(b[i].className=="icons icoError"){if(b[i].id.indexOf("cvv2No")!=-1){b[i].className="icons icoInfo";document.getElementById(b[i].id.replace(/ico_?/i,"ttt_")).className="toolTipText tttInfo";document.getElementById(b[i].id.replace(/ico_?/i,"ttt_")).innerHTML='<span class="tttContent">'+SB.funding.CVVInfoMessage+"</span>";continue;}b[i].className="icons";document.getElementById(b[i].id.replace(/ico_?/i,"ttt_")).innerHTML="";}}}};SB.funding.ProcessCardSelectionChange=function(b){switch(b){case"carddeposit":SB.funding.ResetTooltipError();SB.funding.resetErrorState();SB.funding.cardDeposit.clearLuhnCheckIndicator();SB.funding.LoadMethodforModule(b);break;case"cardwithdraw":SB.funding.ResetTooltipError();SB.funding.ResetCardForm();SB.funding.resetErrorState();SB.funding.LoadMethodforModule(b);break;}};SB.funding.resetErrorState=function(){fundingGlobals.card.hasNoErrors="true";};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(d){var f=document.getElementById("cardRow4");var e=document.getElementById("cardRow9");SB.funding.onCardTypeChange(d.value,"new",f,e);oCardRow2=null;oCardRow7=null;SB.funding.displayDepositAmounts(d.value,"new");};SB.funding.cardDeposit.validateCARD=function(c){var d=true;return d;};SB.funding.cardDeposit.disableDepositExpiredCard=function(g,l,h,k){var m=new Date();var o="false";if((k>l)||(k==l&&h>g)){o="true";}if(o=="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 d=document.getElementById("ctrlDepositMethodList__ctl0_ico_expiryDate");var c=document.getElementById("ctrlDepositMethodList__ctl0_ttt_expiryDate");d.className="icons icoError";c.className="toolTipText tttError";SB.funding.cardDeposit.removeExistingTooltipMessage(c);bubble_info_message="Es tut uns leid, Ihre Karte ist abgelaufen.";SB.funding.cardDeposit.createTooltipMessageTag(c);};SB.funding.cardDeposit.ToggleCardExpiry=function(){SB.base.ToggleElement("cardExpired","display","block");};SB.funding.cardDeposit.loadManageCard=function(){var e="";var f="";var h=SB.funding.getCurrentPPID();var g=document.getElementById("cardID").value;Global_processingTitle="Bitte einen Moment warten...";Global_processingMessage="<p>laden...</p>";e="currentPPID="+h+"&userPaymentAccountID="+g+"&source=deposit";f="/t/funding/ManageCardPopup.aspx?"+e;SB.base.RecallOpenDiv(f,"popBadSelect1","popVeil1","popLayer1");};SB.funding.cardDeposit.OnDropdownSelectionChange=function(){document.getElementById("lnkActiveCard").style.display="";document.getElementById("lnkExpiredCard").style.display="none";var ac=document.getElementById("ctrlDepositMethodList__ctl0_dpdwnCardList");var Y=ac.options[ac.selectedIndex].value;document.getElementById("dropdownSelection").value=Y;var L=new Array();L=Y.split("_");SB.funding.cardDeposit.createHiddenControls(L);if(L.length>1){var O=L[0];var ad=L[1];var U=L[2];var G=L[3];var Q=L[4];var E=L[5];var F=L[6];var J=L[7];var X=L[8];var I=L[9];var ae=L[10];var S=L[11];var aa=L[12];document.getElementById("dvSavedCards").style.display="";document.getElementById("ctrlDepositMethodList__ctl0_ddlCardType").value=U;document.getElementById("cardID").value=O;SB.funding.onDepositCardSelect(O,ad,U,fundingGlobals.card.hasNoErrors);var K=document.getElementById("ctrlDepositMethodList__ctl0_lblCardType");K.innerHTML=G;K.style.display="";document.getElementById("ctrlDepositMethodList__ctl0_spCardType").style.display="";var W=document.getElementById("ctrlDepositMethodList__ctl0_lblCardNumber");W.innerHTML=Q;W.style.display="";document.getElementById("ctrlDepositMethodList__ctl0_spCardNumber").style.display="";var M=document.getElementById("ctrlDepositMethodList__ctl0_lblExpiryMonth");M.innerHTML=F;M.style.display="";document.getElementById("ctrlDepositMethodList__ctl0_spExpiryDate").style.display="";var ab=document.getElementById("ctrlDepositMethodList__ctl0_lblExpiryYear");ab.innerHTML=J;ab.style.display="";SB.funding.cardDeposit.disableDepositExpiredCard(F,J,S,aa);var E=L[5];if(E!=""&&E!=null){if(U=="MA"||U=="SW"||U=="unknown"){var V=E.substr(4,2);var H=E.substr(0,4);var T=document.getElementById("ctrlDepositMethodList__ctl0_lblStartMonth");T.innerHTML=V;T.style.display="";document.getElementById("ctrlDepositMethodList__ctl0_spStartDate").style.display="";var Z=document.getElementById("ctrlDepositMethodList__ctl0_lblStartYear");Z.innerHTML=H;Z.style.display="";var P=document.getElementById("ctrlDepositMethodList__ctl0_lblIssueNumber");P.innerHTML=X;P.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(ac);document.getElementById("ctrlDepositMethodList__ctl0_ddlCardType").value=Y;document.getElementById("cardType").value=Y;}};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(d){var c=new Array();c=d;SB.funding.cardDeposit.createHiddenProviderId(c[0],c[1]);SB.funding.cardDeposit.createHiddenCardType(c[0],c[2]);SB.funding.cardDeposit.createHiddenCvv2(c[0],c[9]);SB.funding.cardDeposit.createHiddenCurrencyCode(c[0],c[10]);};SB.funding.cardDeposit.createHiddenProviderId=function(e,h){var g=document.getElementById("placeholderHiddenControls");var f=document.createElement("input");f.setAttribute("type","hidden");f.setAttribute("id","cardProviderID_"+e);f.setAttribute("name","cardProviderID_"+e);f.setAttribute("value",h);g.appendChild(f);};SB.funding.cardDeposit.createHiddenCardType=function(e,h){var g=document.getElementById("placeholderHiddenControls");var f=document.createElement("input");f.setAttribute("type","hidden");f.setAttribute("id","cardType_"+e);f.setAttribute("name","cardType_"+e);f.setAttribute("value",h);g.appendChild(f);};SB.funding.cardDeposit.createHiddenCvv2=function(f,e){var h=document.getElementById("placeholderHiddenControls");var g=document.createElement("input");g.setAttribute("type","hidden");g.setAttribute("id","cvv2_"+f);g.setAttribute("name","cvv2_"+f);g.setAttribute("value",e);h.appendChild(g);};SB.funding.cardDeposit.onCardDeposit=function(d){var f=document.getElementById(fundingGlobals.card.ddlDepositAmountID);var e=document.getElementById(fundingGlobals.card.txtAmountID);if(f!=null){if(f.style.display!="none"){e.value=f.value;}}Global_processingMessage="<p>Ihre Transaktion wird bearbeitet...</p>";Global_processingTitle="Bitte einen Moment warten...";__doPostBack("","");};SB.funding.cardDeposit.createHiddenCurrencyCode=function(e,h){var g=document.getElementById("placeholderHiddenControls");var f=document.createElement("input");f.setAttribute("type","hidden");f.setAttribute("id","currencyCode_"+e);f.setAttribute("name","currencyCode_"+e);f.setAttribute("value",h);g.appendChild(f);};SB.funding.cardDeposit.clearLuhnCheckIndicator=function(){var d=document.getElementById("ctrlDepositMethodList__ctl0_ico_CardNumber");d.className="icons";var c=document.getElementById("ctrlDepositMethodList__ctl0_ttt_CardNumber");c.className="toolTipText";SB.funding.cardDeposit.removeExistingTooltipMessage(c);};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="Bitte überprüfen Sie die Details Ihrer Karte, Sie scheinen nicht übereinzustimmen.";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 e=LuhnCheckUnchecked;SB.funding.cardDeposit.InitialializeCardObjects();document.getElementById("imgCardNumberIncorrect").style.display="none";document.getElementById("imgCardNumberCorrect").style.display="none";e=SB.funding.cardDeposit.CheckNumberOnChange();var d=document.getElementById("ctrlDepositMethodList__ctl0_ico_CardNumber");var f=document.getElementById("ctrlDepositMethodList__ctl0_ttt_CardNumber");if(e==LuhnCheckPassed){d.className="icons icoTrue";f.className="toolTipText";SB.funding.cardDeposit.removeExistingTooltipMessage(f);}else{if(e==LuhnCheckFailed){d.className="icons icoFalse";f.className="toolTipText tttError";SB.funding.cardDeposit.removeExistingTooltipMessage(f);SB.funding.cardDeposit.createTooltipMessageTag(f);}else{if(e==LuhnCheckUnchecked){SB.funding.cardDeposit.clearLuhnCheckIndicator();}}}};SB.funding.cardDeposit.removeExistingTooltipMessage=function(b){b.innerHTML="";};SB.funding.cardDeposit.createTooltipMessageTag=function(b){b.innerHTML='<span class="tttContent">'+bubble_info_message+"</span>";};SB.funding.cardDeposit.CardType=function(){var o;var m=SB.funding.cardDeposit.CardType.arguments;var h=SB.funding.cardDeposit.CardType.arguments.length;this.objname="object CardType";var k=(h>0)?m[0]:"CardObject";var g=(h>1)?m[1]:"0,1,2,3,4,5,6,7,8,9";var l=(h>2)?m[2]:"13,14,15,16,19";this.setCardNumber=setCardNumber;this.setCardType=setCardType;this.setLen=setLen;this.setRules=setRules;this.setExpiryDate=setExpiryDate;this.setCardType(k);this.setLen(l);this.setRules(g);if(h>4){this.setExpiryDate(m[3],m[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 h=document.getElementById("ctrlDepositMethodList__ctl0_txtCardno").value;var e=document.getElementById("ctrlDepositMethodList__ctl0_ddlValidToYear").value;var g=document.getElementById("ctrlDepositMethodList__ctl0_ddlValidToMonth").value;var f=document.getElementById("ctrlDepositMethodList__ctl0_dpdwnCardList").value;if(h.length==0||e.length==0||g.length==0){return LuhnCheckUnchecked;}else{return SB.funding.cardDeposit.CheckCardNumber(h,e,g,f);}};SB.funding.cardDeposit.CheckCardNumber=function(usrCardNumber,lExpiryYear,lExpiryMonth,lCardType){var tmpyear;if(lExpiryYear.length==0){bubble_info_message="Bitte das Ablaufdatum Ihrer Karte eingeben.";return LuhnCheckFailed;}tmpyear=lExpiryYear;tmpmonth=lExpiryMonth;if(!(new CardType()).isExpiryDate(tmpyear,tmpmonth)){bubble_info_message="Es tut uns leid, Ihre Karte ist abgelaufen.";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="This looks like a card1 number, not a card2 number";str_message.replace("card1",cardname);str_message.replace("card2",card);bubble_info_message=str_message;return LuhnCheckFailed;}else{bubble_info_message="Bitte überprüfen Sie die Nummer Ihrer Karte, Sie scheint nicht übereinzustimmen.";return LuhnCheckFailed;}}};CardType=function(){var o;var m=CardType.arguments;var h=CardType.arguments.length;this.objname="object CardType";var k=(h>0)?m[0]:"CardObject";var g=(h>1)?m[1]:"0,1,2,3,4,5,6,7,8,9";var l=(h>2)?m[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(k);this.setLen(l);this.setRules(g);if(h>4){this.setExpiryDate(m[3],m[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 k=checkCardNumber.arguments;var l=checkCardNumber.arguments.length;var g=(l>0)?k[0]:this.cardnumber;var h=(l>1)?k[1]:this.year;var f=(l>2)?k[2]:this.month;this.setCardNumber(g);this.setExpiryDate(h,f);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 l=isCardNumber.arguments;var h=isCardNumber.arguments.length;var k=(h>0)?l[0]:this.cardnumber;if(!this.luhnCheck()){return false;}for(var o=0;o<this.len.size;o++){if(k.toString().length==this.len[o]){for(var m=0;m<this.rules.size;m++){var g=k.substring(0,this.rules[m].toString().length);if(g==this.rules[m]){return true;}}return false;}}return false;};isExpiryDate=function(){var d=isExpiryDate.arguments;var c=isExpiryDate.arguments.length;year=c>0?d[0]:this.year;month=c>1?d[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(d){d=d.toString();if(d.length==0){return false;}for(var c=0;c<d.length;c++){if(d.substring(c,c+1)<"0"||d.substring(c,c+1)>"9"){return false;}}return true;};luhnCheck=function(){var k=luhnCheck.arguments;var m=luhnCheck.arguments.length;var o=m>0?k[0]:this.cardnumber;if(!isNum(o)){return false;}var s=o.length;var r=s&1;var q=0;for(var p=0;p<s;p++){var l=parseInt(o.charAt(p));if(!((p&1)^r)){l*=2;if(l>9){l-=9;}}q+=l;}if(q%10==0){return true;}else{return false;}};makeArray=function makeArray(b){this.size=b;return this;};setCardNumber=function(b){this.cardnumber=b;return this;};setCardType=function(b){this.cardtype=b;return this;};setExpiryDate=function(d,c){this.year=d;this.month=c;return this;};setLen=function(d){if(d.length==0||d==null){d="13,14,15,16,19";}var e=d;n=1;while(e.indexOf(",")!=-1){e=e.substring(e.indexOf(",")+1,e.length);n++;}this.len=new makeArray(n);n=0;while(d.indexOf(",")!=-1){var f=d.substring(0,d.indexOf(","));this.len[n]=f;d=d.substring(d.indexOf(",")+1,d.length);n++;}this.len[n]=d;return this;};setRules=function(e){if(e.length==0||e==null){e="0,1,2,3,4,5,6,7,8,9";}var f=e;n=1;while(f.indexOf(",")!=-1){f=f.substring(f.indexOf(",")+1,f.length);n++;}this.rules=new makeArray(n);n=0;while(e.indexOf(",")!=-1){var d=e.substring(0,e.indexOf(","));this.rules[n]=d;e=e.substring(e.indexOf(",")+1,e.length);n++;}this.rules[n]=e;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 p=true;var s=new Date();var t=s.getMonth();var l=s.getYear();var u=0;var q=0;var o=new Array();u=document.getElementById(fundingGlobals.card.wStartYear).innerText;q=document.getElementById(fundingGlobals.card.wExpiryYear).innerText;var r=document.getElementById(fundingGlobals.card.wStartMonth).innerText;var m=document.getElementById(fundingGlobals.card.wExpiryMonth).innerText;};SB.funding.cardWithdraw.cardValidityDates=function(k){var l=false;var h=new Date();var f=h.getMonth()+1;var g=h.getYear();if(k[0]==null||k[2]==null){l=false;return l;}else{if(k[0]<g){}else{if(k[0]==g){if(f>k[2]||f==k[2]){}else{l=false;return l;}}else{if(k[0]>g){l=false;return l;}}}}if(g<k[1]){}else{if(g==k[1]){if(f<k[3]||f==k[3]){}else{l=false;return l;}}else{if(g>k[1]){l=false;return l;}}}l=true;return l;};OnWithdrawDropdownSelectionChange=function(){if(document.getElementById("lnkActiveCard")){document.getElementById("lnkActiveCard").style.display="";}if(document.getElementById("lnkExpiredCard")){document.getElementById("lnkExpiredCard").style.display="none";}var B=document.getElementById("ctrlWithdrawMethodList__ctl0_dpdwnCardList");var t=B.options[B.selectedIndex].value;document.getElementById("dropdownSelection").value=t;var u=new Array();u=t.split("_");SB.funding.cardWithdraw.createHiddenControls(u);if(u.length>1){document.getElementById(fundingGlobals.card.wDdlCardType).value=u[2];document.getElementById("cardID").value=u[0];var D=document.getElementById(fundingGlobals.card.wLblCardType);D.innerHTML=u[3];D.style.display="";var y=document.getElementById(fundingGlobals.card.wLblCardNumber);y.innerHTML=u[4];y.style.display="";var v=document.getElementById(fundingGlobals.card.wExpiryMonth);v.innerHTML=u[6];v.style.display="";var E=document.getElementById(fundingGlobals.card.wExpiryYear);E.innerHTML=u[7];E.style.display="";var C=u[5];if(C!=""&&C!=null){if(u[2]=="MA"||u[2]=="SW"||u[2]=="unknown"){var q=C.substr(4,2);var s=C.substr(0,4);var z=document.getElementById(fundingGlobals.card.wStartMonth);z.innerHTML=q;z.style.display="";if(document.getElementById(fundingGlobals.card.wDivspStartDate)){document.getElementById(fundingGlobals.card.wDivspStartDate).style.display="";}var w=document.getElementById(fundingGlobals.card.wStartYear);w.innerHTML=s;w.style.display="";var r=document.getElementById(fundingGlobals.card.wLblIssueNumber);r.innerHTML=u[8];r.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(B);document.getElementById(fundingGlobals.card.wDdlCardType).value=t;document.getElementById("cardType").value=t;}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(d){var c=new Array();c=d;SB.funding.cardWithdraw.createHiddenProviderId(c[0],c[1]);SB.funding.cardWithdraw.createHiddenCardType(c[0],c[2]);SB.funding.cardWithdraw.createHiddenCvv2(c[0],c[9]);SB.funding.cardWithdraw.createHiddenCurrencyCode(c[0],c[10]);};SB.funding.cardWithdraw.createHiddenProviderId=function(e,h){var g=document.getElementById("placeholderHiddenControls");var f=document.createElement("input");f.setAttribute("type","hidden");f.setAttribute("id","cardProviderID_"+e);f.setAttribute("name","cardProviderID_"+e);f.setAttribute("value",h);g.appendChild(f);};SB.funding.cardWithdraw.createHiddenCardType=function(e,h){var g=document.getElementById("placeholderHiddenControls");var f=document.createElement("input");f.setAttribute("type","hidden");f.setAttribute("id","cardType_"+e);f.setAttribute("name","cardType_"+e);f.setAttribute("value",h);g.appendChild(f);};SB.funding.cardWithdraw.createHiddenCvv2=function(f,e){var h=document.getElementById("placeholderHiddenControls");var g=document.createElement("input");g.setAttribute("type","hidden");g.setAttribute("id","cvv2_"+f);g.setAttribute("name","cvv2_"+f);g.setAttribute("value",e);h.appendChild(g);};SB.funding.cardWithdraw.createHiddenCurrencyCode=function(e,h){var g=document.getElementById("placeholderHiddenControls");var f=document.createElement("input");f.setAttribute("type","hidden");f.setAttribute("id","currencyCode_"+e);f.setAttribute("name","currencyCode_"+e);f.setAttribute("value",h);g.appendChild(f);};SB.funding.cardWithdraw.stopWithdrawOnExpiredCard=function(r,s){var m=new Date();var q=false;var o=m.getMonth();var p=m.getFullYear();var u=r.innerHTML;var w=s.innerHTML;if(w>p){}else{if(w==p){if(u<o){q=true;}}else{q=true;}}var t=document.getElementById(fundingGlobals.card.wActiveCardLink);var v=document.getElementById(fundingGlobals.card.wExpiredCardLink);if(q){t.style.display="none";v.style.display="";}else{t.style.display="";v.style.display="none";}};SB.Login=function(b){this.balanceUrl="/misc/webservices/funding/balanceservice.aspx";this.div=b;this.triggerLoginStatus();this.setupBalanceRefresh();this.setupUserStateRefresh();};SB.Login.prototype={triggerLoginStatus:function(){var b=this;$("input.loginStatus",b.div).each(function(){SB.EventHub.trigger("login-status",$(this).val());});},setupBalanceRefresh:function(){var b=this;SB.EventHub.bind("balance-refresh",function(a){if(b!=a){b.forceBalance(a.forceRefresh==true);}});},setupUserStateRefresh:function(){var b=this;if($(b.div).hasClass("inPlayLoginBox")){SB.EventHub.bind("user-state-refresh",function(a){if(b!=a){window.location.href=window.location.href;}});}},forceBalance:function(e){var d=this;var f={type:"GET",url:this.balanceUrl+"?forceRefresh="+e+"&cacheBuster="+new Date().getTime(),success:function(a,b){d.refreshBalance(a);},error:function(){alert("error");}};jQuery.ajax(f);},refreshBalance:function(f){var d=this;var e=$("string",f).text();$("span.balance",d.div).html(e);}};$(document).ready(function(){$("div.loginBox").each(function(){new SB.Login(this);});});var gService=true;var gTimeZone=0;function dcsCookie(){if(typeof(dcsOther)=="function"){dcsOther();}else{if(typeof(dcsPlugin)=="function"){dcsPlugin();}else{if(typeof(dcsFPC)=="function"){dcsFPC(gTimeZone);}}}}function dcsGetCookie(g){var e=document.cookie.indexOf(g+"=");if(e!=-1){var f=e+g.length+1;var h=document.cookie.indexOf(";",f);if(h==-1){h=document.cookie.length;}return unescape(document.cookie.substring(f,h));}return null;}function dcsGetCrumb(f,g){var h=dcsGetCookie(f).split(":");for(var l=0;l<h.length;l++){var k=h[l].split("=");if(g==k[0]){return k[1];}}return null;}function dcsGetIdCrumb(k,l){var g=dcsGetCookie(k);var o=g.substring(0,g.indexOf(":lv="));var m=o.split("=");for(var h=0;h<m.length;h++){if(l==m[0]){return m[1];}}return null;}function dcsFPC(v){if(typeof(v)=="undefined"){return;}var r=gFpc;var q=new Date();q.setTime(q.getTime()+(q.getTimezoneOffset()*60000)+(v*3600000));var y=new Date(q.getTime()+315360000000);var s=new Date(q.getTime());if(document.cookie.indexOf(r+"=")!=-1){var D=dcsGetIdCrumb(r,"id");var z=parseInt(dcsGetCrumb(r,"lv"));var B=parseInt(dcsGetCrumb(r,"ss"));if((D==null)||(D=="null")||isNaN(z)||isNaN(B)){return;}WT.co_f=D;var w=new Date(z);s.setTime(B);if((q.getTime()>(w.getTime()+1800000))||(q.getTime()>(s.getTime()+28800000))){s.setTime(q.getTime());WT.vt_f_s="1";}if((q.getDay()!=w.getDay())||(q.getMonth()!=w.getMonth())||(q.getYear()!=w.getYear())){WT.vt_f_d="1";}}else{var t=r+"_TMP=";document.cookie=t+"1";if(document.cookie.indexOf(t)!=-1){document.cookie=t+"; expires=Thu, 01-Jan-1970 00:00:01 GMT";if((typeof(gWtId)!="undefined")&&(gWtId!="")){WT.co_f=gWtId;}else{if((typeof(gTempWtId)!="undefined")&&(gTempWtId!="")){WT.co_f=gTempWtId;WT.vt_f="1";}else{WT.co_f="2";var E=q.getTime().toString();for(var u=2;u<=(32-E.length);u++){WT.co_f+=Math.floor(Math.random()*16).toString(16);}WT.co_f+=E;WT.vt_f="1";}}if(typeof(gWtAccountRollup)=="undefined"){WT.vt_f_a="1";}WT.vt_f_s="1";WT.vt_f_d="1";}else{WT.vt_f="2";WT.vt_f_a="2";return;}}WT.co_f=escape(WT.co_f);WT.vt_sid=WT.co_f+"."+s.getTime();var C="; expires="+y.toGMTString();document.cookie=r+"=id="+WT.co_f+":lv="+q.getTime().toString()+":ss="+s.getTime().toString()+C+"; path=/"+(((typeof(gFpcDom)!="undefined")&&(gFpcDom!=""))?("; domain="+gFpcDom):(""));}var gFpc="WT_FPC";var gWtId="";var gTempWtId="";var gConvert=true;function dcsAdv(){dcsFunc("dcsET");dcsFunc("dcsCookie");dcsFunc("dcsAdSearch");}var gDomain="statse.webtrendslive.com";function dcsMultiTrack(){for(var c=0;c<arguments.length;c++){if(arguments[c].indexOf("WT.")==0){WT[arguments[c].substring(3)]=arguments[c+1];c++;}if(arguments[c].indexOf("DCS.")==0){DCS[arguments[c].substring(4)]=arguments[c+1];c++;}if(arguments[c].indexOf("DCSext.")==0){DCSext[arguments[c].substring(7)]=arguments[c+1];c++;}}var d=new Date();DCS.dcsdat=d.getTime();dcsTag();}var gImages=new Array;var gIndex=0;var DCS=new Object();var WT=new Object();var DCSext=new Object();var gQP=new Array();function dcsVar(){var h=new Date();WT.tz=h.getTimezoneOffset()/60*-1;if(WT.tz==0){WT.tz="0";}WT.bh=h.getHours();WT.ul=navigator.appName=="Netscape"?navigator.language:navigator.userLanguage;if(typeof(screen)=="object"){WT.cd=navigator.appName=="Netscape"?screen.pixelDepth:screen.colorDepth;WT.sr=screen.width+"x"+screen.height;}if(typeof(navigator.javaEnabled())=="boolean"){WT.jo=navigator.javaEnabled()?"Yes":"No";}if(document.title){WT.ti=document.title;}WT.js="Yes";if(typeof(gVersion)!="undefined"){WT.jv=gVersion;}if(document.body&&document.body.addBehavior){document.body.addBehavior("#default#clientCaps");if(document.body.connectionType){WT.ct=document.body.connectionType;}document.body.addBehavior("#default#homePage");WT.hp=document.body.isHomePage(location.href)?"1":"0";}if(parseInt(navigator.appVersion)>3){if((navigator.appName=="Microsoft Internet Explorer")&&document.body){WT.bs=document.body.offsetWidth+"x"+document.body.offsetHeight;}else{if(navigator.appName=="Netscape"){WT.bs=window.innerWidth+"x"+window.innerHeight;}}}WT.fi="No";if(window.ActiveXObject){if((typeof(gFV)!="undefined")&&(gFV.length>0)){WT.fi="Yes";WT.fv=gFV;}}else{if(navigator.plugins&&navigator.plugins.length){for(var g=0;g<navigator.plugins.length;g++){if(navigator.plugins[g].name.indexOf("Shockwave Flash")!=-1){WT.fi="Yes";WT.fv=navigator.plugins[g].description.split(" ")[2];break;}}}}WT.sp="@@SPLITVALUE@@";DCS.dcsdat=h.getTime();DCS.dcssip=window.location.hostname;DCS.dcsuri=window.location.pathname;if(window.location.search){DCS.dcsqry=window.location.search;if(gQP.length>0){for(var g=0;g<gQP.length;g++){var l=DCS.dcsqry.indexOf(gQP[g]);if(l!=-1){var f=DCS.dcsqry.substring(0,l);var k=DCS.dcsqry.substring(l+gQP[g].length,DCS.dcsqry.length);DCS.dcsqry=f+k;}}}}if((window.document.referrer!="")&&(window.document.referrer!="-")){if(!(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)<4)){DCS.dcsref=window.document.referrer;}}}function A(c,d){return"&"+c+"="+dcsEscape(d);}function dcsEscape(d){if(typeof(RE)!="undefined"){var c=new String(d);for(R in RE){c=c.replace(RE[R],R);}return c;}else{return escape(d);}}function dcsLoadHref(b){if((typeof(gHref)!="undefined")&&(gHref.length>0)){window.location=gHref;gHref="";}}function dcsCreateImage(b){if(document.images){gImages[gIndex]=new Image;if((typeof(gHref)!="undefined")&&(gHref.length>0)){gImages[gIndex].onload=gImages[gIndex].onerror=dcsLoadHref;}gImages[gIndex].src=b;gIndex++;}else{document.write('<IMG BORDER="0" NAME="DCSIMG" WIDTH="1" HEIGHT="1" SRC="'+b+'">');}}function dcsMeta(){var d;if(document.all){d=document.all.tags("meta");}else{if(document.documentElement){d=document.getElementsByTagName("meta");}}if(typeof(d)!="undefined"){for(var f=1;f<=d.length;f++){var e=d.item(f-1);if(e.name){if(e.name.indexOf("WT.")==0){WT[e.name.substring(3)]=e.content;}else{if(e.name.indexOf("DCSext.")==0){DCSext[e.name.substring(7)]=e.content;}else{if(e.name.indexOf("DCS.")==0){DCS[e.name.substring(4)]=e.content;}}}}}}}function dcsTag(){var b="http"+(window.location.protocol.indexOf("https:")==0?"s":"")+"://"+gDomain+(gDcsId==""?"":"/"+gDcsId)+"/dcs.gif?";for(N in DCS){if(DCS[N]){b+=A(N,DCS[N]);}}for(N in WT){if(WT[N]){b+=A("WT."+N,WT[N]);}}for(N in DCSext){if(DCSext[N]){b+=A(N,DCSext[N]);}}if(b.length>2048&&navigator.userAgent.indexOf("MSIE")>=0){b=b.substring(0,2040)+"&WT.tu=1";}dcsCreateImage(b);}function dcsFunc(b){if(typeof(window[b])=="function"){window[b]();}}$(document).ready(function(){if((typeof gDcsId!="undefined")&&(gDcsId!=null)&&(gDcsId!="")){dcsVar();dcsMeta();dcsFunc("dcsAdv");dcsTag();}if((typeof(gConvert)!="undefined")&&gConvert&&(document.cookie.indexOf(gFpc+"=")==-1)){document.write("<SCRIPT Language='JavaScript' SRC='http"+(window.location.protocol.indexOf("https:")==0?"s":"")+"://"+hostId_orig+"/"+dcsId_orig+"/wtid.js'></SCRIPT>");}});SB.ui.WebTrends=function(b){if(typeof(b)!="undefined"){this.trackingFunction=b;}else{if(typeof(dcsMultiTrack)!="undefined"){this.trackingFunction=dcsMultiTrack;}else{this.trackingFunction=function(){};}}};SB.ui.WebTrends.prototype={trackUserEvent:function(g,f,e){try{this.trackingFunction("WT.ti",g,"WT.si_n",f,"WT.si_p",e);}catch(h){}}};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(b){if(stdDOM){return document.getElementById(b);}if(ieDOM){return document.all[b];}if(nsDOM){return document.layers[b];}};getObjectStyle=function(d){if(nsDOM){return getObject(d);}var c=getObject(d);return c.style;};showDefault=function(b){showCell(b,"#E2E2E2","#E2E2E2");};showCell=function(d,e,f){getObjectStyle(d).color=e;getObjectStyle(d).backgroundColor=f;};changeCells=function(d,c){c=(c/5);c=c+1;for(i=1;i<c;i++){showCell("TD"+i,"Black",d);}for(i=c;i<21;i++){showDefault("TD"+i);}};showVeryPoor=function(c,d){changeCells("#EE0000",c);};showPoor=function(c,d){changeCells("#FF6103",c);};showAverage=function(c,d){changeCells("#FFE303",c);};showGood=function(c,d){changeCells("#98FB98",c);};showStrong=function(c,d){changeCells("#228B22",c);};showUndetermined=function(){showVeryPoor(0,"#EE0000");};passwordChanged=function(r,p,t,B,u,w){var z=0;var q=p;var s=new RegExp("(?=.*[A-Z])(?=.*[a-z]).*","g");var v=new RegExp("(?=.*[0-9]).*","g");var y=new RegExp("(?=.*[_]).*","g");var C=document.getElementById(r).value;z=C.length*5;if(s.test(C)){z=z+20;}if(v.test(C)){z=z+15;}if(y.test(C)){z=z+10;}if(z<31){showVeryPoor(z);}else{if(z<46){showPoor(z);q=t;}else{if(z<66){showAverage(z);q=B;}else{if(z<91){showGood(z);q=u;}else{if(z>90){q=w;if(z>100){z=100;}showStrong(z);}else{showVeryPoor(z);}}}}}document.getElementById("txtDisplay").innerHTML=q;};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 b=new SB.sharedWallet.LoginPopup(this);b.setupEnterSubmit();b.bindLoginClick();});};SB.sharedWallet.LoginPopup=function(b){this.div=b;};SB.sharedWallet.LoginPopup.prototype={setupEnterSubmit:function(){var b=this;$("input").keydown(function(a){if(a.keyCode==13){b.handleLogin();return false;}});},bindLoginClick:function(){var b=this;$("#modCustLoginIFrameLogin").click(function(){b.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 d=location.href.split(":")[0];var c=$(this).attr("popup");if(d=="http"){SB.base.deferWindowCommand(c+"","popup",false);}else{SB.base.OpenDivCheckLoginStatus(c+"","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={MakeInlineErrorHandledRequest:function(f,e,g){var h=this;$.ajax({url:f,type:"GET",success:g,error:function(a){var b=$(h.serverErrorSelector);$(e).html(b.html());}});},MakeInlineErrorHandledDivReplacementWithProcessingImg:function(f,e,g){var h=this;$(e).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:f,type:"GET",success:function(b,a){g(b,a);},error:function(a){var b=$(h.serverErrorSelector);$(e).html(b.html());}});},PostPopupFormWithDefaultErrorHandling:function(e,g){var h=this;var f=$(e);SB.base.holdingDiv("show");f.ajaxForm({success:function(a){SB.base.holdingDiv("hide");if(g){g(a);}else{$("#popupContent").html(a);}},error:function(a){SB.base.holdingDiv("hide");h.popupErrorHandler("#popLayer2",2);}});f.submit();},popupErrorHandler:function(c,d){$(c).html($(this.serverErrorSelector).html());$(".popupHead a",c).attr("id","closeServerError");$(".popupHead a",c).removeAttr("onclick");$("a#closeServerError",c).click(function(){SB.base.divPopUp(d,"hide");return false;});SB.base.divPopUp(d,"show");SB.base.centerPopWin(d);},defaultDivErrorHandler:function(d){var c=$(this.serverErrorSelector);$(d).html(c.html());},defaultDivSuccessHandler:function(c,d){$(c).html(d);}};SB.sharedWallet.AhahRequest=new SB.sharedWallet.AhahRequest();SB.sharedWallet.AhahDivReplacer=function(d,c){this.url=d;this.targetDiv=c;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(b){this.postSuccessHandler=b;return this;},withSuccessHandler:function(b){this.successHandler=b;return this;},withErrorHandler:function(b){this.errorHandler=b;return this;},withPostErrorHandler:function(b){this.postErrorHandler=b;return this;},withFrameErrorHandler:function(){this.errorHandler=function(b){SB.sharedWallet.AhahRequest.popupErrorHandler("#popLayer2",2);};return this;},withProcessingImg:function(){this.hasProcessingImg=true;return this;},withProcessingHandler:function(b){this.processingHandler=b;return this;},execute:function(){var b=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:b.url,type:"GET",success:function(a){b.successHandler(b.targetDiv,a);b.postSuccessHandler(a);},error:function(a){b.errorHandler(b.targetDiv);b.postErrorHandler(a);}});}};SB.sharedWallet.AhahFormSubmitter=function(b){this.formSelector=b;this.successHandler=function(a){$("#popupContent").html(a);};};SB.sharedWallet.AhahFormSubmitter.prototype={withSuccessHandler:function(b){this.successHandler=b;this.holdingDivEnabled=true;return this;},withSuccessTarget:function(b){this.successHandler=function(a){$(b).html(a);};return this;},withHoldingDivEnabled:function(b){this.holdingDivEnabled=b;return this;},execute:function(){var d=this;var c=$(this.formSelector);this.holdingDivIfRequired("show");c.ajaxForm({success:function(a){d.holdingDivIfRequired("hide");d.successHandler(a);SB.base.centerPopWin();},error:function(a){d.holdingDivIfRequired("hide");SB.sharedWallet.AhahRequest.popupErrorHandler("#popLayer2",2);SB.base.centerPopWin();}});c.submit();},holdingDivIfRequired:function(b){if(this.holdingDivEnabled){SB.base.holdingDiv(b);}}};