SNS.hypotheken.maxmortgagesliders={};SNS.hypotheken.maxmortgagesliders.init=function(){SNS.hypotheken.addHelpLinks();try{SNS.hypotheken.maxmortgagesliders.eventListener()}catch(A){Main.errHandler(A)}if(flashSliders.hasRequiredFlashVersion()){var B=SNS.hypotheken.baseURL+"/swf/slider.swf";var F=document.getElementById("brutoJaarSalaris");if(F){var D=B;D+="?ID=brutoJaarSalaris";D+="&onSlider=SNS.hypotheken.maxmortgagesliders.showSliderValue";D+="&min=0";D+="&max=500000";D+="&position="+F.value;D+="&rounddecimals=2";D+=setCutoffParameters(0,500000,0.35);writeFlash(D,"flashsliderbrutoJaarSalaris","230","30")}var E=document.getElementById("brutoJaarSalarisPartner");if(E){var C=B;C+="?ID=brutoJaarSalarisPartner";C+="&onSlider=SNS.hypotheken.maxmortgagesliders.showSliderValue";C+="&min=0";C+="&max=500000";C+="&position="+E.value;C+="&rounddecimals=2";C+=setCutoffParameters(0,500000,0.35);writeFlash(C,"flashsliderbrutoJaarSalarisPartner","230","30")}}};SNS.hypotheken.maxmortgagesliders.eventListener=function(){var C=document.getElementById("formMaxMortgageSliders");if(C){var A=C.getElementsByTagName("input");for(var B=0;B<A.length;B++){if(A[B].className.indexOf("flashrepresented")!=-1){A[B].onkeyup=function(D){SNS.hypotheken.maxmortgagesliders.updateSliders(D)}}}}};SNS.hypotheken.maxmortgagesliders.updateSliders=function(G){var D=G||window.event;var B=D.target||D.srcElement;var F=B.id;var E=document.getElementById(F);var A=E.value;var C="flashslider"+F;if(A==0||isNaN(A)){A=0.0001}callFlashFunction(C,"setPosition",A)};SNS.hypotheken.maxmortgagesliders.showSliderValue=function(B,C){if(isNaN(C)){C=0}var A=document.getElementById(B);A.value=C};SNS.hypotheken.processResult=function(A,B){if(A!=null){document.getElementById("maximaleHypotheek").innerHTML=getChildContents(A,"maximaleHypotheek");document.getElementById("bestaandeBouw").innerHTML=getChildContents(A,"bestaandeBouw");document.getElementById("nieuwbouw").innerHTML=getChildContents(A,"nieuwbouw");document.getElementById("bruto").innerHTML=getChildContents(A,"bruto");document.getElementById("netto").innerHTML=getChildContents(A,"netto");document.getElementById("rente").innerHTML=getChildContents(A,"rente");if(getChildContents(A,"errorMaxHypotheekAlg")=="true"){document.getElementById("errorMaxHypotheekAlg").style.visibility="visible"}else{document.getElementById("errorMaxHypotheekAlg").style.visibility="hidden"}if(getChildContents(A,"errorMaxHypotheekInvoerveld")=="true"){document.getElementById("errorMaxHypotheekInvoerveld").style.visibility="visible"}else{document.getElementById("errorMaxHypotheekInvoerveld").style.visibility="hidden"}SNShiddenFields.fill()}};Main.addEvent(window,"load",SNS.hypotheken.maxmortgagesliders.init);Main.eventCache.add(window,"load",SNS.hypotheken.maxmortgagesliders.init,false);
