
<!-- Slot1 PrimeControl [file: /tailored/lakimiesliitto/web/lmr_js.ascx]  starts -->

<!-- Slot Slot1 [Slot1] starts -->

<!-- ASP.tailored_lakimiesliitto_web_lmr_js_ascx [C1_0] starts -->


HideTimeoutID=0;
OpenedMenu=0;

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 MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  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; }
}

function PreloadImages() {
  MenuImages=new Array(10);
  for(var i=0;i<5;i++) for(var l=0;l<2;l++) {
    MenuImages[i*2+l]=new Image();
    MenuImages[i*2+l].src="/instancedata/prime_product_yhdistys/lakimiesliitto/pics/b"+(i+1 )+(l==0 ? "" : "a")+".gif";
  }
  ImagesLoaded=true;
}

PreloadImages();

function ShowMenu(sel) {
  if(OpenedMenu==sel) sel=0;
  OpenedMenu=sel;

  if(!ImagesLoaded) return;

  for(var n=1;n<=5;n++) {
    var p=n*2-2+(sel==n ? 1 : 0);
    document.images["m"+n].src=MenuImages[p].src;
    MM_showHideLayers("Menu"+n, '', sel==n ? "show" : "hide"); 
  }
  if(sel>0) SetHideTimer();
}

function SetHideTimer() {
  window.clearTimeout(HideTimeoutID);
  HideTimeoutID=window.setTimeout('ShowMenu(0);', 3000);
}

function MenuClick(Sender) {
  for(p in Sender.childNodes) {
    var n=Sender.childNodes[p];
    if(!n.nodeName) continue;
    if(n.nodeName.toString().toLowerCase()!="a") continue;
    location.href=n.getAttribute("href");
  }
}

function MenuHover(Sender, State) {
  Sender.className=State ? "hover" : "";
  for(p in Sender.childNodes) {
    var n=Sender.childNodes[p];
    if(!n.nodeName) continue;
    if(n.nodeName.toString().toLowerCase()!="a") continue;
    n.className=State ? "hover" : "";
  }
}

<!-- ASP.tailored_lakimiesliitto_web_lmr_js_ascx ends -->

<!-- Slot Slot1 ends -->

<!-- Slot1 ends -->

