function create_http_object() { var ActiveXTypes = [ "Microsoft.XMLHTTP", "MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP" ]; for( var i = 0; i < ActiveXTypes.length; i++ ) { try { return new ActiveXObject( ActiveXTypes[i] ); } catch( e ) { } } try { return new XMLHttpRequest(); } catch( e ) { } return false; } function make_request(url, callback_function, http_method, post_values, return_xml) { http = create_http_object(); if(!http) { alert('Je browser ondersteunt deze feature niet.'); return false; } http.onreadystatechange = function() { if(http.readyState == 4) { if(http.status == 200) { if(callback_function) { if(return_xml) { eval(callback_function + '(http.responseXML)'); } else { eval(callback_function + '(http.responseText)'); } } } else { alert('Error! (' + http.status + ')'); } } } if(!post_values) { post_values = null; } if(!http_method) { http_method = "GET"; } http.open(http_method, url, true); if(http_method == "POST") { http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); } http.send(post_values); } function veranderaantal(veld) { var the_form = 'document.winkelwagenform'; if(eval(the_form +'.'+veld + '.value.length') == 0) { return; } //alert(eval('document.search_form.' + veld + '.value')); make_request('/winkelwagen.php?product='+ veld +'&aantal=' + eval(the_form+'.'+veld + '.value'), 'handle_response', 'GET'); } function verwijderproduct(product) { make_request('/winkelwagen.php?verwijder='+product, 'handle_response', 'GET'); } function handle_response(result) { // onze suggestions div var suggest_div = document.getElementById('winkelwagen'); suggest_div.innerHTML = result; document.winkelwagenform.product_0.focus(); } function handle_zoekmachine(result) { // onze suggestions div if (result != '') { document.getElementById('search_suggest').style.display = 'inline'; document.getElementById('search_suggest').innerHTML = result; } } function showCOMMENT(wat, veld) { if (veld != "") { var the_form = 'document.zoekformulier'; if(eval(the_form +'.'+veld + '.value.length') < 3) { document.getElementById(wat).style.display="none"; return; } //alert(eval('document.search_form.' + veld + '.value')); make_request('/zoekbox.php?input=' + eval(the_form+'.'+veld + '.value'), 'handle_resultaat', 'GET'); } else { document.getElementById(wat).style.display="block"; } } function showProductInformation(tab) { document.getElementById('editorNotesInformation').style.display = 'none'; document.getElementById('detailsInformation').style.display = 'none'; document.getElementById('sizefitInformation').style.display = 'none'; document.getElementById('editorNotes').style.display = 'block'; document.getElementById('details').style.display = 'block'; document.getElementById('sizefit').style.display = 'block'; document.getElementById('detailsActive').style.display = 'none'; document.getElementById('sizefitActive').style.display = 'none'; document.getElementById('editorNotesActive').style.display = 'none'; if(tab == 1) { document.getElementById('editorNotesInformation').style.display = 'block'; document.getElementById('editorNotesActive').style.display = 'block'; document.getElementById('editorNotes').style.display = 'none'; } if(tab == 2) { document.getElementById('detailsInformation').style.display = 'block'; document.getElementById('detailsActive').style.display = 'block'; document.getElementById('details').style.display = 'none'; } if(tab == 3) { document.getElementById('sizefitInformation').style.display = 'block'; document.getElementById('sizefit').style.display = 'none'; document.getElementById('sizefitActive').style.display = 'block'; } } function showHideDiv(elementen){ divelement = document.getElementById(elementen); if(divelement.style.display == 'block'){ divelement.style.display = 'none'; }else{ divelement.style.display = 'block'; } } function weergeven(elementen) { divelement = document.getElementById(elementen); divelement.style.display = 'block'; } function verbergen(elementen){ divelement = document.getElementById(elementen); divelement.style.display = 'none'; } function show(elementen){ divelement = document.getElementById(elementen); divelement.style.display = 'block'; } function hide(elementen){ divelement = document.getElementById(elementen); divelement.style.display = 'none'; } function checkSize(boolmelding){ if(boolmelding == 'uitverkocht'){ showHideDiv('melding'); } } function searchSuggest() { var zoekmachineSuggests = document.getElementById('zoekmachineSuggests').value; if(zoekmachineSuggests == '' || zoekmachineSuggests == 'Search') { document.getElementById('search_suggest').style.display= 'none'; } else { make_request('/zoekbox.php?input=' + zoekmachineSuggests, 'handle_zoekmachine', 'GET'); } } function processDiffrent() { if(document.getElementById('shiptodiffrent').checked == true) { document.getElementById('diffrentaddress').style.display='block'; } else { document.getElementById('diffrentaddress').style.display='none'; } } function ValidateNieuwsbrief() { if(document.inputForm.Email.value == "Enter your e-mail" || document.inputForm.Email.value == "" || document.inputForm.Email.value.indexOf ('@', 0) == -1 || document.inputForm.Email.value.indexOf ('.', 0) == -1) { alert("Email address not valid."); document.inputForm.Email.focus(); return false; } } //self.name='payopener'; function pay(){ if (!document.pform.pchoice[0].checked && !document.pform.pchoice[1].checked){ inlineMsg('paybutton','Choose your payment method.',2); return false; //alert("Kies eerst de gewenste betaalmethode"); //return; } if (document.pform.pchoice[1].checked && document.pform.BPE_Issuer.value=="X"){ inlineMsg('paybutton','You can only pay with iDeal if you have a bank account at one of the given banks. Please select your bank or pay with creditcard. Or contact us if you have any questions.',2); return false; //alert("U kunt uitsluitend met iDeal betalen\nals u bankiert bij ��n van de genoemde banken.\nSelecteer creditcard of neem contact met ons op..."); //document.pform.pchoice[0].checked=true; //return; } if (document.pform.pchoice[0].checked){ //window.open('','_pay','toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=no, resizable=no, width=300, height=300, top=150, left=300'); document.pform.action="https://payment.buckaroo.nl/sslplus/request_for_authorization.asp" } if (document.pform.pchoice[1].checked){ //window.open('','_pay','toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=800, height=600, top=100, left=150'); document.pform.action="/paymentPoster.php" //document.pform.action="https://payment.buckaroo.nl/gateway/ideal_payment.asp" } //document.pform.target="_pay" //document.pform.submit(); }