$J(document).ready(function() { $J('a.lightbox').lightBox({ overlayBgColor: '#FFF', overlayOpacity: 0.6, containerResizeSpeed: 800, txtImage: 'Afbeelding', txtOf: 'van' }); }); function GoURL(link) { location.href = link; } function checkint(fieldid) { var var2temp = ''; var checkstr = '0123456789-'; for (i = 0; i < document.getElementById(fieldid).value.length; i++) { if (checkstr.indexOf(document.getElementById(fieldid).value.substr(i,1)) >= 0) { var2temp = var2temp + document.getElementById(fieldid).value.substr(i,1); } } document.getElementById(fieldid).value = var2temp; } function vergroot(url){ urlstr = url.replace("v3","v5"); specswindow = window.open(urlstr,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=0,copyhistory=0,width=540,height=540'); return; } function add(waarde){ } function vergrooto(url){ urlstr = url.replace("loadv3.asp","loadv5.asp"); specswindow = window.open(urlstr,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=0,copyhistory=0,width=540,height=540'); return; } function order(url){ urlstr = url.replace("loadv3.asp","loadv5.asp"); specswindow = window.open(urlstr,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=0,copyhistory=0,width=600,height=300'); return; } function iDeal(url){ specswindow = window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=0,copyhistory=0,width=800,height=600'); return; } function bevestig(url) { if (confirm('Weet u zeker dat dat u dit wilt verwijderen?')) { location.href=url; } else { return; } } function bevestigconfirm(url) { if (confirm('Weet u zeker dat dat u uw bestelling wil afronden?')) { location.href=url; } else { return; } } function bevestigform() { if (confirm('Weet u zeker dat dat u dit wilt verwijderen?')) { this.mijnform.submit(); } else { return; } } function Favoriet() { title = document.title; url = window.location.href; if (window.sidebar){window.sidebar.addPanel(title, url,"");} else if( window.external ) {window.external.AddFavorite( url, title);} else if(window.opera && window.print){return true;} } function orderXMLv2(id, id2) { currentTime = new Date(); if (id.indexOf('meer') !=-1) { idarray = id.split("/"); for (i=0; i<1501; i++) { document.getElementById(idarray[1]).options[i]=new Option('Aantal: ' + i,i + '/' + idarray[1] + '/' + idarray[2], false, false); } } else { var doel = "/module/orderv2.asp?aktie=m1&var1=" + id + "/" + id2 + "&var2=" + currentTime if (window.XMLHttpRequest) req = new XMLHttpRequest(); else if (window.ActiveXObject) req = new ActiveXObject("Microsoft.XMLHTTP"); else return; req.open('GET',doel); req.setRequestHeader('content-type', 'text/xml'); req.onreadystatechange = xmlreadyv2; req.send(null); } } function xmlreadyv2() { if (req.readyState != 4) return; if (req.status == 200) { if(req.responseText.indexOf('[debug]') != -1) { alert(req.responseText); } if(req.responseText.indexOf('') != -1) { location.href = '/Mijn_Winkelwagen'; } else { document.getElementById('winkelwagen').innerHTML=req.responseText; $J("#AddToBasket").modal({position: ["40%","40%"]}, {onOpen: function (dialog) { dialog.overlay.fadeIn('fast', function () { dialog.data.hide(); dialog.container.fadeIn('fast', function () { dialog.data.slideDown('slow'); }); }); }}); setTimeout("$J.modal.close();",1200); } } if(document.getElementById('dynamic-winkelwagen')) { currentTime = new Date(); flexml('/XML/widget/winkelwagen.asp?cc=' + currentTime,'dynamic-winkelwagen'); } } var targetid = ''; function flexml(url, target) { targetid = target; ct = new Date(); if (window.XMLHttpRequest) req = new XMLHttpRequest(); else if (window.ActiveXObject) req = new ActiveXObject("Microsoft.XMLHTTP"); else return; req.open('GET',url); req.setRequestHeader('content-type', 'text/xml'); req.onreadystatechange = flexmlready; req.send(null); } function flexmlready() { if (req.readyState != 4) return; if (req.status == 200){document.getElementById(targetid).innerHTML=req.responseText;} } function sack(file) { this.xmlhttp = null; this.resetData = function() { this.method = "POST"; this.queryStringSeparator = "?"; this.argumentSeparator = "&"; this.URLString = ""; this.encodeURIString = true; this.execute = false; this.element = null; this.elementObj = null; this.requestFile = file; this.vars = new Object(); this.responseStatus = new Array(2); }; this.resetFunctions = function() { this.onLoading = function() { }; this.onLoaded = function() { }; this.onInteractive = function() { }; this.onCompletion = function() { }; this.onError = function() { }; this.onFail = function() { }; }; this.reset = function() { this.resetFunctions(); this.resetData(); }; this.createAJAX = function() { try { this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e1) { try { this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { this.xmlhttp = null; } } if (! this.xmlhttp) { if (typeof XMLHttpRequest != "undefined") { this.xmlhttp = new XMLHttpRequest(); } else { this.failed = true; } } }; this.setVar = function(name, value){ this.vars[name] = Array(value, false); }; this.encVar = function(name, value, returnvars) { if (true == returnvars) { return Array(encodeURIComponent(name), encodeURIComponent(value)); } else { this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true); } } this.processURLString = function(string, encode) { encoded = encodeURIComponent(this.argumentSeparator); regexp = new RegExp(this.argumentSeparator + "|" + encoded); varArray = string.split(regexp); for (i = 0; i < varArray.length; i++){ urlVars = varArray[i].split("="); if (true == encode){ this.encVar(urlVars[0], urlVars[1]); } else { this.setVar(urlVars[0], urlVars[1]); } } } this.createURLString = function(urlstring) { if (this.encodeURIString && this.URLString.length) { this.processURLString(this.URLString, true); } if (urlstring) { if (this.URLString.length) { this.URLString += this.argumentSeparator + urlstring; } else { this.URLString = urlstring; } } // prevents caching of URLString this.setVar("rndval", new Date().getTime()); urlstringtemp = new Array(); for (key in this.vars) { if (false == this.vars[key][1] && true == this.encodeURIString) { encoded = this.encVar(key, this.vars[key][0], true); delete this.vars[key]; this.vars[encoded[0]] = Array(encoded[1], true); key = encoded[0]; } urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0]; } if (urlstring){ this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator); } else { this.URLString += urlstringtemp.join(this.argumentSeparator); } } this.runResponse = function() { eval(this.response); } this.runAJAX = function(urlstring) { if (this.failed) { this.onFail(); } else { this.createURLString(urlstring); if (this.element) { this.elementObj = document.getElementById(this.element); } if (this.xmlhttp) { var self = this; if (this.method == "GET") { totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString; this.xmlhttp.open(this.method, totalurlstring, true); } else { this.xmlhttp.open(this.method, this.requestFile, true); try { this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") } catch (e) { } } this.xmlhttp.onreadystatechange = function() { switch (self.xmlhttp.readyState) { case 1: self.onLoading(); break; case 2: self.onLoaded(); break; case 3: self.onInteractive(); break; case 4: self.response = self.xmlhttp.responseText; self.responseXML = self.xmlhttp.responseXML; self.responseStatus[0] = self.xmlhttp.status; self.responseStatus[1] = self.xmlhttp.statusText; if (self.execute) { self.runResponse(); } if (self.elementObj) { elemNodeName = self.elementObj.nodeName; elemNodeName.toLowerCase(); if (elemNodeName == "input" || elemNodeName == "select" || elemNodeName == "option" || elemNodeName == "textarea") { self.elementObj.value = self.response; } else { self.elementObj.innerHTML = self.response; } } if (self.responseStatus[0] == "200") { self.onCompletion(); } else { self.onError(); } self.URLString = ""; break; } }; this.xmlhttp.send(this.URLString); } } }; this.reset(); this.createAJAX(); }