﻿function loMain(loId, loXPos, loYPos) {
    document.getElementById("layOverTable").style.visibility = "hidden";
    var loSrc = document.getElementById(loId).getAttribute("longdesc");
    document.getElementById("layOverImg").setAttribute("src",loSrc);
    var loAlt = document.getElementById(loId).getAttribute("alt");
    document.getElementById("layOverTextCell").firstChild.nodeValue = loAlt;
    var loWidth = document.getElementById(loId).getAttribute("width");
    //  set table width to image unless it is a dummy image
    if (loWidth > 10) {     
        document.getElementById("layOverTable").setAttribute("width",loWidth);
    }
    var loXDoc = loXPos + lo_Geometry.getHorizontalScroll() + 15; 
    var loYDoc = loYPos + lo_Geometry.getVerticalScroll() - 70; 
    document.getElementById("layOverTable").style.left = loXDoc + "px";
    document.getElementById("layOverTable").style.top = loYDoc + "px";
    document.getElementById("layOverTable").style.visibility = "visible";
    return;
}
function loClear() {
    document.getElementById("layOverTable").style.visibility = "hidden";
    return;
}
// lo_Geometry functions
var lo_Geometry = {};

if (window.innerWidth) { // All browsers but IE
    lo_Geometry.getHorizontalScroll = function() { return window.pageXOffset; };
    lo_Geometry.getVerticalScroll = function() { return window.pageYOffset; };
}
else if (document.documentElement && document.documentElement.clientWidth) {
    // These functions are for IE6 when there is a DOCTYPE
    lo_Geometry.getHorizontalScroll = 
        function() { return document.documentElement.scrollLeft; };
    lo_Geometry.getVerticalScroll = 
        function() { return document.documentElement.scrollTop; };
}
else if (document.body.clientWidth) {
    // These are for IE4, IE5, and IE6 without a DOCTYPE
    lo_Geometry.getHorizontalScroll =
        function() { return document.body.scrollLeft; };
    lo_Geometry.getVerticalScroll = 
        function() { return document.body.scrollTop; };
}
