﻿function getid(A) { return document.getElementById(A); }
function getAttr(A, B) { var obj = typeof (A) == "object" ? A : getid(A); if (objExists(obj)) { if (IsIE()) return obj.getAttributeNode(B).value; else return obj.getAttribute(B); } else return null; }
function getChildNodes(A, B) { var obj = typeof (A) == "object" ? A : getid(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() == B.toLowerCase()) { nodes[nodes.length] = obj.childNodes[i]; } } } return nodes; } } else return null; }
function IsIE() { if (document.all) return true; else return false; }
function objExists(A) { return (A) ? true : false; }
function setClass(A, B) { var obj = typeof (A) == "object" ? A : getid(A); if (objExists(obj)) if (IsIE()) obj.className = B; else obj.setAttribute("class", B); }
function setStyle(A, B, C) { var obj = typeof (A) == "object" ? A : getid(A); if (objExists(obj)) if (IsIE()) obj.style.setAttribute(B, C); else { obj.setAttribute("style", B + ":" + C + ";"); } }
function setFunction(A, B, C) { var obj = typeof (A) == "object" ? A : getid(A); if (objExists(obj)) if (IsIE()) { eval("obj." + B + "=function(){" + C + "};"); } else { obj.setAttribute(B, C); } }
