function getXML(url) { this.url = url; } getXML.prototype.setVariables = function(v) { this.variables = v; } getXML.prototype.onreadystatechange = function(o) { if (o.req.readyState == 4) { // ready if (o.req.status == 200) { // OK try { // all except of ie will do this when no xml/text header is present o.onReady(o.req.responseXML); } catch (e) { try { // old o.req.responseXML.async = "false"; o.req.responseXML.loadXML(o.req.responseText); o.req.responseXML.loadXML(o.req.responseText); return o.onReady(o.req.responseXML); } catch (e) { } } } } } getXML.prototype.execute = function() { if (window.XMLHttpRequest) { this.req = new XMLHttpRequest(); } else if (window.ActiveXObject) { // if IE var activeX = ["Msxml2.XMLHTTP","Microsoft.XMLHTTP"]; for(var i=0; i 0){ aantal[i]=arr_artikel[i]+"="+document.getElementById(arr_artikel[i]).value; //document.getElementById(arr_artikel[i]).disabled=true; } } } var replacer = "&"; var aantal = aantal.toString().replace(/,/g, replacer); var url = "/js/getorder.php?xml=true"; var posData = aantal; var o = new getXML(url); o.setVariables(posData); o.onReady = function(xml) { if(document.getElementById("bestel_link").innerHTML == 'bestellen'){ animate_holder2(); } document.getElementById("order_final_list").innerHTML=xml.getElementsByTagName("confirmation")[0].childNodes[0].nodeValue; document.getElementById("bestel_link").innerHTML='Wijzig bestelling'; } o.execute(); } function set_content(ervar){ if(actief > 0 ){ animate_holder2(); } setTimeout('setInhoud(\''+ervar+'\')','500'); actief=1; } function playSound(soundfile) { document.getElementById("plays").innerHTML= ""; } direction2='right'; direction3='right'; function animate_holder2() { if(direction2 == 'left'){ px='-343px'; direction2='right'; //als 2 + 3 openstaat en 2 gaat dicht dan ook 3 dicht if(document.getElementById("holder_3").style.marginLeft == '-17px' || document.getElementById("holder_3").style.marginLeft == '2px'){ animate_holder3(); } }else if(direction2 == 'right'){ px='-17px'; direction2='left'; } document.getElementById("holder_2").style.display='block'; $('#holder_2').animate({ 'marginLeft' : px }); } function animate_holder3() { //playSound('http://www.vanwezel.nl/mp3/slide.mp3'); if(direction3 == 'left'){ px='-343px'; direction3='right'; }else if(direction3 == 'right'){ px='2px'; direction3='left'; } document.getElementById("holder_3").style.display='block'; $('#holder_3').animate({ 'marginLeft' : px }); } function controle() { var fout=""; if((document.form.email.value.indexOf('@',0)==-1)||(document.form.email.value.indexOf('.',0)==-1)||(document.form.email.value=="")) {fout="Uw email-adres is niet juist\n";} if(document.form.contactpersoon.value=="") { fout="Gelieve een contactpersoon in te vullen\n";} if(fout!="") {document.getElementById("fout").innerHTML=fout; return false;} else { var url = "/js/nieuwsbrief.php?xml=true"; var posData = "bedrijfsnaam="+document.form.bedrijfsnaam.value+"&email="+document.form.email.value+"&contactpersoon="+document.form.contactpersoon.value+"&adres="+document.form.adres.value; var o = new getXML(url); o.setVariables(posData); o.onReady = function(xml) { document.getElementById("form-contact").innerHTML=xml.getElementsByTagName("confirmation")[0].childNodes[0].nodeValue; } o.execute(); } } function isNumeric(value) { if (value != null && !value.toString().match(/^[-]?\d*\.?\d*$/)) return false; return true; } function order_controle() { var fout=""; document.getElementById("fout").innerHTML=''; aantal = new Array(); arr_artikel = new Array(); for(i=0; i\n\n'; var printReadyElem = '
Van-Wezel-Verpakkingen
'+document.getElementById("map_map").innerHTML+'
'+document.getElementById("map_directions").innerHTML+'
'; html += printReadyElem; html += '\n\n'; var printWin = window.open("","printSpecial"); printWin.document.open(); printWin.document.write(html); if (gAutoPrint) printWin.print(); } } function test_data(field) { var value = field.value; // get input value // Change the backgroundColor of the input field based on whether or not // the value of the input field is a number. if(isNaN(value)) { field.style.backgroundColor = 'red'; } else { field.style.backgroundColor = 'white'; } }