var graphics = new Array (); var countGraph = 0, prevID = 0, prev1 = -1, prev2 = -1, activeFoo = ""; // Script code Copyright MyRo 1999-2003 function errorHandler(message, url, line) { if (activeFoo != "showImage") { window.alert ("Een fout gebeurde: " + message + "\n op de lijn:" + line + "\n in: " + url); // stop the event from bubbling up to the default window.onerror handler } return true; } // install the global error-handler window.onerror = errorHandler; OS_UNKNOWN = 0; OS_LINUX = 1; OS_UBUNTU = 2; OS_MAC = 3; OS_WINDOWS = 4; BROWSER_UNKNOWN = 0; BROWSER_IE = 1; BROWSER_NS = 2; BROWSER_KONQUEROR = 3; BROWSER_OPERA = 4; BROWSER_FF = 5; BROWSER_SAFARI = 6; BROWSER_CHROME = 7; BROWSER_EDGE = 8; DEVICE_UNKNOWN = 0; DEVICE_IPHONE = 1; DEVICE_IPAD = 2; DEVICE_IPOD = 3; DEVICE_ANDROID = 4; function BV_checkBrowser (key, browser) { var pos; pos = this.agent.indexOf (key); if (pos >= 0) { this.version = Math.floor (parseFloat (this.agent.substr (pos + key.length)) * 100); if (key == 'trident/') // IE11 reported as Trident/7 this.version += 400; this.browser = browser; return true; } return false; } function BV_checkVersion (key) { var pos; pos = this.agent.indexOf (key); if (pos >= 0) { return Math.floor (parseFloat (this.agent.substr (pos + key.length)) * 100); } return -1; } function BV_checkOS (key, os) { var pos; pos = this.agent.indexOf (key); if (pos >= 0) { this.os = os; return true; } return false; } function BV_checkDevice (key, os) { var pos; pos = this.agent.indexOf (key); if (pos >= 0) { this.device = os; return true; } return false; } function BV_checkProperty (key) { return this.agent.indexOf (key) >= 0; } function BV_getVersion (browser) { if (this.browser == browser) return this.version; return -1; } function CBrowserVersion() { this.checkBrowser = BV_checkBrowser; this.checkVersion = BV_checkVersion; this.checkOS = BV_checkOS; this.checkProperty = BV_checkProperty; this.getVersion = BV_getVersion; this.checkOS = BV_checkDevice; this.checkDevice = BV_checkDevice; this.ver = navigator.appVersion; this.agent = navigator.userAgent.toLowerCase(); if (!(this.checkOS ('ubuntu', OS_UBUNTU) || this.checkOS ('mac', OS_MAC) || this.checkOS ('linux', OS_LINUX) || this.checkOS ('windows', OS_WINDOWS))) this.os = OS_UNKNOWN; if (!(this.checkDevice ('(ipad', DEVICE_IPAD) || this.checkDevice ('(iphone', DEVICE_IPHONE) || this.checkDevice ('(ipod', DEVICE_IPOD) || this.checkDevice ('android', DEVICE_ANDROID))) this.device = DEVICE_UNKNOWN; if (!(this.checkBrowser ('opera/', BROWSER_OPERA) || this.checkBrowser ('trident/', BROWSER_IE) || this.checkBrowser ('msie ', BROWSER_IE) || this.checkBrowser ('navigator/', BROWSER_NS) || this.checkBrowser ('netscape/', BROWSER_NS) || this.checkBrowser ('firefox/', BROWSER_FF) || this.checkBrowser ('konqueror', BROWSER_KONQUEROR) || this.checkBrowser ('edge/', BROWSER_EDGE) || this.checkBrowser ('chrome/', BROWSER_CHROME) || this.checkBrowser ('crios/', BROWSER_CHROME) || this.checkBrowser ('safari', BROWSER_SAFARI) || this.checkBrowser ('mozilla/', BROWSER_NS) )) this.browser = BROWSER_UNKNOWN; this.mozilla = this.checkVersion ('mozilla/'); this.gecko = this.checkProperty ('gecko'); this.webkit = this.checkVersion ('applewebkit/'); this.dom = document.getElementById?1:0; this.usedom = this.getVersion (BROWSER_NS) >= 600; this.reuse = this.getVersion (BROWSER_IE) >= 400 || this.usedom;//Reuse layers this.useDhtml = (this.getVersion (BROWSER_IE) > 300) || (this.getVersion (BROWSER_NS) > 600) || this.mozilla >= 500 || (BROWSER_KONQUEROR <= this.browser && this.browser <= BROWSER_CHROME) || this.webkit > 0; this.useLayer = this.getVersion (BROWSER_NS) == 400; this.supportError = this.getVersion (BROWSER_IE) >= 500 || this.getVersion (BROWSER_NS) >= 600; if (document.getElementById) GetObjectByRef = function (nm) {return document.getElementById (nm);}; else if (document.all) GetObjectByRef = function (nm) {return window.document.all [nm];}; else if (document.layers) GetObjectByRef = function (nm) {return document.layers [nm];}; else GetObjectByRef = null; if (document.getElementsByName) GetElementsByName = function (nm) {return document.getElementsByName (nm);}; else GetElementsByName = NULL; if (document.getElementsByTagName) GetElementsByTagName = function (nm) {return document.getElementsByTagName (nm);}; else GetElementsByTagName = NULL; if (this.browser == BROWSER_IE && (this.version < 500 && this.version >= 400)) GetParentNode = function(obj) {return obj ? obj.parentElement : NULL;}; else GetParentNode = function (obj) {return obj ? obj.parentNode : NULL;}; if (this.browser == BROWSER_IE) HasAttribute = function (obj, attr) {return attr in obj;}; else HasAttribute = function (obj, attr) {return obj.hasAttribute (attr);}; if (this.browser == BROWSER_IE) GetAttribute = function (obj, attr) {return typeof (obj) == "object" ? obj [attr] : null;}; else GetAttribute = function (obj, attr) {return 'getAttribute' in obj ? obj.getAttribute (attr) : null;}; if (this.browser == BROWSER_IE) SetAttribute = function (obj, attr, value) {obj [attr] = value;}; else SetAttribute = function (obj, attr, value) {obj.setAttribute (attr, value);}; if (this.browser == BROWSER_IE) SetEvent = function (obj, attr, value) {obj [attr] = new Function (value);}; else SetEvent = function (obj, attr, value) {obj.setAttribute (attr, value);}; RemoveAttribute = function (obj, attr) {obj.removeAttribute (attr);}; if (this.browser == BROWSER_IE) GetClassName = function (obj) {return GetAttribute (obj, "className");}; else GetClassName = function (obj) {return GetAttribute (obj, "class");}; if (this.browser == BROWSER_IE) SetClassName = function (obj, value) {return SetAttribute (obj, "className", value);}; else SetClassName = function (obj, value) {return SetAttribute (obj, "class", value);}; if (this.browser == BROWSER_IE) HasClassName = function (obj) {return HasAttribute (obj, "className");}; else HasClassName = function (obj) {return HasAttribute (obj, "class");}; if (this.browser == BROWSER_IE && this.version < 500) GetChildNodes = function (obj) {return obj.all;}; else GetChildNodes = function (obj) {return obj.childNodes;}; switch (this.browser) { case BROWSER_IE: case BROWSER_OPERA: GetEventSource = function (obj) {return event.srcElement;}; break; default: GetEventSource = function (obj) {return obj.target;}; break; } //window.alert ("agent=" + this.agent + " ver=" + this.ver + " os=" + this.os + " version=" + this.version + " browser=" + this.browser); return this; } var browserVersion=new CBrowserVersion(); function IsFormDataAvailable () { switch (browserVersion.browser) { case BROWSER_FF: return browserVersion.getVersion (BROWSER_FF) >= 2200; case BROWSER_CHROME: return true; default: return false; } // switch } // http://www.softcomplex.com/docs/get_window_size_and_scrollbar_position.html function _filterResults(n_win, n_docel, n_body) { var n_result = n_win ? n_win : 0; if (n_docel && (!n_result || (n_result > n_docel))) n_result = n_docel; return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result; } function GetClientWidth () {return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;} function GetClientHeight() {return window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;} function GetScrollLeft() {return _filterResults (window.pageXOffset ? window.pageXOffset : 0, document.documentElement ? document.documentElement.scrollLeft : 0, document.body ? document.body.scrollLeft : 0);} function GetScrollTop() {return _filterResults (window.pageYOffset ? window.pageYOffset : 0, document.documentElement ? document.documentElement.scrollTop : 0, document.body ? document.body.scrollTop : 0);} function GetImageWidth (img) {return IEVersion () > 0 ? parseInt (img.offsetWidth) : img.width;} function GetImageHeight (img) {return IEVersion () > 0 ? parseInt (img.offsetHeight) : img.height;} function GetEventTarget (event) { if (event) if (event.target) return event.target; else if (event.srcElement) return event.srcElement; if (window.event && window.event.srcElement) return window.event.srcElement; return null; } function InitGetObject () { } function GetBrowserVersion (browser) { if (browserVersion == null || browserVersion.browser != browser) return 0; return browserVersion.version; } function IEVersion () { return GetBrowserVersion (BROWSER_IE); } function NSVersion () { return GetBrowserVersion (BROWSER_NS); } function FireFoxVersion () { return GetBrowserVersion (BROWSER_FF); } function OperaVersion () { return GetBrowserVersion (BROWSER_OPERA); } function KonquerorVersion () { return GetBrowserVersion (BROWSER_KONQUEROR); } function SafariVersion () { return GetBrowserVersion (BROWSER_SAFARI); } function SupportDHTML () { if (browserVersion == null) return false; return browserVersion.useDhtml; } function SupportLayers () { if (browserVersion == null) return false; return browserVersion.useLayer; } function StopPropagation (event) { if (typeof (event) != "undefined" && event && event.stopPropagation) event.stopPropagation (event); else if (typeof (window.event) != "undefined") window.event.cancelBubble = true; } function SupportAnimation () { if (browserVersion == null) return false; return browserVersion.ie >= 550; } var prevOpen = null; function toggle(id) { if (!GetObjectByRef) return; var obj = GetObjectByRef (id); if (prevOpen) prevOpen.style.display = "none"; if (obj.style.display=="none") { obj.style.display = ""; prevOpen = null; } else { obj.style.display = "none"; prevOpen = obj; } } function hideObject(id) { if (!GetObjectByRef) return; var obj = GetObjectByRef (id); if (obj) obj.style.display = "none"; } function showObject(id) { if (!GetObjectByRef) return; var obj = GetObjectByRef (id); if (obj) obj.style.display = ""; } function iFrameContent (iframe) { try { return iframe.contentDocument || iframe.contentWindow.document; } catch (e) { return null; } } function CAjax () { this.request = null; } function CAjax_GetBs (foo, url) { if (window.XMLHttpRequest) // Mozilla, Safari, ... { this.request = new XMLHttpRequest(); if (FireFoxVersion () > 0 || NSVersion () > 0) // IE does not support it. this.request.overrideMimeType('text/xml'); } else if (window.ActiveXObject) // IE { this.request = new ActiveXObject("Microsoft.XMLHTTP"); } if (foo) this.request.onreadystatechange = foo; this.request.open ('Get', url, true); this.request.send (null); } function CAjax_Get (foo, url) { if (window.XMLHttpRequest) // Mozilla, Safari, ... { this.request = new XMLHttpRequest(); if (FireFoxVersion () > 0 || NSVersion () > 0) // IE does not support it. this.request.overrideMimeType('text/xml'); } else if (window.ActiveXObject) // IE { this.request = new ActiveXObject("Microsoft.XMLHTTP"); } if (foo) this.request.onreadystatechange = foo; this.request.ajax = this; this.request.open ('Get', url, true); this.request.send (null); } CAjax.prototype.Get = CAjax_Get; var ajaxRequests = new Array (); CAjax2 = function() { this.requestIndex = ajaxRequests.length; this.postFileMode = false; this.data = ''; ajaxRequests.push (this); if (window.XMLHttpRequest) this.request = new XMLHttpRequest(); else this.request = new ActiveXObject("Microsoft.XMLHTTP"); } function CAjax2_process (request) { if (request.request.readyState == 4) { if (request.request.status != 200) { if (typeof (request.onError) == 'function') request.onError (); if (typeof (debugAjax2) == 'function') debugAjax2 (request, 'Error'); } else if (typeof (request.onSuccess) == 'function') { request.onSuccess(); if (typeof (debugAjax2) == 'function') debugAjax2 (request, 'Succeeded'); } } } CAjax2.prototype.get = function(url, onSuccess, onError) { var r = ajaxRequests [this.requestIndex]; this.request.open('GET', url, true); this.request.onreadystatechange = function() {CAjax2_process (r);} this.onSuccess = onSuccess; this.onError = onError; this.request.setRequestHeader("Content-type","application/x-www-form-urlencoded"); this.request.setRequestHeader("X-Requested-With","XMLHttpRequest"); this.request.send(null); } CAjax2.prototype.post = function(url, data, onSuccess, onError) { var r = ajaxRequests [this.requestIndex]; this.request.open('POST', url, true); this.request.onreadystatechange = function() {CAjax2_process (r);} this.onSuccess = onSuccess; this.onError = onError; if (this.postFileMode) { this.request.setRequestHeader("Content-type","multipart/form-data; boundary="+this.boundary); this.request.setRequestHeader("Content-Length", data.length); } else this.request.setRequestHeader("Content-type","application/x-www-form-urlencoded"); this.request.setRequestHeader("X-Requested-With","XMLHttpRequest"); this.request.send(data); } CAjax2.prototype.postActive = function(url, onSuccess, onError) { var r = ajaxRequests [this.requestIndex]; this.request.open('POST', url, true); this.request.onreadystatechange = function() {CAjax2_process (r);} this.onSuccess = onSuccess; this.onError = onError; if (this.postFileMode) { this.request.setRequestHeader("Content-type","multipart/form-data; boundary="+this.boundary); this.request.setRequestHeader("Content-Length", this.data.length); } else this.request.setRequestHeader("Content-type","application/x-www-form-urlencoded"); this.request.setRequestHeader("X-Requested-With","XMLHttpRequest"); this.request.send(this.data); } CAjax2.prototype.postFileMode = function(postFileMode) {this.postFileMode = postFileMode;} CAjax2.prototype.boundary = "---MyRoPostFiles16xX"; CAjax2.prototype.addValue = function(name, value) { if (this.postFileMode) this.data += '--'+this.boundary+'\r\nContent-Disposition: form-data; name="'+this.encode (name)+'"\r\n\r\n'+value+'\r\n'; else { if (this.data != '') this.data += '&'; this.data += this.encode(name)+'='+this.encode(value); } // if } CAjax2.prototype.encode = function(query) {return encodeURIComponent(query);} // http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html function addEvent( obj, type, fn ) { if (obj.addEventListener) obj.addEventListener( type, fn, false ); else if (obj.attachEvent) { obj["e"+type+fn] = fn; obj[type+fn] = function() { obj["e"+type+fn]( window.event ); } obj.attachEvent( "on"+type, obj[type+fn] ); } } function removeEvent( obj, type, fn ) { if (obj.removeEventListener) obj.removeEventListener( type, fn, false ); else if (obj.detachEvent) { obj.detachEvent( "on"+type, obj[type+fn] ); obj[type+fn] = null; obj["e"+type+fn] = null; } } function getHiddenImageFrame (name) { var h = GetObjectByRef (name); if (h == null) { var c = document.createElement ('div'); c.id = name; c.style.display="none"; var b = GetElementsByTagName ("Body") [0]; b.appendChild (c); h = GetObjectByRef (name); } // if return h; } function getDate (id) { var re = new RegExp ("[^0-9]"); var parts = GetObjectByRef (id).value.split (re); if (parts.length > 4) return new Date (parts [2], parts [1] - 1, parts [0], parts [3], parts [4]); else if (parts.length > 2) return new Date (parts [2], parts [1] - 1, parts [0]); return null; } function getValidDate (dt) { dt = dt.replace (/ *$/, ""); var d = new Date (); var seps = "/.-"; var previousPos = 0; var endPos = getNumberDigitLength (dt, previousPos); if (endPos <= previousPos) return null; var day = parseInt (dt.substr (previousPos, endPos - previousPos), 10); if (isNaN(day) || day <= 0) return null; if (endPos >= dt.length || seps.indexOf (dt.charAt (endPos)) < 0) return null; previousPos = endPos + 1; endPos = getNumberDigitLength (dt, previousPos); var month = parseInt (dt.substr (previousPos, endPos - previousPos), 10); if (isNaN(month) || month <= 0) return null; var year; if (endPos < dt.length && seps.indexOf (dt.charAt (endPos)) >= 0) { previousPos = endPos + 1; endPos = getNumberDigitLength (dt, previousPos); year = parseInt (dt.substr (previousPos, endPos - previousPos), 10); if (typeof (year) == "number" && year < 2000 && year > 0) year += 2000; } else year = d.getFullYear (); while (dt.charAt (endPos) == " ") ++endPos; previousPos = endPos; endPos = getNumberDigitLength (dt, previousPos); var hour = 0, min = 0; seps = ":."; if (endPos > previousPos) { hour = parseInt (dt.substr (previousPos, endPos - previousPos), 10); if (isNaN(hour) || hour < 0) return null; if (seps.indexOf (dt.charAt (endPos)) >= 0) { previousPos = endPos + 1; endPos = getNumberDigitLength (dt, previousPos); min = parseInt (dt.substr (previousPos, endPos - previousPos), 10); if (isNaN (min) || min < 0) return null; } } if (endPos == dt.length) { d = new Date (year, month - 1, day, hour, min); if (d.getDate () == day && d.getMonth () + 1 && d.getFullYear () == year && d.getHours () == hour && d.getMinutes () == min) return d; } return null; } function getObjectDate (id) { return getValidDate (GetObjectByRef (id).value); } function AddBookmark(title,url) { if (window.external) { window.external.AddFavorite(url, title); } } function DumpProperties (obj) { var s = typeof (obj) + "\n"; for (var p in obj) { s += p + "="; try { s += typeof (obj [p]) + " "; s += obj [p]; } catch (e) { var d = e.description; if (d.charCodeAt (d.length - 1) == 10) d = d.substr (0, d.length - 2); s += "[Error: " + e.number + "=" + d + "]"; } s += "\n"; } return s; } function FindObjectPos(obj) { var curleft = curtop = 0; if (obj && "offsetParent" in obj) { for (;;) { curleft += obj.offsetLeft; curleft += obj.clientLeft; curtop += obj.offsetTop; curtop += obj.clientTop; if ("offsetParent" in obj) { obj = obj.offsetParent; if (obj == null) break; } else break; } // for } return [curleft, curtop]; } function FindObjectPosClass(obj) { var curleft = curtop = 0; if (obj && "offsetParent" in obj) { for (;;) { curleft += obj.offsetLeft; curleft += obj.clientLeft; curtop += obj.offsetTop; curtop += obj.clientTop; if ("offsetParent" in obj) { obj = obj.offsetParent; if (obj == null) break; } else break; } // for } return {left: curleft, top: curtop}; } function SetObjectPos (obj, co) { obj.style.top = co[1] + 'px'; obj.style.left = co[0] + 'px'; } function CUrlArgs () { this.items = new Object; this.add = urlargs_add; this.remove = urlargs_remove; this.addArg = urlargs_addArg; this.addUrl = urlargs_addUrl; this.toString = urlargs_toString; } function urlargs_add (arg, value) { this.items [arg] = value; } function urlargs_remove (arg) { this.items [arg] = null; } function urlargs_addArg (n) { var pos = n.indexOf ("="); if (pos > 0) this.add (n.substr (0, pos), n.substr (pos + 1)); } function urlargs_addUrl (url) { var params = url.split ("&"), param; for (param in params) this.addArg (params [param]); } function urlargs_toString () { var result = "", index; for (index in this.items) { if (result != "") result = result + "&"; result = result + index + "=" + this.items [index]; } return result; } function AddGetParam (url, getParam, doReplace) { var pos, urlEnd, urlBase; pos = url.indexOf ("#"); if (pos > 0) { urlEnd = url.substr (pos); url = url.substr (0, pos); } else urlEnd = ""; pos = url.indexOf ("?"); if (pos > 0) { urlBase = url.substr (0, pos); url = url.substr (pos + 1); } else urlBase = url; if (typeof (doReplace) == "undefined") doReplace = true; if (doReplace) { var args; args = new CUrlArgs (); args.addUrl (url); args.addUrl (getParam); getParam = args.toString (); } // if if (url.indexOf ("?") < 0) return urlBase + "?" + getParam + urlEnd; else return urlBase + "&" + getParam + urlEnd; } if (!String.prototype.trim) { String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g, '');}; } function nextSiblingObject(n) { var x = n.nextSibling; while (x && x.nodeType!=1) x=x.nextSibling; return x; } function previousSiblingObject (n) { var x = n.previousSibling; while (x && x.nodeType!=1) x=x.previousSibling; return x; } function firstSiblingObject(n) { var x = n.parentNode.firstChild; while (x && x.nodeType!=1) x=x.nextSibling; return x; } function lastSiblingObject(n) { var x = n.parentNode.lastChild; while (x && x.nodeType!=1) x=x.previousSibling; return x; } function findParentOfType (n, tp) { tp = tp.toLowerCase (); var x = n.parentNode; while (x) { if (x.tagName && x.tagName.toLowerCase ()==tp) return x; x=x.parentNode; } return null; } function hasClass (o, n) { if (typeof (o) == "string") o = GetObjectByRef (o); var on = GetClassName (o); if (on == null) return -1; var from = 0; var p; for (;;) { p = on.indexOf (n, from); if (p < 0) return p; if (p > 0 && on [p - 1] != ' ') from = p + 1; else if (p + n.length < on.length && on [p + n.length] != ' ') from = p + 1; else return p; } // for } function RemoveClass (o, n) { if (typeof (o) == "string") o = GetObjectByRef (o); var on = GetClassName (o); if (on == null) on = ''; var p = hasClass (o, n); if (p > 0) if (p + n.length < on.length) on = on.substr (0, p) + on.substr (p + n.length + 1); else on = on.substr (0, p - 1); else if (p == 0) if (p + n.length < on.length) on = on.substr (p + n.length + 1); else on = ''; SetClassName (o, on); } function AddClass (o, n) { if (typeof (o) == "string") o = GetObjectByRef (o); var on = GetClassName (o); if (on == null) on = ''; var p = hasClass (o, n); if (p < 0) { if (on.length == 0) on = n; else on = on + " " + n; SetClassName (o, on); } }