
// Menu functions
    var mTimer=null;
   
    // Hide all menus
    function mHide()
    {      

        for(i=0;i<ms.length;i++)
        {
            if($(ms[i])!=null)
                $(ms[i]).style.display='none';
            if($('img'+ms[i].substring(2))!=null)    
                $('img'+ms[i].substring(2)).src="/Images/clearpixel.gif";

        }
    }
    
    // Cancel the menu hide timer
    function mClear()
    {
        if (mTimer) 
            clearTimeout(mTimer);
        mTimer=null;
        
    }
    // Start the menu hide timer
    function mStart()
    {
        mTimer = setTimeout("mHide()",15);        
    }
    function mShow(id)
    {
        mHide();
        document.getElementById(id).style.display='block';
        document.getElementById(id).style.zIndex=11;
        if($('img'+id.substring(2))!=null)  
            $("img"+id.substring(2)).src="/images/nav/"+id.substring(2)+"over.gif";
    }
    
    //Get all the elements of the given classname of the given tag.
function getElementsByClassName(classname,tag) {
 if(!tag) tag = "*";
 var anchs =  document.getElementsByTagName(tag);
 var total_anchs = anchs.length;
 var regexp = new RegExp('\\b' + classname + '\\b');
 var class_items = new Array()
 
 for(var i=0;i<total_anchs;i++) { //Go thru all the links seaching for the class name
  var this_item = anchs[i];
  if(regexp.test(this_item.className)) {
   class_items.push(this_item);
  }
 }
 return class_items;
}

