function getY(o) {
    var iValue = 0;
    while (o != null) {
        iValue += o.offsetTop;
        o = o.offsetParent;
    }
    return iValue;
}
function getX(o) {
    var iValue = 0;
    if (o.offsetParent) {
        //        if (IE) iValue += o.getBoundingClientRect().left;
        //        else {
        while (o != null) {
            iValue += o.offsetLeft;
            o = o.offsetParent;
        }
        //}
    }
    else if (o.x) iValue += o.x;
    // alert(iValue);
    return iValue;
}
function getElementsByClassName(className, tag, elm) {
    var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");
    var tag = tag || "*";
    var elm = elm || document;
    var elements = (tag == "*" && elm.all) ? elm.all : elm.getElementsByTagName(tag);
    var returnElements = [];
    var current;
    var length = elements.length;
    for (var i = 0; i < length; i++) {
        current = elements[i];
        if (testClass.test(current.className)) {
            returnElements.push(current);
        }
    }
    return returnElements;
}
function screenCenter(id) {
    var el = document.getElementById(id);
    var w = el.offsetWidth;
    el.style.top = "30px";
    el.style.left = ((screen.width - w) / 2) + "px";
}
////////////////////////////////////////////////////////
function tellme(x) {
    if (!xshow) {
        xshow = true;
        alert(x);
    }
}
function tell(t) {
    alert(t.offsetTop+":"+t.id);
}

function screenCenter(id) {
    var el = document.getElementById(id);
    var w = el.offsetWidth;
    el.style.top = "30px";
    var sc = document.getElementsByTagName("body");
    var x = sc[0].offsetWidth;
    el.style.left = ((x - w) / 2) + "px";
}
 //////////////////////////////////////////////////////////
/*
var IE = document.all ? true : false;
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
var tempX = 0;
var tempY = 0;
function getMouseXY(e) {
    if (IE) { // grab the x-y pos.s if browser is IE
        mousex = event.clientX + document.body.scrollLeft;
        mousey = event.clientY + document.body.scrollTop;
    }
    else {  // grab the x-y pos.s if browser is NS
        mousex = e.pageX;
        mousey = e.pageY;
    }
    if (mousex < 0) { mousex = 0; }
    if (mousey < 0) { mousey = 0; }
    //document.Show.MouseX.value = tempX;
    //document.Show.MouseY.value = tempY;
    mouseloc();
    return true;
}
*/
//String.prototype.left = function (n) { return this.substring(0, n); }

