var active=new Array();
var closeTime = new Array();
closeTime['Ilmoitustaulu'] = 0;
closeTime['Linkit'] = 0;
active['Ilmoitustaulu'] = false;
active['Linkit'] = false;

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function menuDelay(l,t,v) {
  closeTime[l]= new Date();
  timer = setTimeout("MM_showHideLayers('"+l+"','','"+v+"')", 700);
}

function menuActive(l) {
  active[l] = true;
}

function menuDisabled(l) {
  active[l] = false;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  if (!active[args[0]] && (new Date() - closeTime[args[0]]) > 500) {
    for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
      if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
      obj.visibility=v; }
  }
}