 var bg;
 var co;
 var last="ho";

 if(last=="") last = "ho";

 var bg_sub;
 var co_sub;
 var last_sub;

 function over(button)
  {
   i = document.getElementById(button);
   bg = i.className;

   i.className="topmenu_hover";
  }

 function out(button)
  {
   i = document.getElementById(button);

   if (button==last)
    {
     i.className=bg;
     return;
    }

   i.className="topmenu_normal";
  }

 function selectedmenu(button)
  {
   i = document.getElementById(last);
   i.className="topmenu_normal";

   i = document.getElementById(button);
   i.className="topmenu_active";
   last=button;
  }

 function over_sub(button)
  {
   i = document.getElementById(button);
   co_sub = i.className;

   i.className="submenu_hover";
  }

 function out_sub(button)
  {
   i = document.getElementById(button);

   if (button==last_sub)
    {
     i.className=co_sub;
     return;
    }

   i.className="submenu_normal";
  }

 function pageselect(file)
  {
   window.location.href=file;
  }

 function subpageselect(file)
  {
   window.location.href=file;
  }