
/* ---menus.js---   */

var eOpenMenu = null;

function getObj(name)
{
  if (document.getElementById)
  {
	this.style = document.getElementById(name).style;
  } 
  else if (document.all)
  {
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   this.style = document.layers[name];
  }
}

function gettype(obj) 
{
	id = obj.id
	parts = id.split('_');
	obj_type = parts[0]
	obj_name = parts[1];
}		

function on(eSrc)
{
	gettype(eSrc);
	if ('menuContainer' == obj_type)
	{
		eSrc.style.color = '#323438';
		eSrc.style.background = '#ddc477';
		eSrc.style.border = '1px solid #323438';
		var x = new getObj('menuDropdown_' + obj_name);
		if (x.style) 
		{
			x.style.visibility = 'visible';
		}
	}
}

function off(eSrc)
{
	gettype(eSrc);
	if ('menuContainer' == obj_type)
	{
		eSrc.style.color = '#ddc477';
		eSrc.style.background = '#323438';
		var x = new getObj('menuDropdown_' + obj_name);
		if (x.style) 
		{
			x.style.visibility = 'hidden';
		}
	}
}	

