function doImg(imgName, imgSrc){
 document.images[imgName].src = imgSrc.src;
}

var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
var calunit=ns? "" : "px"


function moreInfo(ID)
{
	branch="i"+ID;
	var objBranch = document.getElementById(branch).style;
	if(objBranch.display=="block") objBranch.display="none";
	else objBranch.display="block";
}

var lastTD = "";
function onmouseOverDiv(obj,className)
{
	obj.style.display = 'block';
	lastTD.className = className;
}
function onmouseOutDiv(obj,className)
{
	obj.style.display = 'none';
	lastTD.className = className;
}
function showSubMenu(objTd , name)
{
	lastTD=objTd;  // last td on menu bar
	var objDiv = document.getElementById (name);
	objDiv.style.display = (objDiv.style.display == "none" || objDiv.style.display == "")? "block" : "none";
	objDiv.style.left = getPosX(objTd)-2 + calunit;
	objDiv.style.top = getPosY(objTd) + objTd.offsetHeight + calunit ;
	
}
function hideMenu(name)
{
	var objDiv = document.getElementById (name);
	objDiv.style.display = "none";
}
function getPosX(obj)
{
	var curleft = 0;
	while (obj.offsetParent)
	{
	  curleft += obj.offsetLeft;
	  obj = obj.offsetParent;
	}
	return curleft;

}
function getPosY(obj)
{
	var curtop = 0;
	while (obj.offsetParent)
	{
	  curtop += obj.offsetTop;
	  obj = obj.offsetParent;
	}
	return curtop;

}
function changeColor(obj,color)
{
    var ob=document.getElementById(obj);
    if(ob != null)
    {
        ob.style.backgroundColor = color;
    }

}

function hideTitle(id)
{
  var title = document.getElementById(id);
  title.className="m1off";
}

function doM2off(obj)
{
 obj.className='m2off';
}

function doM2on(obj)
{
 obj.className='m2on';
}


