use_tables = 1

function getMargin(axis) {
    if (axis == 'x') {
        var pageMargin = 10
        var margin = (document.body.offsetWidth - 714) / 2 - pageMargin
        return margin > pageMargin ? margin : pageMargin
        }
      else
        return 15
    }

function getImageX(id) {
    var x = 0
    var obj = document.images[id]
    while (obj.offsetParent != null) {
        x += obj.offsetLeft
        obj = obj.offsetParent
        }
    x += obj.offsetLeft
    return x
    }

function getImageY(id) {
    var y = 0
    var obj = document.images[id]
    while (obj.offsetParent != null) {
        y += obj.offsetTop
        obj = obj.offsetParent
        }
    y += obj.offsetTop
    return y
    }

function setLayer(id, content) {
    document.all[id].innerHTML = content
    }

function showLayer(id, x, y) {
    document.all[id].style.left = x
    document.all[id].style.top = y
    document.all[id].style.visibility = 'visible'
    }

function hideLayer(id) {
    document.all[id].style.visibility = 'hidden'
    }

function submitOnEnter(e) {
    if (e.keyCode == 13)
        document.loginbox.submit()
    }

function searchOnEnter(e) {
    if (e.keyCode == 13) {
        choose_search();
        }
    }

function mousedownHandler(e) {
    e = (e) ? e : (event) ? event : null;
    if (e) {
        if (document.all) {
            mouseX = e.clientX + document.body.scrollLeft
            mouseY = e.clientY + document.body.scrollTop
        }
        else {
            mouseX = e.pageX;
            mouseY = e.pageY;
        }
    }
}

document.onmousedown = mousedownHandler
