﻿// code for floating menu based on: //http://www.w3schools.com/dhtml/dhtml_examples.asp 


   var timer;
   function scrolltop()
   {
    document.getElementById('scrollmenu').style.top=document.body.scrollTop;
    document.getElementById('scrollmenu2').style.top=document.body.scrollTop;
    timer=setTimeout("scrolltop()",1);
    }
     function stoptimer()
    {
    clearTimeout(timer);
   }
//--------------

// code to hide submenus http://www.interspire.com/content/articles/10/1/Building-An-Expanding-DHTML-Menu-With-CSS-and-JavaScript

menu_status = new Array(); 

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}


//------------- 

// code to show/hide submenus http://www.w3schools.com/dhtml/tryit.asp?filename=trydhtml_menu10

function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible";
}

function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden";
}
//-------------
