﻿function Request(name) { var URLParams = new Object(); var aParams = document.location.search.substr(1).split('&'); for (i = 0; i < aParams.length; i++) { var aParam = aParams[i].split('='); URLParams[aParam[0]] = aParam[1]; } return URLParams[name]; }
function getId(A, B) { var obj = getObj(A); if (objExists(obj)) { return obj.getElementById(B); } }
function getTagName(A, B) { var obj = getObj(A); if (objExists(obj)) { return obj.getElementsByTagName(B); } else { return null; } }
function getAttribute(A, B) { var obj = getObj(A); if (objExists(obj)) { if (isIE()) if (obj.getAttributeNode(B) != null) return obj.getAttributeNode(B).nodeValue; else return null; else return obj.getAttribute(B); } else return null; }
function getChildNodes(A, B) { var obj = getObj(A); if (objExists(obj)) { if (isIE()) { return obj.childNodes; } else { var nodes = new Array(); for (var i = 0; i < obj.childNodes.length; i++) { if (typeof (obj.childNodes[i].tagName) != "undefined") { if (obj.childNodes[i].tagName.toLowerCase().indexOf(B.toLowerCase()) >= 0) { nodes[nodes.length] = obj.childNodes[i]; } } } return nodes; } } else return null; }
function isIE() { if (document.all) return true; else return false; }
function setClass(A, B) { var obj = getObj(A); if (objExists(obj)) if (isIE()) obj.className = B; else obj.setAttribute("class", B); }
function setStyle(A, B, C) { var obj = getObj(A); if (objExists(obj)) if (isIE()) obj.style.setAttribute(B, C); else { if (getAttribute(obj, "style") != null) { var r = RegExp(B.toLowerCase() + ":[^;];"); var t = getAttribute(obj, "style").toLowerCase() + ";"; obj.setAttribute("style", t.replace(r, "") + ";" + B + ":" + C + ";"); } else obj.setAttribute("style", B + ":" + C + ";"); } }
function setFunction(A, B, eventHandler) { if (A.addEventListener) { if (B.indexOf('on', 0) == 0) B = B.substr(2, B.length - 2); A.addEventListener(B, eventHandler, true); } else { if (B.indexOf('on', 0) != 0) B = 'on' + B; A.attachEvent(B, eventHandler); } }
function clientBody(A) { this.scrolltop = document.documentElement.scrollTop; this.cWidth = A.documentElement.clientWidth; this.cHeight = A.documentElement.clientHeight; this.sHeight = A.documentElement.scrollHeight; this.sWidth = A.documentElement.scrollWidth; this.oHeight = A.documentElement.offsetHeight; this.oWidth = A.documentElement.offsetWidth; return this; }
function createElem(A, B) { var obj = getObj(A); if (objExists(obj)) { B = B.toLowerCase(); if (B.indexOf("input_") == 0) { var InputType = B.replace("input_", ""); B = "input"; if (isIE()) { return obj.createElement("<input type='" + InputType + "'>"); } else { var tmp = obj.createElement(B); setAttribute(tmp, "type", InputType); return tmp; } } else { return obj.createElement(B); } } }
function setAttribute(A, B, C) { var obj = getObj(A); if (objExists(obj)) { obj.setAttribute(B, C); } }
function setHTML(A, B) { var obj = getObj(A); if (objExists(obj)) { obj.innerHTML = B; } }
function getText(A) { var obj = getObj(A); if (objExists(obj)) { if (isIE()) return obj.innerText; else return obj.textContent; } }
function appendChild(A, B) { var obj = getObj(A); if (objExists(obj)) { obj.appendChild(B); } }
function insertBefore(A, B, C) { var obj = getObj(A); if (objExists(obj)) { obj.insertBefore(B,C); } }
function getObj(A) { if (typeof (A) == "undefined") { return null; } else { return typeof (A) == "object" ? A : getId(document,A); } }
function objExists(A) { return (A) ? true : false; }
function mouseoverit(A) { var obj = getObj(A); if (objExists(obj)) { setClass(obj, getAttribute(obj,"class")+ "On");setFunction(obj, "onmouseout", function() { setClass(obj, getAttribute(obj, "class").replace("On", "")); }); } }
