function checkForms(){checkRegistreren();checkProfiel();checkFB();setBeoordeel();setRecommend();if(geId("ia_wijzig")){checkInfoAanvraag()}if(geId("callmenow_submit")){checkCallMeNow()}if(geId("recomform")){$("behandeling_input").observe("keyup",function(){$("b_id").value=""});new Autocomplete("behandeling_input",{serviceUrl:"/ajax?action=behandelingen&subaction=behandeling",minChars:2,maxHeight:400,width:255,deferRequestBy:100,onSelect:function(c,b){$("b_id").value=b}})}if(geId("anowijzigknop")){function a(){if(checkEmail($("anon_email").value)){$("anowijzigform").submit()}else{foutFeedback("Vul een bestaand e-mailadres in!")}}$("anowijzigknop").observe("click",a)}}function checkRouteForm(){if(geId("routePlaats").value==""){return false}if(geId("routeStraat").value==""){return false}var b=new google.maps.Geocoder();var a=geId("routeStraat").value+", "+geId("routePlaats").value;b.geocode({address:a},function(c,d,e){if(d!=google.maps.GeocoderStatus.OK){alert("Onbekend startadres");return false}else{geId("route_form").submit()}})}function clearDefaultText(b){var a=window.event?window.event.srcElement:b?b.target:null;if(!a){return}if(a.value==a.defaultText){a.value=""}}function replaceDefaultText(b){var a=window.event?window.event.srcElement:b?b.target:null;if(!a){return}if(a.value==""&&a.defaultText){a.value=a.defaultText}}function setBeoordeel(){if(geId("btn_beoordeel")){$("btn_beoordeel").observe("click",function(a){checkBeoordeel(a)})}}function checkBeoordeel(a){Event.stop(a);if($("cijfer1").innerHTML==""|$("cijfer2").innerHTML==""|$("cijfer3").innerHTML==""){foutFeedback("Geef uw beoordeling voor de drie criteria.");return false}if($("naam").value.length<2){foutFeedback("Vul uw naam in.");return false}if(!checkEmail($("email").value)){foutFeedback("Vul een correct e-mailadres in.");return false}$("rating").checkClick.value="no-spam";$("rating").submit()}function setRecommend(){if(geId("recomform")){$("behandeling_input").observe("keyup",function(){$("b_id").value=""});new Autocomplete("behandeling_input",{serviceUrl:"/ajax?action=behandelingen&subaction=behandeling&filter=ja&individual_id="+$("individual_id").value,minChars:2,maxHeight:400,width:255,deferRequestBy:100,onSelect:function(b,a){$("b_id").value=a}})}if(geId("btn_aanbevelen")){$("btn_aanbevelen").observe("click",function(a){checkRecommend(a)})}if(geId("profiel_kbopenlijst")){$$(".kbitem").each(function(a){a.observe("click",function(b){Event.stop(b);if(geId("b_id")){$("b_id").value=a.rel}$("behandeling_input").value=a.innerHTML;$("profiel_kblijst").hide()})});$("profiel_kbopenlijst").observe("click",function(a){Event.stop(a);$("profiel_kblijst").show()})}}function checkRecommend(a){Event.stop(a);if($("b_id").value==""){foutFeedback("Kies een behandeling waarvoor u deze zorgverlener wilt aanbevelen.",0,$("behandeling_input"));return false}$("recomform").submit()}var to;var dingOpen=false;var nextClassFout;function sluitFeedback(){clearTimeout(to);Effect.SlideUp("feedbackbar_container",{duration:0.5,afterFinish:function(){$("feedbackbar_container").removeClassName("fout")}});dingOpen=false}function openFeedback(b,a,c){clearTimeout(to);if(c==undefined){c=0}if(b!=true){$("feedbackbarcontent").update(a);if(nextClassFout){$("feedbackbar_container").addClassName("fout")}Effect.SlideDown("feedbackbar_container",{duration:0.5,delay:c});dingOpen=true;to=setTimeout(sluitFeedback,5000)}else{if(dingOpen){Effect.SlideUp("feedbackbar_container",{duration:0.5,afterFinish:function(){$("feedbackbar_container").removeClassName("fout");openFeedback(false,a);dingOpen=false}})}else{openFeedback(false,a,c)}}}function foutFeedback(a,c,b){nextClassFout=true;if(b){Effect.ScrollTo(b,{offset:-150});if(b.focus){b.focus()}b.addClassName("element_fout");b.observe("change",function(){b.removeClassName("element_fout")})}openFeedback(true,a,c)}function goedFeedback(a,b){nextClassFout=false;openFeedback(true,a,b)}function checkFB(){if(geId("fbsluiten")){$("fbsluiten").observe("click",sluitFeedback);if($("feedbackbarcontent").innerHTML!=""){if(geId("fout_element")&&$("fout_element").value!=""){nextClassFout=true;$($("fout_element").value).addClassName("element_fout");$($("fout_element").value).observe("focus",function(){$($("fout_element").value).removeClassName("element_fout")})}openFeedback(true,$("feedbackbarcontent").innerHTML)}}}function $RF(b,a){if($(b).type&&$(b).type.toLowerCase()=="radio"){var a=$(b).name;var b=$(b).form}else{if($(b).tagName.toLowerCase()!="form"){return false}}var c=$(b).getInputs("radio",a).find(function(d){return d.checked});return(c)?$F(c):null}function checkProfiel(){function e(j){pb.hide();j.stop()}if(geId("probox_sluiten")){$("probox_sluiten").observe("click",e)}function d(k,j){el=$(k+"_validate");el.removeClassName("goed");el.removeClassName("info");el.addClassName("fout");if(j){el.update(j)}}function f(j){el=$(j+"_validate");el.removeClassName("fout");el.removeClassName("info");el.addClassName("goed");el.update("")}function a(k,j){el=$(k+"_validate");el.removeClassName("goed");el.removeClassName("fout");el.addClassName("info");if(j){el.update(j)}}function h(j){el=$(j+"_validate");el.removeClassName("info");el.update("")}function i(k){var j=k.element();var l=j.getAttribute("validate");switch(l){case"0":if(j.value!=""){f(j.id)}else{h(j.id)}break;case"1":if(j.value==""){d(j.id,j.getAttribute("val_info"))}else{f(j.id)}break}}function g(k){var j=k.element();var m=j.getAttribute("val_info");var l=j.getAttribute("validate");if(m){a(j.id,m)}}function c(j){i(j)}if(geId("profielform_persoon")){function b(){var j=$("frm_title").value+" ";j+=$("frm_initials").value+" ";if($("frm_surnameprefix").value!=""){j+=$("frm_surnameprefix").value+" "}j+=$("frm_surname").value+" ";if($("frm_maidenname").value!=""){j+="- ";if($("frm_maidennameprefix").value!=""){j+=$("frm_maidennameprefix").value+" "}j+=$("frm_maidenname").value}$("profielnaam").update(j)}$("profielform").getInputs().each(function(j){var k=j.getAttribute("validate");if(k!=null){j.observe("blur",c);j.observe("focus",g);j.observe("keydown",g)}});$("frm_title").observe("keyup",b);$("frm_initials").observe("keyup",b);$("frm_surname").observe("keyup",b);$("frm_surnameprefix").observe("keyup",b);$("frm_maidenname").observe("keyup",b);$("frm_maidennameprefix").observe("keyup",b);Xaprb.InputMask.setupElementMasks()}}function checkEmail(b){var a=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;return a.test(b)}function checkRegistreren(){function d(x,y){if(checkEmail($F(x+"_email"))){new Ajax.Request("/ajax",{evalScripts:true,method:"get",parameters:{action:"checkemailavail",email:$F(x+"_email")},onSuccess:function(z){if(z.responseText==0){p(y)}else{o(y,"E-mailadres is reeds in gebruik")}}})}else{o(y,"Geen geldig e-mailadres")}}function p(y,x){w[y.id]=true;$(y.id+"_info").hide();$(y.id+"_fout").hide();$(y.id+"_goed").update(x);$(y.id+"_goed").style.display="block"}function o(y,x){w[y.id]=false;$(y.id+"_fout").style.display="block";$(y.id+"_fout").update(x);$(y.id+"_goed").hide();if(geId(y.id+"_info")){$(y.id+"_info").hide()}}function k(y,x){$(y.id+"_attn").style.display="block";$(y.id+"_attn").update(x);$(y.id+"_goed").hide()}function a(y,x){$(y.id+"_attn").hide();$(y.id+"_goed").hide();$(y.id+"_fout").hide()}function s(z,x){var y=Event.element(z);if(!(y.id.indexOf("pwd")!=-1&&y.value.length>0)){if(x){$(y.id+"_info").update(x)}$(y.id+"_info").style.display="block";$(y.id+"_goed").hide();$(y.id+"_fout").hide()}}if(geId("regform_naam_info")){var w=Array();function u(){var y=$F("regform_pwd1");intScore=0;if(y.match(/[a-z]/)){intScore=(intScore+1)}if(y.match(/[A-Z]/)){intScore=(intScore+5)}if(y.match(/\d+/)){intScore=(intScore+5)}if(y.match(/(\d.*\d.*\d)/)){intScore=(intScore+5)}if(y.match(/[!,@#$%^&*?_~]/)){intScore=(intScore+5)}if(y.match(/([!,@#$%^&*?_~].*[!,@#$%^&*?_~])/)){intScore=(intScore+5)}if(y.match(/[a-z]/)&&y.match(/[A-Z]/)){intScore=(intScore+2)}if(y.match(/\d/)&&y.match(/\D/)){intScore=(intScore+2)}if(y.match(/[a-z]/)&&y.match(/[A-Z]/)&&y.match(/\d/)&&y.match(/[!,@#$%^&*?_~]/)){intScore=(intScore+2)}var A="";if(intScore<=20){A="redelijk"}if(intScore<=10){A="zwak"}if(intScore>20){A="sterk"}var x="regform_pwd1";var z=$("regform_pwd1");if(y.length>5){$(x+"_info").hide();$(x+"_fout").hide();p(z,"("+A+")")}else{if(y.length>0){$(x+"_goed").hide();$(x+"_info").hide();o(z,"Wachtwoord te kort!")}else{$(x+"_goed").hide();$(x+"_fout").hide();$(x+"_info").style.display="block"}}}function i(){if($F("regform_pwd2").length>0&&$F("regform_pwd1")!=$F("regform_pwd2")){$("regform_pwd2_fout").style.display="block";$("regform_pwd2_fout").update("Wachtwoorden komen niet overeen!");$("regform_pwd2_goed").hide();$("regform_pwd2_info").hide()}else{if($F("regform_pwd2").length>0){p($("regform_pwd2"))}}}function q(y){var x=Event.element(y);$(x.id+"_info").hide();switch(x.id){case"regform_naam":if($F("regform_naam").replace(" ","").length!=0){p(x)}else{o(x,"Vul voor- en achternaam in")}break;case"regform_zorgverlener":if($F("regform_zorgverlener")!=""){p(x)}else{o(x,"Kies 'ja' of 'nee'")}break;case"regform_email":d("regform",x);break;case"regform_pwd1":r();h();if($("regform_pwd1_info").style.display=="block"){$("regform_pwd1_info").hide()}break;case"regform_pwd2":h();break;break}}function l(y){var x=w.regform_naam&&w.regform_zorgverlener&&w.regform_email&&w.regform_pwd1&&w.regform_pwd2;if(x){_gaq.push(["_trackEvent","registratie","submit registratie"]);$("regform").submit()}Event.stop(y)}w.regform_naam=false;w.regform_email=false;w.regform_pwd1=false;w.regform_pwd2=false;function e(){alert("test")}$("regform_naam").observe("focus",s);$("regform_naam").observe("blur",q);$("regform_email").observe("focus",s);$("regform_email").observe("blur",q);$("regform_zorgverlener").observe("focus",s);$("regform_zorgverlener").observe("blur",q);$("regform_zorgverlener").observe("change",q);$("regform_pwd1").observe("focus",s);$("regform_pwd1").observe("keyup",u);$("regform_pwd1").observe("blur",q);$("regform_pwd2").observe("focus",s);$("regform_pwd2").observe("keyup",i);$("regform_pwd2").observe("blur",q);$("regform_btn_aanmaken").observe("click",l)}if(geId("accountform_naam_info")){var w=Array();function r(){var y=$F("accountform_pwd1");intScore=0;if(y.match(/[a-z]/)){intScore=(intScore+1)}if(y.match(/[A-Z]/)){intScore=(intScore+5)}if(y.match(/\d+/)){intScore=(intScore+5)}if(y.match(/(\d.*\d.*\d)/)){intScore=(intScore+5)}if(y.match(/[!,@#$%^&*?_~]/)){intScore=(intScore+5)}if(y.match(/([!,@#$%^&*?_~].*[!,@#$%^&*?_~])/)){intScore=(intScore+5)}if(y.match(/[a-z]/)&&y.match(/[A-Z]/)){intScore=(intScore+2)}if(y.match(/\d/)&&y.match(/\D/)){intScore=(intScore+2)}if(y.match(/[a-z]/)&&y.match(/[A-Z]/)&&y.match(/\d/)&&y.match(/[!,@#$%^&*?_~]/)){intScore=(intScore+2)}var A="";if(intScore<=20){A="redelijk"}if(intScore<=10){A="zwak"}if(intScore>20){A="sterk"}var x="accountform_pwd1";var z=$("accountform_pwd1");if(y.length>5){$(x+"_info").hide();$(x+"_fout").hide();p(z,"("+A+")")}else{if(y.length>0){$(x+"_goed").hide();$(x+"_info").hide();o(z,"Wachtwoord te kort!")}else{$(x+"_goed").hide();$(x+"_fout").hide();$(x+"_info").style.display="block"}}}function h(){if($F("accountform_pwd2").length>0&&$F("accountform_pwd1")!=$F("accountform_pwd2")){$("accountform_pwd2_fout").style.display="block";$("accountform_pwd2_fout").update("Wachtwoorden komen niet overeen!");$("accountform_pwd2_goed").hide();$("accountform_pwd2_info").hide()}else{if($F("accountform_pwd2").length>0){p($("accountform_pwd2"))}}}function b(y){var x=Event.element(y);$(x.id+"_info").hide();switch(x.id){case"accountform_naam":if($F("accountform_naam").replace(" ","").length!=0){p(x)}else{o(x,"Vul voor- en achternaam in")}break;case"accountform_zorgverlener":if($F("accountform_zorgverlener")!=""){p(x)}else{o(x,"Kies 'ja' of 'nee'")}break;case"accountform_email":if($F("accountform_email")!=j){d("accountform",x)}break;case"accountform_pwd1":r();h();if($("accountform_pwd1_info").style.display=="block"){$("accountform_pwd1_info").hide()}break;case"accountform_pwd2":h();break;break}}function g(y){var x=w.accountform_naam&&w.accountform_zorgverlener&&w.accountform_email&&w.accountform_pwd1&&w.accountform_pwd2;if(x){$("accountform").submit()}Event.stop(y)}function v(){if(!w.accountform_naam|!w.accountform_zorgverlener){return false}new Ajax.Request("/ajax",{evalScripts:true,method:"get",parameters:{action:"accountsettings",subaction:"changegegevens",naam:$("accountform_naam").value,zv:$("accountform_zorgverlener").value,optin:$("accountform_optin").value},onSuccess:function(y){var x=y.responseText.evalJSON();k($("accountform_naam"),x.msg)}})}function m(){if(!w.accountform_pwd1|$F("accountform_pwd1")!=$F("accountform_pwd2")){return false}new Ajax.Request("/ajax",{evalScripts:true,method:"get",parameters:{action:"accountsettings",subaction:"changepwd",pwd:$F("accountform_pwd1")},onSuccess:function(y){var x=y.responseText.evalJSON();k($("accountform_pwd1"),x.msg);$("accountform_pwd2_goed").hide();$("accountform_pwd1").value="";$("accountform_pwd2").value="";if(x.succes==1){}else{}}})}function t(){if(!w.accountform_email|$("accountform_email").disabled|$F("accountform_email")==j){return false}$("accountform_email").disable();new Ajax.Request("/ajax",{evalScripts:true,method:"get",parameters:{action:"accountsettings",subaction:"changeemail",email:$F("accountform_email")},onSuccess:function(y){var x=y.responseText.evalJSON();k($("accountform_email"),x.msg);if(x.succes==1){}else{}}})}w.accountform_naam=true;w.accountform_zorgverlener=true;w.accountform_email=false;w.accountform_pwd1=false;w.accountform_pwd2=false;$("accountform_naam").observe("focus",s);$("accountform_naam").observe("blur",b);$("accountform_email").observe("focus",s);$("accountform_email").observe("blur",b);var j=$F("accountform_email");$("accountform_zorgverlener").observe("focus",s);$("accountform_zorgverlener").observe("change",b);$("accountform_zorgverlener").observe("blur",b);$("accountform_pwd1").observe("focus",s);$("accountform_pwd1").observe("keyup",r);$("accountform_pwd1").observe("blur",b);$("accountform_pwd2").observe("focus",s);$("accountform_pwd2").observe("keyup",h);$("accountform_pwd2").observe("blur",b);$("accountform").observe("submit",g);if(!geId("zvprofiel_zoek")){$("accountform_naam").focus()}$("accountform_email_knop").observe("click",t);$("accountform_wijzigww_knop").observe("click",m);$("accountform_gegopslaan_knop").observe("click",v)}if(geId("wachtwoordvergeten")){var w=Array();function c(){var x=$("wwv_email");if(checkEmail($F("wwv_email"))){new Ajax.Request("/ajax",{evalScripts:true,method:"get",parameters:{action:"checkemailavail",email:$F("wwv_email")},onSuccess:function(y){if(y.responseText==0){o(x,"E-mailadres niet gevonden.")}else{p(x,"")}}})}else{o(x,"Geen geldig e-mailadres ingevoerd")}}function f(x){c()}function n(){if(w.wwv_email){document.location="/account/vergeten/"+$F("wwv_email")}}$("wwv_email").observe("focus",s);$("wwv_email").observe("blur",f);$("wwv_email_knop").observe("click",n)}}if(typeof(Xaprb)==="undefined"){Xaprb=new Object()}Xaprb.InputMask={masks:{initials:{format:"                                  ",regex:/[a-z\.]/i},plaintext:{format:"                                  ",regex:/[a-z.\s]/i},date_us:{format:"  /  /    ",regex:/\d/},time:{format:"  :  :  ",regex:/\d/},phone:{format:"(   )   -    ",regex:/\d/},ssn:{format:"   -  -    ",regex:/\d/},visa:{format:"    -    -    -    ",regex:/\d/}},setupElementMasks:function(){if(document.getElementsByClassName){$A(document.getElementsByClassName("input_mask")).each(function(a){Event.observe(a,"keypress",Xaprb.InputMask.applyMask.bindAsEventListener(a),true)})}},applyMask:function(e){var b=/mask_(\w+)/.exec(this.className);if(b.length==2&&Xaprb.InputMask.masks[b[1]]){var a=Xaprb.InputMask.masks[b[1]];var c=Xaprb.InputMask.getKey(e);if(Xaprb.InputMask.isPrintable(c)){var d=String.fromCharCode(c);var f=this.value+d;var g=f.length;if(a.regex.test(d)&&g<=a.format.length){if(a.format.charAt(g-1)!=" "){f=this.value+a.format.charAt(g-1)+d}this.value=f}Event.stop(e)}}},isPrintable:function(a){return(a>=32&&a<127)},getKey:function(a){return window.event?window.event.keyCode:a?a.which:0}};function checkCallMeNow(){$("callmenow_submit").observe("click",function(a){_gaq.push(["CTA","Bel mij 2",$("hidden_organisatie_name").value]);$("callmenow_form").submit();Event.stop(a);return false})}function checkReason(a){if(geId("znet_id").value==""||geId("Emailadres").value==""){alert("vul AUB eerst uw ID en Emailadres in");document.adreswijziging.reden[0].selected=true;return false}if(a==1){geId("naw").style.display="table";geId("adres").style.display="table";geId("moreinfo").style.display="table-row"}else{if(a==4){geId("naw").style.display="none";geId("adres").style.display="none";geId("moreinfo").style.display="none"}else{geId("naw").style.display="none";geId("adres").style.display="none";geId("moreinfo").style.display="none"}}return true}function checkInfoAanvraag(){function b(){new Ajax.Request("/ajax",{evalScripts:true,method:"get",parameters:{action:"zoekadres",postcode:$("ia_postcode").value,huisnummer:$("ia_huisnummer").value},onSuccess:function(d){var c=d.responseText.evalJSON(true);if(d.responseText==null|c.status!=1){alert("Het adres kon niet worden gevonden. Controleer postcode en huisnummer en probeer het opnieuw.")}else{$("ia_straatdef").value=c.straatnaam+" "+c.huisnummer+$("ia_toevoeging").value;$("ia_postcodedef").value=c.postcode;$("ia_plaatsdef").value=c.woonplaats;$("ia_postcode").value=c.postcode;$("ia_huisnummer").value=c.huisnummer;$("bezoek_open").hide();$("bezoek_dicht").show()}}});_gaq.push(["CTA","Informatie aanvraag 2",$("hidden_organisatie_name").value])}function a(c){$("bezoek_open").show();$("bezoek_dicht").hide();Event.stop(c)}$("ia_wijzig").observe("click",a);$("ia_zoek").observe("click",b);$("ia_submit").observe("click",function(c){$("ia_form").submit();Event.stop(c)})};