ie4=document.all;
ns4=document.layers;
ns6=document.getElementById && !document.all;
staticMode="advanced"
movOut = "none";
isWait4Out=false;
isFocused=false;
menuWidth=255; // Must be a multiple of 5!

function moveOut()
{
  if (isWait4Out) isWait4Out=false;
  moveOut1();  
}

function moveOut1() 
{
  if (window.cancel) 
    { cancel="";};
 
  if (window.movIn) 
    {
      clearTimeout(movIn);
      movIn="";
    };


  if (((ie4||ns6) && pnlStyle.pixelLeft<0)||(ns4 && pnlStyle.left<0))
    { 
      if (ie4||ns6) {pnlStyle.pixelLeft += (5%menuWidth); };
      if (ns6) {pnlStyle.left = pnlStyle.pixelLeft;};
      if (ns4) { pnlStyle.left += (5%menuWidth);};
      movOut = setTimeout('moveOut1()', 10)
    }
  else 
    {
      if (movOut != "none") clearTimeout(movOut);   
      movOut = "none";
      if (isWait4Out) moveIn = setTimeout('moveBack1()', 900);
      isWait4Out = false;  
    };
};

function moveBack() 
{
  window.cancel = moveDelay();
};

function moveDelay()
{
  if (movOut != "none") 
     { isWait4Out = true; return; }
  else
    movIn = setTimeout('moveBack1()', 900);
};


function moveBack1() 
{
  if (isFocused) 
    {
      movIn = setTimeout('moveBack1()', 1000);
      return;
    };

  if (window.movOut) 
    { if (movOut != "none") clearTimeout(movOut);};

  if (((ie4||ns6) && pnlStyle.pixelLeft>(-menuWidth))||(ns4 && pnlStyle.left>(-menuWidth)))
    { 
      if (ie4||ns6) {pnlStyle.pixelLeft -= (5%menuWidth);};
      if (ns6) {pnlStyle.left = pnlStyle.pixelLeft;};
      if (ns4) { pnlStyle.left -= (5%menuWidth);};
      movIn = setTimeout('moveBack1()', 5);
    }
  else 
    clearTimeout(movIn);
};

function myFocus(param)
{
  isFocused = param;
};

function Focus(param)
{
  isFocused = param;
  status=isFocused;
};

function initMenu() 
{
  if(ns4||ns6||ie4)
  {
    if(ns4) pnlStyle = document.addPnl;
    else if(ns6) pnlStyle = document.getElementById("addPnl").style;
    else if(ie4) pnlStyle = document.all.addPnl.style;

    pnlStyle.pixelLeft = -menuWidth;
    pnlStyle.left = -menuWidth;
    pnlStyle.visibility = "visible";
    if (ie4) pnlStyle.display = "block";
  };
};


