function show(div)
{
	if (div.style.display=='none')
	{
	  div.style.display='block';
	}
	else
	{
    div.style.display='none';
	}
}


menudivs=new Array();
menudivs[0]="subm0";

function ShowVMenu(div)
{
  div.style.visibility="block";
}


function HideVMenu(div)
{
  div.style.visibility="hidden";
}

	//window.onresize=MenuPos;


function zxcLeft(zxc)
{
  zxcObjLeft=zxc.offsetLeft;
  while(zxc.offsetParent!=null)
  {
    zxcObjParent=zxc.offsetParent;
    zxcObjLeft+=zxcObjParent.offsetLeft;
    zxc=zxcObjParent;
 }
 return zxcObjLeft;
}

function zxcTop(zxc)
{
  var zxcObjTop = 0;
  do
  {
    zxcObjTop += zxc.offsetTop
  }
  while ((zxc = zxc.offsetParent) != null);
  return zxcObjTop;
}


function ShowMenu(div, el)
{
	div.style.display = "";
  
	if(el)
	{
		y = zxcTop(el);
		div.style.left = zxcLeft(el) - 1 + 'px';
		div.style.width = el.offsetWidth + 'px';
		div.style.top = "25px";
	}

	div.mastHide = false;
}

function HideMenu(div)
{
  div.mastHide = true;
  setTimeout("DoHide(document.getElementById('"+div.id+"'))", 80);
}

function LightMenu(div, light)
{
  var node = div.getElementsByTagName("a")['0'];
  if (light == 0)
  {
    div.style.background = '';  
    div.style.color = '';
    if (node  != null) {
        node.style.color = '#525d7a';
    }
  }
  else
  {
    if (node  != null) {
    	node.style.color = '#FFFFFF';
    }
    div.style.background = '#525d7a';
    div.style.color = '#FFFFFF';
  }
}

function DoHide(div)
{
  if((div) && (div.mastHide))
  {
    div.mastHide = false;
    div.style.display = "none";
  }
}
