function DOMGetElement(o) { if (document.getElementById) return document.getElementById(o); else if (document.all) return document.all[o]; else if (document.layers) return document.layers[o]; return null;}
function DOMWindowGetXOffset() { if (window.pageXOffset) return window.pageXOffset; else if (document.documentElement && document.documentElement.scrollLeft) return document.documentElement.scrollLeft; else if (document.body) return document.body.scrollLeft;}
function DOMWindowGetYOffset() { if (window.pageYOffset) return window.pageYOffset; else if (document.documentElement && document.documentElement.scrollTop) return document.documentElement.scrollTop; else if (document.body) return document.body.scrollTop;}
function DOMWindowGetInnerWidth() { if (window.innerWidth) return window.innerWidth; else if (document.documentElement && document.documentElement.clientWidth) return document.documentElement.clientWidth; else if (document.body) return document.body.clientWidth;}
function DOMWindowGetInnerHeight() { if (window.innerHeight) return window.innerHeight; else if (document.documentElement && document.documentElement.clientHeight) return document.documentElement.clientHeight; else if (document.body) return document.body.clientHeight;}
function DOMElementSetTopPos(o,val) { if (document.getElementById) o.style.top = val + "px"; else if (document.all) o.style.top = val; else if (document.layers) o.pageY = val;}
function DOMElementSetLeftPos(o,val) { if (document.getElementById) o.style.left = val + "px"; else if (document.all) o.style.left = val; else if (document.layers) o.pageX = val;}
function DOMElementGetHeight(o) { if (document.all) return o.clientHeight; else if (document.getElementById) return parseInt(o.offsetHeight); else if (document.layers) return o.document.height;}
function DOMElementGetWidth(o) { if (document.all) return o.clientWidth; else if (document.getElementById) return parseInt(o.offsetWidth); else if (document.layers) return o.document.width;}