
function SymError()
{
  return true;
}

window.onerror = SymError;


function oPageX(o) {
  var x = o.offsetLeft;
  while (o=o.offsetParent) {
    if (o==document.body) break;
    x += o.offsetLeft;
  }
  return x;
}

function oPageY(o) {
  var y = o.offsetTop;
  while (o=o.offsetParent) {
    if (o==document.body) break;
    y += o.offsetTop;
  }
  return y;
}


function hideAllMenu() {
  for (var i=0; i<4; i++)
    menus[i].style.visibility='hidden';
}

function topMenu(a,i) {
  keepMenu();
  var s = menus[i].style;
  s.left = oPageX(a)+'px';
  s.top = (oPageY(a)+a.offsetHeight)+'px';
  hideAllMenu();
  s.visibility='visible';
}

tOut = null;

function keepMenu() {
  if (tOut) clearTimeout(tOut);
  tOut = null;
}

function hideMenu() {
  tOut = setTimeout('hideAllMenu()',700);
}

function initMenu() {
  menus = new Array();
  for (var i=0; i<4; i++)
    menus[i]=document.getElementById('menu'+i);
}

