function showsubmenu(menuID) {
  var menu = getElement(menuID);
  if (menu) { menu.className = "dropshown"; }
  menu = getElement(menuID+"lbl");
  if (menu) { menu.className = "tmenuactive"; }
}
function hidesubmenu(menuID) {
  var menu = getElement(menuID);
  if (menu) { menu.className = "dropdown"; }
  menu = getElement(menuID+"lbl");
  if (menu) { menu.className = "tmenu"; }
  menu = getElement(menuID+"dwn");
  if (menu) { menu.src="/resources/images/dwnoff.gif"; }  
}
function getElement(objID) {
        if (document.getElementById) {
                return document.getElementById(objID);
        }
        else if (document.all) {
                return document.all(objID);
        }
        else if (document.layers) {
                document.layers(objID);
        }
}


function findPosX(obj)
{
        var curleft = 0;
        if (obj.x)
                curleft += obj.x;
        else if (obj.offsetParent)
        {
                while (obj.offsetParent)
                {
                        curleft += obj.offsetLeft
                        obj = obj.offsetParent;
                }
		curleft++;
        }
        return curleft;
}

function findPosY(obj)
{
        var curtop = 0;
        if (obj.y)
                curtop += obj.y;
        else if (obj.offsetParent)
        {
                while (obj.offsetParent)
                {
                        curtop += obj.offsetTop
                        obj = obj.offsetParent;
                }
		curtop++;
        }
        return curtop;
}

function jumpto(box) {
  var jumptobox = getElement(box);
  if (jumptobox.value) {
    document.location.href="/"+jumptobox.value;
  }
}
