function getElementStyleProp(obj, prop)
{
    var value = obj.style[prop];
    if (!value) {
        if (document.defaultView && document.defaultView.getComputedStyle) {
            value = document.defaultView.getComputedStyle(obj, '').getPropertyValue(prop);
        } else if (obj.currentStyle) {
            value = obj.currentStyle[style];
        }
    }
    return value;
}

function getElementRect(obj)
{
    var c = {x:0, y:0, w:obj.offsetWidth, h:obj.offsetHeight};
    while (obj) {
        c.x += obj.offsetLeft;
        c.y += obj.offsetTop;
        obj = obj.offsetParent;
    }
    return c;
}

function create_popup(name, width, height)
{
    var win = window.open("", name, "width=" + width + ", height=" + height + ", toolbar=no, location=no, scrollbars=yes, menubar=no, status=no, resizable=no");
    win.focus();
}
function create_popup2(link, width, height)
{
    var win = window.open(link, "tmp", "width=" + width + ", height=" + height + ", toolbar=no, location=no, scrollbars=yes, menubar=no, status=no, resizable=no");
    win.focus();
}
