window.onload=function(){clearFormInput();blurLinks();document.getElementById("content_right_loader").style.display="none";document.getElementById("content_right").style.display="block"};function addPostalCosts(b,a){if(isNumeric(intTotalCosts)&&isNumeric(a)){if(parseInt(a)<parseInt(intTotalCosts)){document.getElementById("verzendkosten").value=(parseInt(intTotalCosts)/100).toFixed(2).toString().replace(".",strDelimiter);document.getElementById("verzendkostenselected").value=0}else{if(isNumeric(intTotalCosts)&&isNumeric(a)&&isNumeric(b)){document.getElementById("verzendkosten").value=((parseInt(intTotalCosts)+parseInt(b))/100).toFixed(2).toString().replace(".",strDelimiter);document.getElementById("verzendkostenselected").value=(parseInt(b)/100).toFixed(2).toString().replace(".",strDelimiter)}}}}function updatePostalCosts(b,a){var c=new Number(b);if(intTotalCosts>a){var c=new Number(0)}intExclbtw=new Number(intTotalCosts+intVerwijderbijdrage+c);intExclbtw=intExclbtw/10000;intExclbtw=intExclbtw.toFixed(2);strExclbtw=intExclbtw.toString();strExclbtw=strExclbtw.replace(".",strDelimiter);intbtw=new Number((intTotalCosts+intVerwijderbijdrage+c)*0.19);intbtw=intbtw/10000;intbtw=intbtw.toFixed(2);strbtw=intbtw.toString();strbtw=strbtw.replace(".",strDelimiter);intInclbtw=new Number((intTotalCosts+intVerwijderbijdrage+c)+((intTotalCosts+intVerwijderbijdrage+c)*0.19));intInclbtw=intInclbtw/10000;intInclbtw=intInclbtw.toFixed(2);strInclbtw=intInclbtw.toString();strInclbtw=strInclbtw.replace(".",strDelimiter);c=c/10000;c=c.toFixed(2);strVerzendkosten=c.toString();strVerzendkosten=strVerzendkosten.replace(".",strDelimiter);document.getElementById("verzendkosten").innerHTML=strVerzendkosten;document.getElementById("exclbtw").innerHTML="<b>"+strExclbtw+"</b>";document.getElementById("btw").innerHTML=strbtw;document.getElementById("inclbtw").innerHTML=strInclbtw}function setCookie(a,b,c){var d=new Date();d.setDate(d.getDate()+c);document.cookie=a+"="+escape(b)+((c==null)?"":";expires="+d.toGMTString())}function addArticle(){var b=document.getElementById("artikelnummer").value;var a=document.getElementById("aantal").value;window.location.href="order_toevoegen.asp?art="+encode64(b)+"&qua="+encode64(a)+"&confirm=yes&aid=no"}var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function encode64(c){var a="";var k,h,f;var j,g,e,d;var b=0;do{k=c.charCodeAt(b++);h=c.charCodeAt(b++);f=c.charCodeAt(b++);j=k>>2;g=((k&3)<<4)|(h>>4);e=((h&15)<<2)|(f>>6);d=f&63;if(isNaN(h)){e=d=64}else{if(isNaN(f)){d=64}}a=a+keyStr.charAt(j)+keyStr.charAt(g)+keyStr.charAt(e)+keyStr.charAt(d)}while(b<c.length);return a}function decode64(c){var a="";var k,h,f;var j,g,e,d;var b=0;c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{j=keyStr.indexOf(c.charAt(b++));g=keyStr.indexOf(c.charAt(b++));e=keyStr.indexOf(c.charAt(b++));d=keyStr.indexOf(c.charAt(b++));k=(j<<2)|(g>>4);h=((g&15)<<4)|(e>>2);f=((e&3)<<6)|d;a=a+String.fromCharCode(k);if(e!=64){a=a+String.fromCharCode(h)}if(d!=64){a=a+String.fromCharCode(f)}}while(b<c.length);return a}function clearFormInput(){var b=document.getElementsByTagName("INPUT");for(var a=0;a<b.length;a++){if(b[a].type=="text"&&b[a].className!="no_change"){b[a].onfocus=function(){if(this.strOld==""||this.strOld==undefined){this.strOld=this.value}this.value=""};b[a].onblur=function(){if(this.value==""){this.value=this.strOld}}}if(b[a].type=="text"&&b[a].className=="input_numeric"){b[a].onchange=function(){if(isNaN(this.value.replace(",","."))){this.value=0}}}}}function blurLinks(){var b=document.getElementsByTagName("A");for(var a=0;a<b.length;a++){b[a].onfocus=function(){this.blur()}}}function showInfo(a){if(document.getElementById("tr_"+a)){document.getElementById("tr_"+a).style.display=(document.all)?"block":"table-row"}if(document.getElementById("meerinfo_"+a)){var b=document.getElementById("meerinfo_"+a);b.innerHTML="minder info";b.className="minderinfo";b.onclick=function(){hideInfo(this.id.split("_")[1]);return false}}}function hideInfo(a){if(document.getElementById("tr_"+a)){document.getElementById("tr_"+a).style.display="none"}if(document.getElementById("meerinfo_"+a)){var b=document.getElementById("meerinfo_"+a);b.innerHTML="meer info";b.className="meerinfo";b.onclick=function(){showInfo(this.id.split("_")[1]);return false}}}function toggleMoreInfo(a){if(document.getElementById("prod"+a+"2").style.display=="none"){document.getElementById("prod"+a+"2").style.display="";document.getElementById("image"+a).rowSpan="2";document.getElementById("moreinfoimg"+a).style.background="transparent url(/_img/bg_more_less.gif) no-repeat scroll 0 0";document.getElementById("moreinfotext"+a).innerHTML="Minder info"}else{if(document.getElementById("prod"+a+"2").style.display==""){document.getElementById("prod"+a+"2").style.display="none";document.getElementById("image"+a).rowSpan="1";document.getElementById("moreinfoimg"+a).style.background="transparent url(/_img/bg_more_less.gif) no-repeat scroll 0 -9px";document.getElementById("moreinfotext"+a).innerHTML="Meer info"}}}var getElementsByClassName=function(){if(document.getElementsByClassName){return function(c,d,a){var b=(a||document).getElementsByClassName(c);if(d&&d!="*"){d=d.toUpperCase();return Array.filter(b,function(e){return e.nodeName==d})}else{return[].slice.call(b,0)}}}if(document.evaluate){return function(f,g,a){if(!g){g="*"}if(!a){a=document}var d=[],e,c=0,b;e=document.evaluate(".//"+g+"[contains(concat(' ', @class, ' '), ' "+f+" ')]",a,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null);while((b=e.snapshotItem(c++))){d.push(b)}return d}}return function(d,f,g){if(!f){f="*"}if(!g){g=document}var a=[],j,b=0,c;var h=new RegExp("(^|\\s)"+d+"(\\s|$)"),e;j=g.getElementsByTagName(f);while((c=j[b++])){if((e=c.className)&&(e==d||h.test(e))){a.push(c)}}return a}}();function toggleMenu(a){if(document.getElementById("submenu"+a).style.display=="none"){document.getElementById("submenu"+a).style.display="block"}else{document.getElementById("submenu"+a).style.display="none"}}function toggleClass(a){if(a.parentNode.className==""){a.parentNode.className="subchilds"}else{a.parentNode.className=""}}function showImage(d,b){b=b.split(",");var c;var a;c="https://"+document.location.hostname+"/_img/productimg/normal/";a="";document.getElementById("bigimage").src=c+b[0];document.getElementById("bigimage").alt=d;document.getElementById("bigimage").title=d;for(i=0;i<b.length;i++){a=a+'<img src="/_img/productimg/popup_thumbs/'+b[i]+'" height="78" border="0" alt="'+d+'" title="'+d+'" onclick="changeImage(\''+b[i]+'\');" style="cursor: pointer;" />'}document.getElementById("productname").innerHTML=d;document.getElementById("imagecenter_thumbs").innerHTML=a;document.getElementById("imagecontainer").style.display="block";document.getElementById("overlay").style.display="block"}function hideImage(){document.getElementById("overlay").style.display="none";document.getElementById("imagecontainer").style.display="none";var b;var a;b="https://"+document.location.hostname+"/_img/";a='<img src="/_img/white.jpg" height="78" border="0" alt="Loading" title="Loading" />';document.getElementById("bigimage").src=b+"white.jpg";document.getElementById("bigimage").alt="Loading";document.getElementById("bigimage").title="Loading";document.getElementById("imagecenter_thumbs").innerHTML=a;document.getElementById("productname").innerHTML=""}function changeImage(b){var a;a="https://"+document.location.hostname+"/_img/productimg/normal/";document.getElementById("bigimage").src=a+b}function isNumeric(a){var b=/(^\d+$)|(^\d+\.\d+$)|(^-\d+$)|(^-\d+\.\d+$)/;if(b.test(a)){return true}return false}function increaseAmount(c,a){if(isNumeric(document.getElementById("aantal"+c).value)){var b;b=parseInt(document.getElementById("aantal"+c).value)+parseInt(a);if(b%parseInt(a)>0){b=b-(b%parseInt(a))}document.getElementById("aantal"+c).value=b}}function decreaseAmount(c,a){if(isNumeric(document.getElementById("aantal"+c).value)){var b;b=parseInt(document.getElementById("aantal"+c).value)-parseInt(a);if(b<0){b=0}if(b%parseInt(a)>0){b=(b-(b%parseInt(a)))+parseInt(a)}document.getElementById("aantal"+c).value=b}}function checkAmount(c,a){if(isNumeric(document.getElementById("aantal"+c).value)){var b;b=parseInt(document.getElementById("aantal"+c).value);if(b<0){b=0}if(b%parseInt(a)>0){b=(b-(b%parseInt(a)))+parseInt(a)}document.getElementById("aantal"+c).value=b}}function hl(a,b){a.className=b}function togglePulldown(a){$(".pulldownWrapper:not(#"+a+")").hide();$("#"+a).toggle()}function toggleOff(b){var a=document.getElementById(b);a.style.display="none";document.getElementById("overlay").style.display="none"}function toggleOn(b){var a=document.getElementById(b);a.style.display="block";document.getElementById("overlay").style.display="block"}function removeText(a,c){var b=a.value;a.onblur=function(){if(this.value==""){this.value=b;if(c==true){hl(a,"bgcb")}}};a.value=""}function clearSearch(){var a=document.getElementById("sq");if(a.value=="Vul een artikelnummer, artikelnaam, omschrijving, EAN-code of merk in"){a.value="";a.style.color="#000000"}}var advFilledCheckboxes=new Array();function getAdvNonFilledCheckboxes(){advFilledCheckboxes=[];var a=0;var b=document.getElementById("aquery").getElementsByTagName("input");for(i=0;i<b.length;i++){if(b[i].type=="checkbox"){if(b[i].value!=""&&b[i].checked==false){advFilledCheckboxes[a]="prop"+b[i].value;a++}}}}function setFilter(){getAdvNonFilledCheckboxes();for(i=0;i<productsArray.length;i++){var a=document.getElementById("prod"+productsArray[i]+"0").className.split(" ");var b=true;for(x=0;x<a.length;x++){if(advFilledCheckboxes.join().indexOf(a[x])!=-1){b=false;break}}if(b){document.getElementById("prod"+productsArray[i]+"0").style.display="";document.getElementById("prod"+productsArray[i]+"1").style.display="";document.getElementById("prod"+productsArray[i]+"3").style.display="";document.getElementById("prod"+productsArray[i]+"4").style.display=""}else{document.getElementById("prod"+productsArray[i]+"0").style.display="none";document.getElementById("prod"+productsArray[i]+"1").style.display="none";document.getElementById("prod"+productsArray[i]+"3").style.display="none";document.getElementById("prod"+productsArray[i]+"4").style.display="none"}}}function toggleAllItems(a){var c=$(a).parent().parent().parent().attr("id");var b=$(a).attr("checked");$("#"+c+" INPUT[type='checkbox']").attr("checked",b)}function checkAllItems(a){var c=$(a).parent().parent().attr("id");var b=true;$("#"+c+" INPUT[type='checkbox']").attr("checked",b)}function uncheckAllItems(a){var c=$(a).parent().parent().attr("id");var b=false;$("#"+c+" INPUT[type='checkbox']").attr("checked",b)}function setFocus(b){var a=document.getElementById(b);if(a){a.focus()}}function enterSubmit(a){a=document.getElementById(a);if(window.event){if(window.event.keyCode==13){a.submit()}return false}}function enterSubmitNonForm(a){a=document.getElementById(a);if(window.event){if(window.event.keyCode==13){a.submit()}return false}}function triggerSession(a){a=a}function resetBorder(){var a=document.getElementById("smallimages").childNodes;for(i=0;i<a.length;i++){if(a[i].nodeName=="IMG"){a[i].style.border="1px solid #D5D5D5"}}};
