// Show menu image strip
function ShowLayer(sender,cobj) {
	HideLayers();
    var MLayer = document.getElementById(sender);
    clearTimeout(t);
    MLayer.style.left=findPosX(document.getElementById(cobj))+"px";
    MLayer.style.display="block";
    changeOpac(0,sender);
    shiftOpacity(sender, 1000);
	}

// Hide any menu image strip
function HideLayers() {
    var items = document.getElementsByTagName("div");
    for ( var i = 0; i < items.length; i++ ) {
    	if (items[i].id.search("IMenu")>0) { 
			items[i].style.display="none";
		}
    }              
}

// Prepare to automatically hide menu image strip
function StartTimeout() {
	t=setTimeout("HideLayers()",500);

}
var t=0;
// Hold it, user still looking at menu image strip
function StopTimeout() {
    	clearTimeout(t);
}

function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

