var SNSBankExtra={};var SNSBankAccount={};var SNSBankAccountEx={};var SNSLocation={};var SNSInterestOnAccount={};var SNSAccountProperties={};var SNSasyncPostcode={};var SNSNearestOffice={};var SNSLogoutOnUnload={};var SNSAutoLogout={};var SNSAccountDropdown={};var SNSDigipasLimit={};var SNSCustomerDropdown={};var SNSCustomerProperties={};SNSBankExtra.init=function(){SNSBankAccount.init();SNSBankAccountEx.init();SNSInterestOnAccount.init();SNSasyncPostcode.init();SNSNearestOffice.init();SNSLogoutOnUnload.init();SNSAutoLogout.init();SNSDigipasLimit.init();SNSAccountProperties.init()};function dateChanged(B){var H,E,F,D,C,I,A,G;if(document.getElementById){D=document.getElementById("datepickerDay"+B);C=document.getElementById("datepickerMonth"+B);I=document.getElementById("datepickerYear"+B);A=document.getElementById("datepickerWMformpart"+B)}else{D=document.all["datepickerDay"+B];C=document.all["datepickerMonth"+B];I=document.all["datepickerYear"+B];A=document.all["datepickerWMformpart"+B]}if(D.value==""||C.value==""||I.value==""){G=""}else{if(D.value.length==1){realdayel="0"+D.value}else{realdayel=D.value}if(C.value.length==1){realmonthel="0"+C.value}else{realmonthel=C.value}G=realdayel+"-"+realmonthel+"-"+I.value}A.value=G;if(!G==""){if(A.className.indexOf("WVcheckage")>=0){WvAgeCheck(D.value,C.value,I.value)}}else{if(document.getElementById("WVmelding")&&A.className.indexOf("WVcheckage")>=0){document.getElementById("WVmelding").style.display="none"}}return true}function WvAgeCheck(C,F,D){if(!document.getElementById("WVmelding")){return }var B=new Date(D,F-1,C);var A=new Date();var E=new Date(A.getFullYear()-18,A.getMonth(),A.getDate());if(B>E){document.getElementById("WVmelding").style.display="block"}else{document.getElementById("WVmelding").style.display="none"}}function dateLoad(B){var I,F,G,E,C,K,A,H;if(document.getElementById){E=document.getElementById("datepickerDay"+B);C=document.getElementById("datepickerMonth"+B);K=document.getElementById("datepickerYear"+B);A=document.getElementById("datepickerWMformpart"+B)}else{E=document.all["datepickerDay"+B];C=document.all["datepickerMonth"+B];K=document.all["datepickerYear"+B];A=document.all["datepickerWMformpart"+B]}var J=A.value;if(J==""||J.split("-").length!=3){E.value="";C.value="";K.value=""}else{var D=J.split("-");E.value=D[0];C.value=D[1];K.value=D[2]}if(!J==""){if(A.className.indexOf("WVcheckage")>=0){WvAgeCheck(E.value,C.value,K.value)}}else{if(document.getElementById("WVmelding")&&A.className.indexOf("WVcheckage")>=0){document.getElementById("WVmelding").style.display="none"}}}function removeAllOptions(A){var B;for(B=A.options.length-1;B>=0;B--){A.remove(B)}A.options.length=0}function addOption(B,D,C,E){var A=document.createElement("OPTION");A.text=D;A.value=C;if(E){A.id=E}B.options.add(A)}function isVisible(A){var B=true;while(A){if(A.style.display=="none"){return false}if(A.parentNode.tagName!="FORM"){A=A.parentNode}else{A=null}}return B}function onCompleteHandlerFire(A){el=this.scope.getEl();el.style.background="transparent"}function clientAction(I,A){var F=0;itemNode=document.getElementById(I+"_"+F);while(itemNode){var E=0;var G=0;actionNode=document.getElementsByName(itemNode.value);if(actionNode.length==0){actionNode=document.getElementsByTagName("span")}while(actionNode[E]){if(actionNode[E].getAttribute("name")==itemNode.value){realActionNode=actionNode[E].parentNode;if(itemNode.nodeName=="OPTION"){if(A==""){G=1}realActionNode.style.display=itemNode.selected?"block":"none"}else{realActionNode.style.display=itemNode.checked?"block":"none"}if(itemNode.checked&&A==""){G=1}if(G==1){var J=realActionNode.getElementsByTagName("FIELDSET");for(var D=0;D<J.length;D++){if(J[D].className.indexOf("conditional")>=0){J[D].style.backgroundColor="#ff0";var C=new YAHOO.util.ColorAnim(J[D],{backgroundColor:{to:"#fff"}},3,YAHOO.util.Easing.easeOut);C.onComplete.fire=onCompleteHandlerFire;C.animate()}}var B=realActionNode.getElementsByTagName("P");for(var D=0;D<B.length;D++){if(B[D].className.indexOf("conditional")>=0){B[D].style.backgroundColor="#ff0";var C=new YAHOO.util.ColorAnim(B[D],{backgroundColor:{to:"#fff"}},3,YAHOO.util.Easing.easeOut);C.onComplete.fire=onCompleteHandlerFire;C.animate()}}}var H=null;if(realActionNode.childNodes[1].name=="formpartcode"){H=document.getElementsByName(realActionNode.childNodes[1].value)[0]}else{if(realActionNode.childNodes[2]&&realActionNode.childNodes[2].name=="formpartcode"){H=document.getElementsByName(realActionNode.childNodes[2].value)[0]}}if((H&&H.className.indexOf("clearvalue conditional")!=-1)){H.value=""}}E++}F++;itemNode=document.getElementById(I+"_"+F)}}function clientPrefilling(C,A){itemNode=document.getElementById(C);if(itemNode){fill_inputs=(itemNode.checked);var B=0;actionNode=document.getElementsByName("clientprefill");while(actionNode[B]){prev_node=actionNode[B].previousSibling;while(prev_node&&prev_node.tagName!="INPUT"){prev_node=prev_node.previousSibling}if(prev_node&&prev_node.tagName=="INPUT"){if(A=="noClear"){if(fill_inputs){prev_node.value=actionNode[B].value}}else{prev_node.value=fill_inputs?actionNode[B].value:""}}B++}}}function convertAccountNr(A){if(A.charAt(0)=="0"){A=A.substring(1)}if(A.length==10){A=A.replace(/(\S{7})/i,"$1.");A=A.replace(/(\S{5})/i,"$1.");A=A.replace(/(\S{3})/i,"$1.")}else{if(A.length==9){A=A.replace(/(\S{6})/i,"$1.");A=A.replace(/(\S{4})/i,"$1.");A=A.replace(/(\S{2})/i,"$1.")}else{}}return A}function popup(C,B){var D=screen.width-100;var A=screen.height-100;var F=(screen.width-D)/2;var E=(screen.height-A)/2;var G="width="+D+", height="+A;G+=", top="+E+", left="+F;G+=", directories=no";G+=", location=no";G+=", menubar=no";G+=", resizable=no";G+=", scrollbars=yes";G+=", status=no";G+=", toolbar=no";newwin=window.open(C,B,G);if(window.focus){newwin.focus()}return newwin}function fireAjaxRequest(B,C,A){if(window.XMLHttpRequest){C.ajaxRequest=new XMLHttpRequest()}else{if(window.ActiveXObject){C.ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP")}}C.ajaxRequest.open("Post","/web/wcbservlet/nl.gx.snsbank.snsbankhandling.ajaxservlet?ep="+C.headerId,true);if(C.ajaxRequest.overrideMimeType){C.ajaxRequest.overrideMimeType("text/xml")}C.ajaxRequest.setRequestHeader("SNS_Async_Request",C.headerId);C.ajaxRequest.onreadystatechange=function(){processAjaxResponse(C,A)};C.ajaxRequest.send(B)}function processAjaxResponse(C,A){if(C.ajaxRequest==null){processResult(null,C);return }if(C.ajaxRequest.readyState==4){if(C.ajaxRequest.status==200){try{A(C.ajaxRequest.responseXML,C)}catch(B){A(null,C)}}else{A(null,C)}}}function getElementsByAttribute(H,I,J,D){var E=(I=="*"&&H.all)?H.all:H.getElementsByTagName(I);var C=new Array();var G=(typeof D!="undefined")?new RegExp("(^|\\s)"+D+"(\\s|$)"):null;var A;var F;for(var B=0;B<E.length;B++){A=E[B];F=A.getAttribute&&A.getAttribute(J);if(typeof F=="string"&&F.length>0){if(typeof D=="undefined"||(G&&G.test(F))){C.push(A)}}}return C}function getChildContents(C,B){var A=C.getElementsByTagName(B);if(A.length>0){if(A[0].childNodes.length>0){if(A[0].childNodes[0].nodeType==3){return A[0].childNodes[0].nodeValue}return""}}return null}SNSasyncPostcode.formData=new Array();SNSasyncPostcode.init=function(){var A=[];allForms=document.getElementsByTagName("FORM");for(var C=0;C<allForms.length;C++){if(allForms[C].element&&allForms[C].getAttribute("name")=="f"+allForms[C].element.value+"f"){formName=allForms[C].getAttribute("name");allFields=getElementsByClassName("SNSasyncPostcode","input",allForms[C]);SNSasyncPostcode.formData[formName]=new Array();SNSasyncPostcode.formData[formName]["form"]=allForms[C];for(var B=0;B<allFields.length;B++){if(allFields[B].id.indexOf("postcode")!=-1){if(SNSasyncPostcode.formData[formName]["zipcodeField"]==null){SNSasyncPostcode.formData[formName]["zipcodeField"]=new Array()}SNSasyncPostcode.formData[formName]["zipcodeField"][allFields[B].id]=allFields[B];if(SNSasyncPostcode.formData[formName]["zipcodeFieldId"]==null){SNSasyncPostcode.formData[formName]["zipcodeFieldId"]=new Array()}SNSasyncPostcode.formData[formName]["zipcodeFieldId"][allFields[B].id]=allFields[B].getAttribute("name");Main.addEvent(SNSasyncPostcode.formData[formName]["zipcodeField"][allFields[B].id],"blur",function(){SNSasyncPostcode.find(this,SNSasyncPostcode.formData[formName])});if(SNSasyncPostcode.formData[formName]["cachedZipcodeValue"]==null){SNSasyncPostcode.formData[formName]["cachedZipcodeValue"]=new Array()}SNSasyncPostcode.formData[formName]["cachedZipcodeValue"][allFields[B].id]=""}if(allFields[B].id.indexOf("huisnummer")!=-1){if(SNSasyncPostcode.formData[formName]["housenumberField"]==null){SNSasyncPostcode.formData[formName]["housenumberField"]=new Array()}SNSasyncPostcode.formData[formName]["housenumberField"][allFields[B].id]=allFields[B];SNSasyncPostcode.formData[formName]["housenumberField"][allFields[B].id].supressError=false;A.push(allFields[B]);if(SNSasyncPostcode.formData[formName]["housenumberFieldId"]==null){SNSasyncPostcode.formData[formName]["housenumberFieldId"]=new Array()}SNSasyncPostcode.formData[formName]["housenumberFieldId"][allFields[B].id]=allFields[B].getAttribute("name");Main.addEvent(SNSasyncPostcode.formData[formName]["housenumberField"][allFields[B].id],"blur",function(){SNSasyncPostcode.find(this,SNSasyncPostcode.formData[formName])});if(SNSasyncPostcode.formData[formName]["cachedHousenumberValue"]==null){SNSasyncPostcode.formData[formName]["cachedHousenumberValue"]=new Array()}SNSasyncPostcode.formData[formName]["cachedHousenumberValue"][allFields[B].id]=""}if(allFields[B].id.indexOf("woonplaats")!=-1){if(SNSasyncPostcode.formData[formName]["cityField"]==null){SNSasyncPostcode.formData[formName]["cityField"]=new Array()}SNSasyncPostcode.formData[formName]["cityField"][allFields[B].id]=allFields[B];SNSasyncPostcode.formData[formName]["cityField"][allFields[B].id].readOnly=true;SNSasyncPostcode.formData[formName]["cityField"][allFields[B].id].className=SNSasyncPostcode.formData[formName]["cityField"][allFields[B].id].className+" disabled"}if(allFields[B].id.indexOf("straat")!=-1){if(SNSasyncPostcode.formData[formName]["streetField"]==null){SNSasyncPostcode.formData[formName]["streetField"]=new Array()}SNSasyncPostcode.formData[formName]["streetField"][allFields[B].id]=allFields[B];SNSasyncPostcode.formData[formName]["streetField"][allFields[B].id].readOnly=true;SNSasyncPostcode.formData[formName]["streetField"][allFields[B].id].className=SNSasyncPostcode.formData[formName]["streetField"][allFields[B].id].className+" disabled"}}if(SNSasyncPostcode.formData[formName]==null||(SNSasyncPostcode.formData[formName]["cityField"]==null)||(SNSasyncPostcode.formData[formName]["streetField"]==null)||(SNSasyncPostcode.formData[formName]["zipcodeField"]==null)||(SNSasyncPostcode.formData[formName]["housenumberField"]==null)){SNSasyncPostcode.formData[formName]=null}else{SNSasyncPostcode.formData[formName]["headerId"]="betrokkenpartij";SNSasyncPostcode.formData[formName]["ajaxRequest"]=null;SNSasyncPostcode.formData[formName]["errorMessage"]="Deze combinatie van postcode en huisnummer is niet bij ons bekend, vul de woonplaats en straat zelf in.";SNSasyncPostcode.formData[formName]["method"]="findPostcode";for(k=0;k<A.length;k++){A[k].supressError=true;SNSasyncPostcode.find(document.getElementById(A[k].id),SNSasyncPostcode.formData[formName])}}}}};SNSasyncPostcode.find=function(E,D){var B;var A;if(E&&E.target){E=E.target}if(typeof (event)!="undefined"){if(event.srcElement){E=event.srcElement}}current_id=E.id;if(current_id.indexOf("huisnummer")!=-1){B=current_id;A=current_id.replace("huisnummer","postcode")}else{if(current_id.indexOf("postcode")!=-1){B=current_id.replace("postcode","huisnummer");A=current_id}else{D.housenumberField[B].supressError=false;return }}removeError(D.form,D.housenumberFieldId[B]);removeError(D.form,D.zipcodeFieldId[A]);if((D.zipcodeField[A].value=="")||(D.housenumberField[B].value=="")){D.cachedZipcodeValue[A]="";D.cachedHousenumberValue[B]="";D.housenumberField[B].supressError=false;return }if((D.zipcodeField[A].value==D.cachedZipcodeValue[A])&&(D.housenumberField[B].value==D.cachedHousenumberValue[B])){D.housenumberField[B].supressError=false;return }formattedZipcodeField=SNSasyncPostcode.format(D.zipcodeField[A].value);if(formattedZipcodeField==null&&SNSasyncPostcode.supressError==false){setError(D.form,D.zipcodeFieldId[A],"Dit is geen juiste postcode. Vul een postcode in die bestaat uit vier cijfers en twee letters.");D.housenumberField[B].supressError=false;return }D.zipcodeField[A].value=formattedZipcodeField;D.cachedZipcodeValue[A]=formattedZipcodeField;D.cachedHousenumberValue[B]=D.housenumberField[B].value;D.current_id=E.id;var C='<?xml version="1.0"?>';C+="<asyncRequest>";C+="<method>"+D.method+"</method>";C+="<parameters>";C+="<postcode>"+formattedZipcodeField+"</postcode>";C+="<houseNumber>"+D.housenumberField[B].value+"</houseNumber>";C+="</parameters>";C+="</asyncRequest>";fireAjaxRequest(C,D,SNSasyncPostcode.processResult)};SNSasyncPostcode.format=function(A){expr=/^\d{4}\s*[a-zA-Z]{2}\s*$/;if(!expr.test(A)){return null}A=A.replace(/^\s+|\s+$/g,"");if(A.length==6){A=A.substring(0,4)+" "+A.substring(4)}return A.toUpperCase()};SNSasyncPostcode.processResult=function(C,E){current_id=E.current_id;if(current_id.indexOf("huisnummer")!=-1){hnField=current_id;zipField=current_id.replace("huisnummer","postcode");cityField=current_id.replace("huisnummer","woonplaats");streetField=current_id.replace("huisnummer","straat")}else{if(current_id.indexOf("postcode")!=-1){hnField=current_id.replace("postcode","huisnummer");zipField=current_id;cityField=current_id.replace("postcode","woonplaats");streetField=current_id.replace("postcode","straat")}else{return }}removeError(E.form,E.housenumberFieldId[hnField]);removeError(E.form,E.zipcodeFieldId[zipField]);var A="";var B="";var D="";if(C!=null){A=C.getElementsByTagName("faultcode");B=getChildContents(C,"city");D=getChildContents(C,"address")}if(((B==""||!B)&&(D==""||!D))||A.length>0){E.cityField[cityField].readOnly=false;E.streetField[streetField].readOnly=false;if(E.housenumberField[hnField].supressError==false){setError(E.form,E.housenumberFieldId[hnField],E.errorMessage)}E.housenumberField[hnField].supressError=false;return }E.cityField[cityField].value=B;E.cityField[cityField].readOnly=true;E.streetField[streetField].value=D;E.streetField[streetField].readOnly=true;E.housenumberField[hnField].supressError=false};function SNSmap(A,B){this.name=A;this.value=B}var SNScalculation={};SNScalculation.calculate=function(C,A,B){if(C==""){C='"calculatorForm"'}formNode=document.forms[C];inputs=SNScalculation.listFormInputs(formNode);var D="";for(i=0;i<inputs.length;i++){if(inputs[i].name=="type"){D=inputs[i].value}}var E='<?xml version="1.0"?>';E+="<asyncRequest>";E+="<method>"+D+"</method>";E+="<parameters>";for(i=0;i<inputs.length;i++){E+="<"+inputs[i].name+">"+inputs[i].value+"</"+inputs[i].name+">"}E+="</parameters>";E+="</asyncRequest>";formData=new Array();formData.headerId=B;formData.type=D;formData.requestXml=E;fireAjaxRequest(E,formData,A)};SNScalculation.listFormInputs=function(B){var A=new Array();inputNodes=B.getElementsByTagName("INPUT");for(i=0;i<inputNodes.length;i++){if(inputNodes[i].type=="text"||inputNodes[i].type=="hidden"){A.push(new SNSmap(inputNodes[i].name,inputNodes[i].value))}}selectNodes=B.getElementsByTagName("SELECT");for(i=0;i<selectNodes.length;i++){A.push(new SNSmap(selectNodes[i].name,selectNodes[i].options[selectNodes[i].selectedIndex].value))}return A};function showHiddenContainer(C){var B=new Array();var D;var A;D=document;B=getElementsByClassName(C);for(i=0;i<B.length;i++){B[i].className=B[i].className.replace(C,"")}}var SNShiddenFields={};SNShiddenFields.fill=function(A){var B=document.getElementById(A);if(B==null){return }inputNodes=B.getElementsByTagName("INPUT");for(i=0;i<inputNodes.length;i++){if(inputNodes[i].type=="hidden"&&inputNodes[i].id!=null&&inputNodes[i].id.indexOf("hidden")==0){if(document.getElementById(inputNodes[i].id.substring(6))){if(document.getElementById(inputNodes[i].id.substring(6)).nodeName=="SPAN"){inputNodes[i].value=document.getElementById(inputNodes[i].id.substring(6)).innerHTML}else{inputNodes[i].value=document.getElementById(inputNodes[i].id.substring(6)).value}}}}};var SNSInterest={};SNSInterest.GetInterestlist=function(C,A,B){if(C==""){C='"interestForm"'}formNode=document.forms[C];inputs=SNScalculation.listFormInputs(formNode);var D="";for(i=0;i<inputs.length;i++){if(inputs[i].name=="type"){D=inputs[i].value}}var E='<?xml version="1.0"?>';E+="<asyncRequest>";E+="<method>"+D+"</method>";E+="<parameters>";for(i=0;i<inputs.length;i++){E+="<"+inputs[i].name+">"+inputs[i].value+"</"+inputs[i].name+">"}E+="</parameters>";E+="</asyncRequest>";formData=new Array();formData.headerId=B;formData.type=D;formData.requestXml=E;fireAjaxRequest(E,formData,A)};function FormatNumberBy3(B,C,A){if(arguments.length==2){A=","}if(arguments.length==1){A=",";C="."}B=B.toString();a=B.split(C);x=a[0];y=a[1];z="";if(typeof (x)!="undefined"){for(i=x.length-1;i>=0;i--){z+=x.charAt(i)}z=z.replace(/(\d{3})/g,"$1"+A);if(z.slice(-A.length)==A){z=z.slice(0,-A.length)}x="";for(i=z.length-1;i>=0;i--){x+=z.charAt(i)}if(typeof (y)!="undefined"&&y.length>0){x+=C+y}}return x}function FormatMortgageNumber(A){return FormatNumberBy3(Math.round(A),",",".")+",-"}function StripFormatMortgageNumber(A){return A.replace(/\./g,"").replace(/,/g,"").replace(/-/g,"")}function setCutoffParameters(D,A,C){if(C>=1){return""}var E="&hascutofflist=1";var B=Math.round(C*(A-D));E="&cutoff_4=75,"+(B+D)+E;B=Math.round(C*(B));E="&cutoff_3=50,"+(B+D)+E;B=Math.round(C*(B));E="&cutoff_2=25,"+(B+D)+E;E="&cutoff_1=0,"+D+E;return E}SNSBankAccount.init=function(){if(typeof (SNSBankAccount.is_klant)=="undefined"||SNSBankAccount.is_klant=="ja"){return }var B=getElementsByClassName("SNSBankAccount");for(var A=0;A<B.length;A++){if(obj.addEventListener){Main.addEvent(B[A],"change",function(){SNSBankAccount.check(this.name)})}else{Main.addEvent(B[A],"change",function(){SNSBankAccount.check(event.srcElement.name)})}}};SNSBankAccount.check=function(B){var C="";var A="";if(document.getElementsByName("type").length>0){C=document.getElementsByName("type")[0].value}if(document.getElementsByName(B).length>0){A=document.getElementsByName(B)[0].value}var D='<?xml version="1.0"?>';D+="<asyncRequest>";D+="<method>"+C+"</method>";D+="<parameters>";D+="<rekeningnummer>"+A;D+="</rekeningnummer>";D+="</parameters>";D+="</asyncRequest>";formData=new Array();formData.headerId="account";formData.type=C;formData.inputName=B;formData.requestXml=D;fireAjaxRequest(D,formData,SNSBankAccount.processResult)};SNSBankAccount.processResult=function(A,B){if(A!=null){if(getChildContents(A,"sns_rekening")=="true"){if(document.getElementById("error_"+B.inputName)){removeCheckAccountError(B.inputName)}setCheckAccountError(B.inputName)}else{removeCheckAccountError(B.inputName)}}};SNSBankAccountEx.init=function(){var C=getElementsByClassName("SNSBankAccountExStatus");var B=getElementsByClassName("SNSBankAccountEx");if(B.length==C.length){for(var A=0;A<B.length;A++){addClass(C[A],B[A].name);if(obj.addEventListener){Main.addEvent(B[A],"change",function(){SNSBankAccountEx.check(this.name)})}else{Main.addEvent(B[A],"change",function(){SNSBankAccountEx.check(event.srcElement.name)})}}}};SNSBankAccountEx.check=function(B){var C="check_sns_account";var A="";if(document.getElementsByName("type").length>0){C=document.getElementsByName("type")[0].value}if(document.getElementsByName(B).length>0){A=document.getElementsByName(B)[0].value}statusElement=getElementsByClassName(B);if(statusElement.length>0){statusElement=statusElement[0]}var D='<?xml version="1.0"?>';D+="<asyncRequest>";D+="<method>"+C+"</method>";D+="<parameters>";D+="<rekeningnummer>"+A;D+="</rekeningnummer>";D+="</parameters>";D+="</asyncRequest>";formData=new Array();formData.headerId="account";formData.type=C;formData.inputName=B;formData.resultformpart=statusElement;formData.requestXml=D;fireAjaxRequest(D,formData,SNSBankAccountEx.processResult)};SNSBankAccountEx.processResult=function(A,B){if(A!=null){if(getChildContents(A,"error_accountservice")&&getChildContents(A,"error_accountservice").length>0){B.resultformpart.value="unknown"}else{B.resultformpart.value=getChildContents(A,"sns_rekening")}}};SNSInterestOnAccount.init=function(){SNSInterestOnAccount.timeyear_id=null;fields=getElementsByClassName("SNSInterestOnAccount");for(var A=0;A<fields.length;A++){Main.addEvent(fields[A],"change",SNSInterestOnAccount.getInterest);if(fields[A].id=="eenmaligeinleg"){SNSInterestOnAccount.amount_id=fields[A]}if(fields[A].id=="looptijd_jaar"){SNSInterestOnAccount.timeyear_id=fields[A]}if(fields[A].id=="looptijd_maand"){SNSInterestOnAccount.timemonth_id=fields[A]}}if(document.getElementById("product_rsc")){SNSInterestOnAccount.productid_id=document.getElementById("product_rsc")}if(typeof (SNSInterestOnAccount.formNodeId)=="undefined"){node=SNSInterestOnAccount.amount_id;while(node&&node.tagName!="FORM"){node=node.parentNode}if(node){SNSInterestOnAccount.formNodeId=node.id}}if(SNSInterestOnAccount.productid_id&&SNSInterestOnAccount.amount_id){fields=getElementsByClassName("SNSInterestOnAccountMinValue");for(var A=0;A<fields.length;A++){if(fields[A].id=="looptijd_maand"){SNSInterestOnAccount.timemonth_id=fields[A];var B='<?xml version="1.0"?>';B+="<asyncRequest>";B+="<method>geefProducteigenschappen</method>";B+="<parameters>";B+="<productid>"+SNSInterestOnAccount.productid_id.value+"</productid>";B+="</parameters>";B+="</asyncRequest>";formData=new Array();formData.headerId="ProductInterest";formData.requestXml=B;fireAjaxRequest(B,formData,SNSInterestOnAccount.processResultMinValue)}}}else{SNSInterestOnAccount.getInterest()}};SNSInterestOnAccount.getInterest=function(){var A=null,B=null,D=null,E="year";if(SNSInterestOnAccount.productid_id){A=SNSInterestOnAccount.productid_id.value}else{return }if(SNSInterestOnAccount.amount_id){B=SNSInterestOnAccount.amount_id.value}if(SNSInterestOnAccount.timeyear_id&&SNSInterestOnAccount.timeyear_id.parentNode.parentNode.style.display=="block"){if(SNSInterestOnAccount.timeyear_id.value!=""){D=SNSInterestOnAccount.timeyear_id.value*12}else{D=SNSInterestOnAccount.timeyear_id.value}}else{if(SNSInterestOnAccount.timemonth_id){D=SNSInterestOnAccount.timemonth_id.value;E="month"}else{return }}if(A&&B&&D){srvFunction="geefRentepercentage"}else{if(A){srvFunction="checkInput"}}var C='<?xml version="1.0"?>';C+="<asyncRequest>";C+="<method>"+srvFunction+"</method>";C+="<parameters>";C+="<productid>"+A+"</productid>";C+="<time>"+D+"</time>";C+="<period>"+E+"</period>";C+="<amount>"+B+"</amount>";C+="</parameters>";C+="</asyncRequest>";formData=new Array();formData.headerId="ProductInterest";formData.requestXml=C;fireAjaxRequest(C,formData,SNSInterestOnAccount.processResult)};SNSInterestOnAccount.processResult=function(A,D){if(A!=null){var F=getChildContents(A,"interest_formatted");var C=getChildContents(A,"eenmaligeinleg");var E=getChildContents(A,"looptijd_maand");var B=getChildContents(A,"looptijd_jaar");if(F==null){F="??"}formNode=document.getElementById(SNSInterestOnAccount.formNodeId);if(formNode){removeError(formNode,SNSInterestOnAccount.amount_id.name);if(SNSInterestOnAccount.timeyear_id){removeError(formNode,SNSInterestOnAccount.timeyear_id.name)}removeError(formNode,SNSInterestOnAccount.timemonth_id.name);if(C!=null){setError(formNode,SNSInterestOnAccount.amount_id.name,C)}if(SNSInterestOnAccount.timeyear_id&&SNSInterestOnAccount.timeyear_id.parentNode.parentNode.style.display=="block"){if(B!=null){setError(formNode,SNSInterestOnAccount.timeyear_id.name,B)}}else{if(E!=null){setError(formNode,SNSInterestOnAccount.timemonth_id.name,E)}}}if(document.getElementById(SNSInterestOnAccount.result_id)){document.getElementById(SNSInterestOnAccount.result_id).innerHTML='<strong style="font-size:1.3 em;">'+F+"%</strong>"}}};SNSInterestOnAccount.processResultMinValue=function(A,B){if(A!=null){SNSInterestOnAccount.timemonth_id.value=getChildContents(A,"minLooptijd")}};SNSNearestOffice.init=function(){allFields=getElementsByClassName("SNSNearestOffice");for(var A=0;A<allFields.length;A++){if(obj.addEventListener){Main.addEvent(allFields[A],"blur",function(){SNSNearestOffice.find(this.name)})}else{Main.addEvent(allFields[A],"blur",function(){SNSNearestOffice.find(event.srcElement.name)})}if(document.getElementById("searchOffice_0")){Main.addEvent(document.getElementById("searchOffice_0"),"change",function(){SNSNearestOffice.fillSessionValueRadio0()})}if(document.getElementById("searchOffice_1")){Main.addEvent(document.getElementById("searchOffice_1"),"change",function(){SNSNearestOffice.fillSessionValueRadio1()})}if(document.getElementById("lstSearchOffice_choice")){Main.addEvent(document.getElementById("lstSearchOffice_choice"),"change",function(){SNSNearestOffice.fillSessionValueRadio1()})}}if(document.getElementById("searchOfficeSessionValue")!=null){SNSNearestOffice.loadFromSession(document.getElementById("searchOfficeSessionValue").value)}};SNSNearestOffice.find=function(B){var A="";if(document.getElementsByName(B).length>0){A=document.getElementsByName(B)[0].value}if(SNSasyncPostcode.format(A)!=null){var C='<?xml version="1.0"?>';C+="<asyncRequest>";C+="<method>singlesearchlocation</method>";C+="<parameters>";C+="<postcode>"+SNSasyncPostcode.format(A);C+="</postcode>";C+="</parameters>";C+="</asyncRequest>";formData=new Array();formData.headerId="location";formData.type="singlesearchlocation";formData.inputName=B;formData.requestXml=C;fireAjaxRequest(C,formData,SNSNearestOffice.processResult)}};SNSNearestOffice.processResult=function(A,B){if(A!=null){if((getChildContents(A,"nearestOfficeCode")!=null&&getChildContents(A,"nearestOfficeCode")!=""&&getChildContents(A,"nearestOfficeCode")!="null")&&(getChildContents(A,"nearestOfficeName")!=null&&getChildContents(A,"nearestOfficeName")!=""&&getChildContents(A,"nearestOfficeName")!="null")){if(document.getElementById("searchOffice_0")){document.getElementById("searchOffice_0").disabled=false;document.getElementById("searchOffice_0").checked=true;document.getElementById("searchOffice_0").value=getChildContents(A,"nearestOfficeCode")}if(document.getElementById("lblSearchOffice_default")){document.getElementById("lblSearchOffice_default").innerHTML=getChildContents(A,"nearestOfficeName")}if(document.getElementById("searchOfficeSessionValue")){document.getElementById("searchOfficeSessionValue").value=getChildContents(A,"nearestOfficeCode")+"|"+getChildContents(A,"nearestOfficeName")+"|searchOffice_0"}}else{if(document.getElementById("searchOffice_0")){document.getElementById("searchOffice_0").disabled=true;document.getElementById("searchOffice_0").checked=false;if(document.getElementById("searchOffice_1")){document.getElementById("searchOffice_1").checked=true}document.getElementById("searchOffice_0").value=""}if(document.getElementById("lblSearchOffice_default")&&document.getElementById("hiddenOfficeDefaultText")){document.getElementById("lblSearchOffice_default").innerHTML=document.getElementById("hiddenOfficeDefaultText").value}if(document.getElementById("searchOfficeSessionValue")){SNSNearestOffice.fillSessionValueRadio1()}}}};SNSNearestOffice.fillSessionValueRadio0=function(){var A="";if(document.getElementById("searchOffice_0")!=null&&document.getElementById("lblSearchOffice_default")!=null){A=document.getElementById("searchOffice_0").value;A+="|";A+=document.getElementById("lblSearchOffice_default").innerHTML;A+="|";A+="searchOffice_0";if(document.getElementById("searchOfficeSessionValue")){document.getElementById("searchOfficeSessionValue").value=A}}};SNSNearestOffice.fillSessionValueRadio1=function(){var A="";if(document.getElementById("searchOffice_1")&&document.getElementById("searchOffice_1").checked){if(document.getElementById("lstSearchOffice_choice")&&document.getElementById("searchOfficeSessionValue")){var C=document.getElementById("lstSearchOffice_choice");for(var B=0;B<C.length;B++){if(C.options[B].selected){A=C.options[B].value;A+="|";A+=C.options[B].text}}A+="|";A+="searchOffice_1";document.getElementById("searchOfficeSessionValue").value=A}}};SNSNearestOffice.loadFromSession=function(B){if(B.length>0){var F=B.split("|");if(F.length==3){var G=F[0];var A=F[1];var D=F[2];if(document.getElementById(D)){document.getElementById(D).checked=true}if(D=="searchOffice_0"&&document.getElementById("searchOffice_0")&&document.getElementById("lblSearchOffice_default")){document.getElementById("searchOffice_0").disabled=false;document.getElementById("searchOffice_0").value=G;document.getElementById("lblSearchOffice_default").value=A}else{if(document.getElementById("searchOffice_0")&&document.getElementById("lstSearchOffice_choice")){var E=document.getElementById("lstSearchOffice_choice");for(var C=0;C<E.length;C++){if(E.options[C].value==G){E.options[C].selected==true;document.getElementById("searchOffice_0").disabled=true}}}}}}};SNSLogoutOnUnload.url="";SNSLogoutOnUnload.postop="";SNSLogoutOnUnload.posleft="";SNSLogoutOnUnload.winwidth=250;SNSLogoutOnUnload.winheight=50;SNSLogoutOnUnload.notified=false;SNSLogoutOnUnload.init=function(){allFields=getElementsByClassName("SNSLogoutOnUnload snshidden");if(allFields.length>0){SNSLogoutOnUnload.url=allFields[0].value;try{SNSLogoutOnUnload.postop=parseInt((window.screen.width-SNSLogoutOnUnload.winwidth)/2);SNSLogoutOnUnload.posleft=parseInt((window.screen.height-SNSLogoutOnUnload.winheight)/2)}catch(B){SNSLogoutOnUnload.postop,SNSLogoutOnUnload.posleft=300}Main.addEvent(window,"unload",SNSLogoutOnUnload.extUnload);Main.eventCache.add(window,"unload",SNSLogoutOnUnload.extUnload,false);allLinks=document.getElementsByTagName("A");for(var A=0;A<allLinks.length;A++){if(allLinks[A].target==""||allLinks[A].target=="_blank"||allLinks[A].target=="_self"&&allLinks[A].target=="_top"&&allLinks[A].target=="_parent"){if(allLinks[A].className!="read"&&allLinks[A].className!="print"&&allLinks[A].className!="underline"&&allLinks[A].className!="nologoutclass"){if(allLinks[A].className=="arrow-left"||allLinks[A].className=="arrow-right"||allLinks[A].parentNode.className=="button-holder right"||allLinks[A].parentNode.parentNode.className=="button-holder right"){Main.addEvent(allLinks[A],"click",SNSLogoutOnUnload.silentUnload);Main.eventCache.add(allLinks[A],"click",SNSLogoutOnUnload.silentUnload,false)}else{Main.addEvent(allLinks[A],"click",SNSLogoutOnUnload.unload);Main.eventCache.add(allLinks[A],"click",SNSLogoutOnUnload.unload,false)}}}}allLinks=document.getElementsByTagName("INPUT");for(var A=0;A<allLinks.length;A++){if(allLinks[A].type=="button"||allLinks[A].type=="submit"||(allLinks[A].type=="image"&&allLinks[A].name!="dummybutton")){Main.addEvent(allLinks[A],"click",SNSLogoutOnUnload.unload);Main.eventCache.add(allLinks[A],"click",SNSLogoutOnUnload.unload,false)}}}return };SNSLogoutOnUnload.silentUnload=function(){SNSLogoutOnUnload.notified=true};SNSLogoutOnUnload.extUnload=function(A){if(!SNSLogoutOnUnload.notified){if(typeof (event)!="undefined"){if(event.srcElement){SNSLogoutOnUnload.unload()}else{}}else{if(A&&A.target==null){SNSLogoutOnUnload.unload()}else{}}}};SNSLogoutOnUnload.unload=function(){if(!SNSLogoutOnUnload.notified){SNSLogoutOnUnload.notified=true;handle=window.open(SNSLogoutOnUnload.url,"Uitloggen","width="+SNSLogoutOnUnload.winwidth+", height="+SNSLogoutOnUnload.winheight+", left="+SNSLogoutOnUnload.posleft+", top="+SNSLogoutOnUnload.postop+", screenX="+SNSLogoutOnUnload.posleft+", screenY="+SNSLogoutOnUnload.postop+",toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=no",true);if(handle){handle.focus()}}};SNSAutoLogout.logoutUrl=null;SNSAutoLogout.init=function(){allFields=getElementsByClassName("SNSAutoLogout");if(allFields.length>0){SNSAutoLogout.logoutUrl=allFields[0].value.split("|");if(!SNSAutoLogout.logoutUrl||SNSAutoLogout.logoutUrl.length==0){return }for(i=0;i<SNSAutoLogout.logoutUrl.length;i++){if(SNSAutoLogout.logoutUrl[i]!=""){SNSAutoLogout.asyncLogout(SNSAutoLogout.logoutUrl[i])}}}};SNSAutoLogout.asyncLogout=function(A){if(window.XMLHttpRequest){ajaxRequest=new XMLHttpRequest()}else{if(window.ActiveXObject){ajaxRequest=new ActiveXObject("Microsoft.XMLHTTP")}}ajaxRequest.open("GET",A,true);ajaxRequest.onreadystatechange=function(){};ajaxRequest.send(null)};var SNSAccountDropdown={};SNSAccountDropdown.filling=false;SNSAccountDropdown.to=null;SNSAccountDropdown.textField=null;SNSAccountDropdown.fillListTo=function(){if(SNSAccountDropdown.to!=null){window.clearTimeout(SNSAccountDropdown.to)}if(!SNSAccountDropdown.filling){SNSAccountDropdown.to=window.setTimeout(SNSAccountDropdown.fillList,600)}};SNSAccountDropdown.fillList=function(){SNSAccountDropdown.filling=true;baselist=document.getElementById("debitaccount");sublist=document.getElementById("debitcard");if(baselist&&sublist){removeAllOptions(sublist);for(i=0;i<lists[baselist.options[baselist.selectedIndex].value].length;i++){if(lists[baselist.options[baselist.selectedIndex].value][i]!=null){addOption(sublist,lists[baselist.options[baselist.selectedIndex].value+"_txt"][i],lists[baselist.options[baselist.selectedIndex].value][i])}}}SNSAccountDropdown.filling=false};SNSAccountDropdown.initUnblockable=function(){allFields=document.getElementsByName("SNSAccountDropdownBP");if(allFields.length==1){SNSAccountDropdown.textField=allFields[0]}};SNSAccountDropdown.isDebitCardUnblockable=function(){SNSAccountDropdown.initUnblockable();debitcardList=document.getElementById("debitcard");selectedIndex=debitcardList.selectedIndex;selectedDebitcardId=debitcardList.options[selectedIndex].value;baselist=document.getElementById("debitaccount");selectedAccountNr=baselist.options[baselist.selectedIndex].value;isDebitCardUnblockable=unblockableDebitcardsList[selectedAccountNr+"-"+selectedDebitcardId];if(SNSAccountDropdown.textField!=null){if(!isDebitCardUnblockable){SNSAccountDropdown.textField.parentNode.style.backgroundColor="#ff0";SNSAccountDropdown.textField.parentNode.style.display="";var A=new YAHOO.util.ColorAnim(SNSAccountDropdown.textField.parentNode,{backgroundColor:{to:"#fff"}},3,YAHOO.util.Easing.easeOut);A.onComplete.fire=onCompleteHandlerFire;A.animate()}else{SNSAccountDropdown.textField.parentNode.style.display="none"}}};var SNSCustomerDropdown={};SNSCustomerDropdown.filling=false;SNSCustomerDropdown.to=null;SNSCustomerDropdown.changeVisibility=function(B){var A=null;var E=null;var F=null;var D=null;var C=null;if(document.getElementById("existing")){E=document.getElementById("existing")}if(document.getElementById("new")){A=document.getElementById("new")}if(document.getElementById("ILS")){F=document.getElementById("ILS")}if(document.getElementById("new_basis")){D=document.getElementById("new_basis")}if(document.getElementById("new_legitimatie")){C=document.getElementById("new_legitimatie")}role="";if(document.getElementById("hiddenWVklantnummer")){role="WV"}else{if(document.getElementById("hiddenMHklantnummer")){role="MH"}else{if(document.getElementById("hiddenGMklantnummer")){role="GM"}}}if(document.getElementById(role+"name")){naam=document.getElementById(role+"name")}if(document.getElementById("hidden"+role+"name")){hiddenName=document.getElementById("hidden"+role+"name")}if(document.getElementById(role+"birthdate")){birthdate=document.getElementById(role+"birthdate")}if(document.getElementById("hidden"+role+"birthdate")){hiddenBirthdate=document.getElementById("hidden"+role+"birthdate")}if(document.getElementById("hidden"+role+"klantnummer")){hiddenKlantnummer=document.getElementById("hidden"+role+"klantnummer")}if(document.getElementById("hidden"+role+"ILS")){hiddenILS=document.getElementById("hidden"+role+"ILS")}hiddenKlantnummer.value="0";if(E){E.style.display="none"}if(A){A.style.display="none"}if(D){D.style.display="none"}if(F){F.style.display="none"}if(C){C.style.display="none"}sourceValue="";if(document.getElementById(B)){sourceObject=document.getElementById(B);sourceValue=sourceObject.value}if(sourceValue=="new"){if(A){A.style.display="block"}if(D){D.style.display="block";if(F){F.style.display="block"}if(C){C.style.display="block"}}}else{if(sourceValue!=""&&E){naam.innerHTML=SNSCustomerProperties.initials[sourceValue]+" "+SNSCustomerProperties.names[sourceValue];hiddenName.value=SNSCustomerProperties.initials[sourceValue]+" "+SNSCustomerProperties.names[sourceValue];birthdate.innerHTML=SNSCustomerProperties.birthdates[sourceValue];hiddenBirthdate.value=SNSCustomerProperties.birthdates[sourceValue];hiddenKlantnummer.value=SNSCustomerProperties.klantnummers[sourceValue];hiddenILS.value=SNSCustomerProperties.ILS[sourceValue];E.style.display="block";if(SNSCustomerProperties.ILS[sourceValue]&&F){F.style.display="none"}else{F.style.display="block"}}else{if(!E&&A){A.style.display="block"}if(!E&&D){D.style.display="block";if(F){F.style.display="block"}if(C){C.style.display="block"}}}}};var SNSDigipasLimit={};SNSDigipasLimit.fields=new Array();SNSDigipasLimit.to=null;SNSDigipasLimit.checking=false;SNSDigipasLimit.init=function(){allFields=getElementsByClassName("SNSDigipasLimiet");if(allFields.length>0){for(i=0;i<allFields.length;i++){switch(allFields[i].tagName){case"INPUT":SNSDigipasLimit.fields.input=allFields[i];Main.addEvent(allFields[i],"mouseup",SNSDigipasLimit.checkLimit);Main.addEvent(allFields[i],"keyup",SNSDigipasLimit.checkLimitTo);Main.eventCache.add(allFields[i],"mouseup",SNSDigipasLimit.checkLimit,false);Main.eventCache.add(allFields[i],"keyup",SNSDigipasLimit.checkLimitTo,false);break;case"P":if(allFields[i].className.indexOf("high")>=0){SNSDigipasLimit.fields.msg_high=allFields[i]}else{SNSDigipasLimit.fields.msg_low=allFields[i]}break;case"DIV":SNSDigipasLimit.fields["listnode-permanent"]=null;SNSDigipasLimit.fields["listnode-tijdelijk"]=null;var A=allFields[i].firstChild;while(A&&(SNSDigipasLimit.fields["listnode-permanent"]==null||SNSDigipasLimit.fields["listnode-tijdelijk"]==null)){if(A.tagName=="INPUT"&&A.value=="permanent"){SNSDigipasLimit.fields["listnode-permanent"]=A}if(A.tagName=="INPUT"&&A.value=="tijdelijk"){SNSDigipasLimit.fields["listnode-tijdelijk"]=A}A=A.nextSibling}break}}SNSDigipasLimit.checkLimit()}};SNSDigipasLimit.checkLimitTo=function(){if(SNSDigipasLimit.to!=null){window.clearTimeout(SNSDigipasLimit.to)}if(!SNSDigipasLimit.checking){SNSDigipasLimit.to=window.setTimeout(SNSDigipasLimit.checkLimit,600)}};SNSDigipasLimit.checkLimit=function(){SNSDigipasLimit.checking=true;if(SNSDigipasLimit.fields.input&&SNSDigipasLimit.fields.msg_high&&SNSDigipasLimit.fields.msg_low&&SNSDigipasLimit.fields["listnode-permanent"]&&SNSDigipasLimit.fields["listnode-tijdelijk"]){if(parseInt(SNSDigipasLimit.fields.input.value)==0){removeClass(SNSDigipasLimit.fields.msg_low,"snshidden")}else{addClass(SNSDigipasLimit.fields.msg_low,"snshidden")}if(parseInt(SNSDigipasLimit.fields.input.value)>100000){SNSDigipasLimit.fields["listnode-permanent"].checked="";SNSDigipasLimit.fields["listnode-tijdelijk"].checked="checked";removeClass(SNSDigipasLimit.fields.msg_high,"snshidden")}else{addClass(SNSDigipasLimit.fields.msg_high,"snshidden")}SNSDigipasLimit.fields["listnode-permanent"].disabled=(parseInt(SNSDigipasLimit.fields.input.value)>100000)?"true":""}SNSDigipasLimit.checking=false};var SNSAccountProperties={};SNSAccountProperties.fields=new Array();SNSAccountProperties.formId="";SNSAccountProperties.select_current=null;SNSAccountProperties.busy=null;SNSAccountProperties.reactionTo=null;SNSAccountProperties.init=function(){allFields=getElementsByClassName("SNSAccountProperties");if(allFields.length>0){for(i=0;i<allFields.length;i++){switch(allFields[i].tagName){case"SELECT":SNSAccountProperties.fields.input=allFields[i];SNSAccountProperties.formId=allFields[i].id;removeAllOptions(SNSAccountProperties.fields.input);addOption(SNSAccountProperties.fields.input,"Maak een keuze","",allFields[i].id+"_0");if(SNSAccountProperties.accounts.length==SNSAccountProperties.accountTexts.length){for(A=0;A<SNSAccountProperties.accounts.length;A++){if(SNSAccountProperties.accounts[A]!=null){addOption(SNSAccountProperties.fields.input,SNSAccountProperties.accountTexts[A],SNSAccountProperties.accounts[A],allFields[i].id+"_"+A+1)}}}for(var A=0,B;B=allFields[i].options[A];A++){if(B.value==""&&A>0){B.disabled="disabled";B.style.color="#aaa"}}isIE6=navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;isIE7=navigator.userAgent.toLowerCase().indexOf("msie 7")!=-1;if(isIE6||isIE7){Main.addEvent(allFields[i],"focus",function(){SNSAccountProperties.select_current=SNSAccountProperties.fields.input.selectedIndex});Main.addEvent(allFields[i],"change",function(){SNSAccountProperties.restore()})}if(allFields[i].className.indexOf("checkBlocked")>=0){Main.addEvent(allFields[i],"change",SNSAccountProperties.getProperties);Main.eventCache.add(allFields[i],"change",SNSAccountProperties.getProperties,false)}break;case"P":if(allFields[i].className.indexOf("blocked")>=0){SNSDigipasLimit.fields.blocked=allFields[i]}allFields[i].style.color="red";break}}}};SNSAccountProperties.restore=function(){if(SNSAccountProperties.fields.input.options[SNSAccountProperties.fields.input.selectedIndex].disabled){SNSAccountProperties.fields.input.selectedIndex=SNSAccountProperties.select_current}};SNSAccountProperties.getPropertiesTo=function(){if(SNSAccountProperties.reactionTo!=null){window.clearTimeout(SNSAccountProperties.reactionTo)}if(SNSAccountProperties.busy==null){SNSAccountProperties.reactionTo=window.setTimeout(SNSAccountProperties.getProperties,600)}};SNSAccountProperties.clearTimeout=function(){selectObj.disabled="";if(SNSAccountProperties.busy!=null){window.clearTimeout(SNSAccountProperties.busy);SNSAccountProperties.busy=null}};SNSAccountProperties.getProperties=function(){selectObj=SNSAccountProperties.fields.input;if(SNSAccountProperties.busy==null&&selectObj!=null&&selectObj.options[selectObj.selectedIndex].value!=""){SNSAccountProperties.busy=window.setTimeout(SNSAccountProperties.clearTimeout,30000);selectObj.disabled="disabled";var A='<?xml version="1.0"?>';A+="<asyncRequest>";A+="<method>check_account_blocked</method>";A+="<parameters>";A+="<rekeningnummer>"+selectObj.options[selectObj.selectedIndex].value;A+="</rekeningnummer>";A+="</parameters>";A+="</asyncRequest>";formData=new Array();formData.headerId="account";formData.type="accountproperties";formData.requestXml=A;fireAjaxRequest(A,formData,SNSAccountProperties.processResult)}};SNSAccountProperties.processResult=function(A,B){if(A==null){SNSAccountProperties.clearTimeout();return }if(document.getElementById("error_"+SNSAccountProperties.formId)!=null){addClass(document.getElementById("error_"+SNSAccountProperties.formId),"snshidden")}if(getChildContents(A,"blocked")=="true"){removeClass(SNSDigipasLimit.fields.blocked,"snshidden")}else{addClass(SNSDigipasLimit.fields.blocked,"snshidden")}SNSAccountProperties.clearTimeout()};function checkMVTSNSCookie(){if(document.cookie.length>0){offset=document.cookie.indexOf("MVT_SNS");if(offset!=-1){protocol="http:";url="//www6.tmvtp.com/allocator/execute/17454767912426030803";if(document.location.protocol=="https:"){protocol="https:"}url=protocol+url;document.write('<script src="',url,'" type="text/javascript"><script>')}}}SNSBankExtra.BBcodeToHTML=function(B){var A;A=B;search=new Array(/\[br\]/g,/\[url=(.*?)\](.*?)\[\/url\]/g,/\[b\](.*?)\[\/b\]/g,/\[small\](.*?)\[\/small\]/g);replace=new Array("<br/>",'<a target="_blank" class="dummy" style="cursor:pointer; text-decoration:underline; color:#FF0000" href="$1">$2</a>',"<b>$1</b>","<small>$1</small>");for(i=0;i<search.length;i++){A=A.replace(search[i],replace[i])}return A};function limitText(B,A){if(B.value.length>A){B.value=B.value.substring(0,A)}}Main.addEvent(window,"load",SNSBankExtra.init);Main.eventCache.add(window,"load",SNSBankExtra.init,false);