isIE=document.all;isNN=!document.all&&document.getElementById;isN4=document.layers;
var titleToNote={elements:["a","img"],setup:function(){if(document.getElementById&&document.createElement){var a=document.createElement("div");a.setAttribute("id","title2note");document.getElementsByTagName("body")[0].appendChild(a);document.getElementById("title2note").style.display="none";for(j=0;j<titleToNote.elements.length;j++)for(i=0;i<document.getElementsByTagName(titleToNote.elements[j]).length;i++)if(a=document.getElementsByTagName(titleToNote.elements[j])[i],a.getAttribute("note")&&a.getAttribute("note")!=
"")a.onmouseover=titleToNote.showNote,a.onmouseout=titleToNote.hideNote}},showNote:function(){document.getElementById("title2note").innerHTML=this.getAttribute("note");this.setAttribute("note","");document.getElementById("title2note").style.display="block"},hideNote:function(){this.setAttribute("note",document.getElementById("title2note").innerHTML);document.getElementById("title2note").innerHTML="";document.getElementById("title2note").style.display="none"}};function msgbox(a){alert(a)}
function checkform(a){for(var b=0;a.elements[b];b++)if(a.elements[b].value==""&&a.elements[b].id!="nocheck")return alert("U dient het veld '"+a.elements[b].id+"' in te vullen, dit veld is namelijk verplicht."),a.elements[b].focus(),!1}
function MessageBox(a,b){if(document.getElementById(a).style.display=="none")document.getElementById(a).style.display="block",document.getElementById(a+"Message").innerHTML=b,document.getElementById(a+"Buttons").innerHTML="<input type='button' value=' OK ' onclick=toggle('ErrBox')>"}
function ConfirmBox(a,b){if(document.getElementById(a).style.display=="none")document.getElementById(a).style.display="block",document.getElementById("td-content").style.display="none",document.getElementById(a+"Message").innerHTML=b,document.getElementById(a+"Buttons").innerHTML=" "}
function toggleDIV(a){var b;document.getElementById?b=document.getElementById(a):document.all?b=document.all[a]:document.layers&&(b=document.layers[a]);a=b.style;if(a.display==""&&b.offsetWidth!=void 0&&b.offsetHeight!=void 0)a.display=b.offsetWidth!=0&&b.offsetHeight!=0?"":"none";a.display=a.display==""||a.display=="block"?"none":""}
function Afleverwijze(a){a=="verzenden"?(document.getElementById("BetWijzeVerzenden").style.display="",document.getElementById("BetWijzeOphalen").style.display="none"):(document.getElementById("BetWijzeVerzenden").style.display="none",document.getElementById("BetWijzeOphalen").style.display="")}function SelectOphalen(){document.getElementById("verzenden").checked&&Afleverwijze("verzenden")}
function venster(a){venster=window.open(a,"Scherm","width=700, height=500, resizable=no, menubar=no, scrollbars=yes, status=no, toolbar=no")}function artikelImg(a){return document.getElementById?(document.getElementById("swapImage").src=a.href,document.getElementsByClassName("lightwindow")[0].href=a.href,!1):!0}
function openVenster(a,b,c){day=new Date;id=day.getTime();eval("openVenster"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+b+",height="+c+",left = 10,top = 10');")}
function passwordStrength(a){var b=0;a.length>5&&(b++,a.match(/[a-z]/)&&a.match(/[A-Z]/)&&b++,a.match(/\d+/)&&b++,a.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/)&&b++,a.length>10&&b++);document.getElementById("passwordDescription").innerHTML=["Te kort","Matig","Redelijk","Goed","Sterk","Uitstekend"][b];document.getElementById("passwordStrength").className="strength"+b}typeof bsn=="undefined"&&(_b=bsn={});typeof _b.Autosuggest=="undefined"?_b.Autosuggest={}:alert("Autosuggest is already set!");
_b.AutoSuggest=function(a,b){if(!document.getElementById)return 0;this.fld=_b.DOM.gE(a);if(!this.fld)return 0;this.sInp="";this.nInpC=0;this.aSug=[];this.iHigh=0;this.oP=b?b:{};var c,d={minchars:1,meth:"get",varname:"input",className:"autosuggest",timeout:2500,delay:500,offsety:-5,shownoresults:!0,noresults:"Geen resultaten!",maxheight:250,cache:!0,maxentries:25};for(c in d)typeof this.oP[c]!=typeof d[c]&&(this.oP[c]=d[c]);var e=this;this.fld.onkeypress=function(a){return e.onKeyPress(a)};this.fld.onkeyup=
function(a){return e.onKeyUp(a)};this.fld.setAttribute("autocomplete","off")};_b.AutoSuggest.prototype.onKeyPress=function(a){var b=1;switch(window.event?window.event.keyCode:a.keyCode){case 13:this.setHighlightedValue();b=0;break;case 27:this.clearSuggestions()}return b};_b.AutoSuggest.prototype.onKeyUp=function(a){var a=window.event?window.event.keyCode:a.keyCode,b=1;switch(a){case 38:this.changeHighlight(a);b=0;break;case 40:this.changeHighlight(a);b=0;break;default:this.getSuggestions(this.fld.value)}return b};
_b.AutoSuggest.prototype.getSuggestions=function(a){if(a==this.sInp)return 0;_b.DOM.remE(this.idAs);this.sInp=a;if(a.length<this.oP.minchars)return this.aSug=[],this.nInpC=a.length,0;var b=this.nInpC;this.nInpC=a.length?a.length:0;var c=this.aSug.length;if(this.nInpC>b&&c&&c<this.oP.maxentries&&this.oP.cache){for(var b=[],d=0;d<c;d++)this.aSug[d].value.substr(0,a.length).toLowerCase()==a.toLowerCase()&&b.push(this.aSug[d]);this.aSug=b;this.createList(this.aSug)}else{var e=this,f=this.sInp;clearTimeout(this.ajID);
this.ajID=setTimeout(function(){e.doAjaxRequest(f)},this.oP.delay)}return!1};_b.AutoSuggest.prototype.doAjaxRequest=function(a){if(a!=this.fld.value)return!1;var b=this,c=typeof this.oP.script=="function"?this.oP.script(encodeURIComponent(this.sInp)):this.oP.script+this.oP.varname+"="+encodeURIComponent(this.sInp);if(!c)return!1;var d=this.oP.meth,a=this.sInp;(new _b.Ajax).makeRequest(c,d,function(c){b.setSuggestions(c,a)},function(a){alert("AJAX error: "+a)})};
_b.AutoSuggest.prototype.setSuggestions=function(a,b){if(b!=this.fld.value)return!1;this.aSug=[];if(this.oP.json)for(var c=eval("("+a.responseText+")"),d=0;d<c.results.length;d++)this.aSug.push({id:c.results[d].id,value:c.results[d].value,info:c.results[d].info});else{c=a.responseXML.getElementsByTagName("results")[0].childNodes;for(d=0;d<c.length;d++)c[d].hasChildNodes()&&this.aSug.push({id:c[d].getAttribute("id"),value:c[d].childNodes[0].nodeValue,info:c[d].getAttribute("info")})}this.idAs="as_"+
this.fld.id;this.createList(this.aSug)};
_b.AutoSuggest.prototype.createList=function(a){var b=this;_b.DOM.remE(this.idAs);this.killTimeout();if(a.length==0&&!this.oP.shownoresults)return!1;var c=_b.DOM.cE("div",{id:this.idAs,className:this.oP.className}),d=_b.DOM.cE("div",{className:"as_corner"}),e=_b.DOM.cE("div",{className:"as_bar"}),f=_b.DOM.cE("div",{className:"as_header"});f.appendChild(d);f.appendChild(e);c.appendChild(f);d=_b.DOM.cE("ul",{id:"as_ul"});for(e=0;e<a.length;e++){var f=a[e].value,g=f.toLowerCase().indexOf(this.sInp.toLowerCase()),
f=f.substring(0,g)+"<em>"+f.substring(g,g+this.sInp.length)+"</em>"+f.substring(g+this.sInp.length),f=_b.DOM.cE("span",{},f,!0);a[e].info!=""&&(g=_b.DOM.cE("br",{}),f.appendChild(g),g=_b.DOM.cE("small",{},a[e].info),f.appendChild(g));var g=_b.DOM.cE("a",{href:"#"}),h=_b.DOM.cE("span",{className:"tl"}," "),k=_b.DOM.cE("span",{className:"tr"}," ");g.appendChild(h);g.appendChild(k);g.appendChild(f);g.name=e+1;g.onclick=function(){b.setHighlightedValue();return!1};g.onmouseover=function(){b.setHighlight(this.name)};
f=_b.DOM.cE("li",{},g);d.appendChild(f)}a.length==0&&this.oP.shownoresults&&(f=_b.DOM.cE("li",{className:"as_warning"},this.oP.noresults),d.appendChild(f));c.appendChild(d);a=_b.DOM.cE("div",{className:"as_corner"});d=_b.DOM.cE("div",{className:"as_bar"});e=_b.DOM.cE("div",{className:"as_footer"});e.appendChild(a);e.appendChild(d);c.appendChild(e);a=_b.DOM.getPos(this.fld);c.style.left=a.x+"px";c.style.top=a.y+this.fld.offsetHeight+this.oP.offsety+"px";c.style.width=this.fld.offsetWidth+"px";c.onmouseover=
function(){b.killTimeout()};c.onmouseout=function(){b.resetTimeout()};document.getElementsByTagName("body")[0].appendChild(c);this.iHigh=0;b=this;this.toID=setTimeout(function(){b.clearSuggestions()},this.oP.timeout)};_b.AutoSuggest.prototype.changeHighlight=function(a){var b=_b.DOM.gE("as_ul");if(!b)return!1;var c;a==40?c=this.iHigh+1:a==38&&(c=this.iHigh-1);if(c>b.childNodes.length)c=b.childNodes.length;c<1&&(c=1);this.setHighlight(c)};
_b.AutoSuggest.prototype.setHighlight=function(a){var b=_b.DOM.gE("as_ul");if(!b)return!1;this.iHigh>0&&this.clearHighlight();this.iHigh=Number(a);b.childNodes[this.iHigh-1].className="as_highlight";this.killTimeout()};_b.AutoSuggest.prototype.clearHighlight=function(){var a=_b.DOM.gE("as_ul");if(!a)return!1;if(this.iHigh>0)a.childNodes[this.iHigh-1].className="",this.iHigh=0};
_b.AutoSuggest.prototype.setHighlightedValue=function(){if(this.iHigh)this.sInp=this.fld.value=this.aSug[this.iHigh-1].value,this.fld.focus(),this.fld.selectionStart&&this.fld.setSelectionRange(this.sInp.length,this.sInp.length),this.clearSuggestions(),typeof this.oP.callback=="function"&&this.oP.callback(this.aSug[this.iHigh-1])};_b.AutoSuggest.prototype.killTimeout=function(){clearTimeout(this.toID)};
_b.AutoSuggest.prototype.resetTimeout=function(){clearTimeout(this.toID);var a=this;this.toID=setTimeout(function(){a.clearSuggestions()},1E3)};_b.AutoSuggest.prototype.clearSuggestions=function(){this.killTimeout();var a=_b.DOM.gE(this.idAs),b=this;a&&new _b.Fader(a,1,0,250,function(){_b.DOM.remE(b.idAs)})};if(typeof _b.Ajax=="undefined")_b.Ajax={};_b.Ajax=function(){this.req={};this.isIE=!1};
_b.Ajax.prototype.makeRequest=function(a,b,c,d){b!="POST"&&(b="GET");this.onComplete=c;this.onError=d;var e=this;if(window.XMLHttpRequest)this.req=new XMLHttpRequest,this.req.onreadystatechange=function(){e.processReqChange()},this.req.open("GET",a,!0),this.req.send(null);else if(window.ActiveXObject&&(this.req=new ActiveXObject("Microsoft.XMLHTTP")))this.req.onreadystatechange=function(){e.processReqChange()},this.req.open(b,a,!0),this.req.send()};
_b.Ajax.prototype.processReqChange=function(){if(this.req.readyState==4)if(this.req.status==200)this.onComplete(this.req);else this.onError(this.req.status)};if(typeof _b.DOM=="undefined")_b.DOM={};_b.DOM.cE=function(a,b,c,d){a=document.createElement(a);if(!a)return 0;for(var e in b)a[e]=b[e];b=typeof c;b=="string"&&!d?a.appendChild(document.createTextNode(c)):b=="string"&&d?a.innerHTML=c:b=="object"&&a.appendChild(c);return a};
_b.DOM.gE=function(a){var b=typeof a;return b=="undefined"?0:b=="string"?(a=document.getElementById(a))?typeof a.appendChild!="undefined"?a:0:0:typeof a.appendChild!="undefined"?a:0};_b.DOM.remE=function(a){return(a=this.gE(a))?a.parentNode.removeChild(a)?!0:0:0};
_b.DOM.getPos=function(a){var b=a=this.gE(a),c=0;if(b.offsetParent)for(;b.offsetParent;)c+=b.offsetLeft,b=b.offsetParent;else b.x&&(c+=b.x);b=a;a=0;if(b.offsetParent)for(;b.offsetParent;)a+=b.offsetTop,b=b.offsetParent;else b.y&&(a+=b.y);return{x:c,y:a}};if(typeof _b.Fader=="undefined")_b.Fader={};_b.Fader=function(a,b,c,d,e){if(!a)return 0;this.e=a;this.from=b;this.to=c;this.cb=e;this.nDur=d;this.nInt=50;this.nTime=0;var f=this;this.nID=setInterval(function(){f._fade()},this.nInt)};
_b.Fader.prototype._fade=function(){this.nTime+=this.nInt;var a=Math.round(this._tween(this.nTime,this.from,this.to,this.nDur)*100),b=a/100;if(this.e.filters)try{this.e.filters.item("DXImageTransform.Microsoft.Alpha").opacity=a}catch(c){this.e.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")"}else this.e.style.opacity=b;this.nTime==this.nDur&&(clearInterval(this.nID),this.cb!=void 0&&this.cb())};_b.Fader.prototype._tween=function(a,b,c,d){return b+(c-b)*(a/d)};
