function navi() { this.ie4 = document.all ? 1 : 0; this.nn4 = document.layers ? 1 : 0; this.nn6 = document.getElementById && !document.all? 1 : 0; this.op5 = document.all && navigator.userAgent.indexOf('Opera') != -1 ? 1 : 0; if (document.body) { if (document.body.clientWidth) this.width = document.body.clientWidth; else if (window.innerWidth) this.width = window.innerWidth; if (document.body.clientHeight) this.height = document.body.clientHeight; else if (window.innerHeight) this.height = window.innerHeight; if (document.body.scrollLeft) this.scrollLeft = document.body.scrollLeft; else if (window.pageXOffset) this.scrollLeft = window.pageXOffset; if (document.body.scrollTop) this.scrollTop = document.body.scrollTop; else if (window.pageXOffset) this.scrollTop = window.pageYOffset; if (document.body.scrollWidth) this.scrollWidth = document.body.scrollWidth; if (document.body.scrollHeight) this.scrollHeight = document.body.scrollHeight; if (document.body.offsetWidth) this.offsetWidth = document.body.offsetWidth; if (document.body.offsetHeight) this.offsetHeight = document.body.offsetHeight; } this.getonload = getonload; this.addonload = addonload; this.addevent = addevent; this.addonunload = addonunload; function getonload() { if (window.onload != null) { we = window.onload.toString(); st = we.indexOf('{'); en = we.lastIndexOf('}'); if (st != -1 && en != -1) return new Array(we.substring(0, st + 1), we.substring(st + 1, en), we.substring(en, we.length)); } return new Array('', '', ''); } function addonload(code) { this.addevent(window, 'load', (typeof code == 'function' ? code : new Function(code))); } function addonunload(code) { this.addevent(window, 'unload', (typeof code == 'function' ? code : new Function(code))); } function addevent(el, evname, func) { if (this.ie4) { el.attachEvent("on" + evname, func); } else { el.addEventListener(evname, func, true); } } } function getobj(name, iframe) { base = (typeof(iframe) == 'string' ? getobj(iframe).contentWindow : window); nav = new navi(); if (nav.nn4) { return base.document.layers[name]; } else if (nav.nn6) { return base.document.getElementById(name); } else { return base.document.all[name]; } } function getevalobj(name) { nav = new navi(); if (nav.nn4) { return 'document.layers[\'' + name + '\']'; } else if (nav.nn6) { return 'document.getElementById(\'' + name + '\')'; } else { return 'document.all[\'' + name + '\']'; } } function getcss(obj) { nav = new navi(); if (nav.nn4) { return obj; } else { return obj.style; } } function getevalcss() { nav = new navi(); if (nav.nn4) { return ''; } else { return '.style'; } } function getsevalobj(name) { nav = new navi(); if (nav.nn4) { return 'document.layers[\\\'' + name + '\\\']'; } else if (nav.nn6) { return 'document.getElementById(\\\'' + name + '\\\')'; } else { return 'document.all[\\\'' + name + '\\\']'; } } function objswitch(css, force) { if (css.display == 'none' && typeof(force) == 'undefined' || force == true) { css.display = ''; return; } if (css.display == '' && typeof(force) == 'undefined' || force != true) { css.display = 'none'; return; } } function objevalswitch(obj, val) { if (css = getcss(getobj(obj))) { if ((css.display == 'none' && typeof(val) == 'undefined') || (typeof(val) != 'undefined' && val == true)) { css.display = ''; } else { css.display = 'none'; } } } function objhide(css) { css.display = 'none'; } function objshow(css) { css.display = 'inline'; }