// Script code Copyright MyRo 1999-2009 var GetObjectByRef = null; function errorHandler(message, url, line) { 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; 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); 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_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.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.checkBrowser ('opera/', BROWSER_OPERA) || 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 ('safari', BROWSER_SAFARI) || this.checkBrowser ('chrome/', BROWSER_CHROME) || 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 obj [attr];}; else GetAttribute = function (obj, attr) {return obj.getAttribute (attr);}; 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(); // 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 _filterResults (window.innerWidth ? window.innerWidth : 0, document.documentElement ? document.documentElement.clientWidth : 0, document.body ? document.body.clientWidth : 0);} function GetClientHeight() {return _filterResults (window.innerHeight ? window.innerHeight : 0, document.documentElement ? document.documentElement.clientHeight : 0, document.body ? document.body.clientHeight : 0);} 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 SupportDHTML () { if (browserVersion == null) return false; return browserVersion.useDhtml; } 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 SupportLayers () { if (browserVersion == null) return false; return browserVersion.useLayer; } function SupportAnimation () { if (browserVersion == null) return false; return browserVersion.ie >= 550; } function Check() { if (!SupportDHTML ()) return; var obj; for (var i=0; i < Data.elements.length; i++) { obj=Data.elements[i]; if (obj.type=="text" && Data.elements[i].value.length > 0) { doSubmit.style.visibility="visible"; return 1; } } doSubmit.style.visibility="hidden"; } function InitSheet() { if (SupportDHTML ()) doSubmit.style.visibility="hidden"; } function ShowAnswer (id, hide) { if (SupportDHTML ()) { var obj; if (typeof (id) == "string") obj = GetObjectByRef (id); else obj = id; if (hide) obj.style.display="none"; else obj.style.display=""; } } function IsAnswerVisible (oItems) { var obj = GetObjectByRef (oItems); if (obj) { return obj.style.display=="inline"; } return false; } function ToggleAnswer (id) { if (SupportDHTML ()) { var obj; if (typeof (id) == "string") obj = GetObjectByRef (id); else obj = id; if (obj.style.display=="none") obj.style.display=""; else obj.style.display="none"; } } function ToggleAnswerS (oItems) { var obj = GetObjectByRef (oItems); if (obj) { if (obj.style.display == "none") { obj.style.display = "inline"; } else { obj.style.display = "none"; } } } function SelectMenu (id) { if (SupportDHTML ()) { if (id.className == "RMenu") id.className = "RMenuPush"; id.style.color = "Red"; } } function UnselectMenu (id) { if (SupportDHTML ()) { if (id.className == "RMenuPush") id.className = "RMenu"; id.style.color = "Black"; } } function ToggleDisplay(oItems) { var obj = GetObjectByRef (oItems); if (obj) if ((obj.style.display == "") || (obj.style.display == "none")) { obj.style.display = "block"; //oButton.src = "/msdn-online/start/images/minus.gif"; } else { obj.style.display = "none"; //oButton.src = "/msdn-online/start/images/plus.gif"; } } var menuCount; function InitDownMenu1 (sTitle) { menuCount = 0; document.write ('