function showByPosition(object,x,y,e) {
    if (document.layers && document.layers[object]) {
        if ((e.x + x + 50 + document.layers[object].clip.width) > (window.pageXOffset + window.innerWidth))
            x = x - document.layers[object].clip.width;

        if ((e.y + y + 50 + document.layers[object].clip.height) > (window.pageYOffset + window.innerHeight))
            y *= -4;

        document.layers[object].left = e.x + x;
        document.layers[object].top = e.y + y;
        document.layers[object].visibility = 'visible';
    }
    else if (document.all) {
        e = window.event;

        if ((e.x + x + document.all[object].clientWidth) > (document.body.clientWidth + document.body.scrollLeft))
            x = (document.body.clientWidth + document.body.scrollLeft) - document.all[object].clientWidth;
        else
            x = e.x + x;

        if ((e.y + y + document.all[object].clientHeight) > (document.body.clientHeight + document.body.scrollTop))
            y = e.y - (y * 4);
        else
            y = e.y + y;

        document.all[object].style.posLeft = x;
        document.all[object].style.posTop = y;
        document.all[object].style.visibility = 'visible';
    }
}

function hide(object) {
    if (document.layers && document.layers[object])
        document.layers[object].visibility = 'hidden';
    else if (document.all)
        document.all[object].style.visibility = 'hidden';
}
