﻿function showpopup(x) {
    if (x) {
        var id = x.id;
        id += 'popup';
        var pop = window.document.getElementById(id);
        if (pop) {
            var s = pop.style;
            s.display = "block";
        }
    }
}

function hidepopup(x) {
    if (x) {
        var id = x.id;
        id += 'popup';
        var pop = window.document.getElementById(id);
        if (pop) {
            var s = pop.style;
            s.display = "none";
        }
    }
}

function getY(id) {
    if (id) {
        var oElement = window.document.getElementById(id);
        var iReturnValue = 0;
        while (oElement != null) {
            iReturnValue += oElement.offsetTop;
            oElement = oElement.offsetParent;
        }
        return iReturnValue;
    }
}
function getX(id) {
    if (id) {
        var oElement = window.document.getElementById(id);
        var iReturnValue = 0;
        while (oElement != null) {
            iReturnValue += oElement.offsetLeft;
            oElement = oElement.offsetParent;
        }
        return iReturnValue;
    }
}

