// sub navigation links
// Thank you to Spoono.com (c) 2000-2006

// for Submenu links
//<![CDATA[
		   
//Main Nav

function Browser() {

  var ua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isNS    = false;  // Netscape
  this.version = null;

  ua = navigator.userAgent;

  s = "MSIE";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as NS 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }
}

var browser = new Browser();

function removeClassName(el, name) {

  var i, curList, newList;

  if (el.className == null)
    return;

  // Remove the given class name from the element's className property.

  newList = new Array();
  curList = el.className.split(" ");
  for (i = 0; i < curList.length; i++)
    if (curList[i] != name)
      newList.push(curList[i]);
  el.className = newList.join(" ");
}

var submenu=new Array()

//Help sub-nav
submenu[0]='<a href="http://www.irctoo.net/kb">Knowledge Base</a> | <a href="http://www.irctoo.net/features.php">Features</a> | <a href="http://www.irctoo.net/services">Services</a> | <a href="https://bugzilla.irctoo.net/">BugZilla</a>'
//Information sub-nav
submenu[1]='<a href="http://www.irctoo.net/votes">Votes</a> | <a href="http://www.irctoo.net/network_stats">Network Statistics</a> | <a href="http://www.irctoo.net/channels">Channels</a> | <a href="http://www.irctoo.net/aup.php">AUP</a> | <a href="http://www.irctoo.net/forums/forum.php?id=1">News Archive</a> | <a href="http://www.irctoo.net/servers.php">Staff/Server Lists</a>' //My IRCtoo sub-nav
submenu[2]='<a href="http://www.irctoo.net/myirctoo.php">My IRCtoo Home</a> | <a href="http://www.irctoo.net/downloads.php">Downloads</a> | <a href="http://www.irctoo.net/ns_options.php">IRC Options</a> | <a href="http://www.irctoo.net/ws_options.php">Website Options</a> | <a href="http://www.irctoo.net/mailinglist.php">Mailing List</a> | <a href="http://www.irctoo.net/gallery/">Gallery</a> | <a href="http://www.irctoo.net/blogs">Blogs</a> '
submenu[3]='<a href=\"#\">Forums Coming Soon</a>'
submenu[4]='<a href="http://www.irctoo.net/logout.php">Logout</a>'
submenu[5]='<a href="http://www.irctoo.net">Login</a>'


var menuobj=document.getElementById? document.getElementById("base_subs") : document.all


var activeButton = null;

function buttonClick(event, which) {

  var button;

  // Get the target button element.

  if (browser.isIE)
    button = window.event.srcElement;
  else
    button = event.currentTarget;
	
// Blur focus from the link to remove that annoying outline.

  button.blur();

// Reset the currently active button, if any.

  if (activeButton != null)
    resetButton(activeButton);

 // Activate this button, unless it was the currently active one

  if (button != activeButton) {
    depressButton(button);
    activeButton = button;
	thecontent=(which==-1)? "" : submenu[which]
  }
  
  else {
    activeButton = null;
	thecontent = ""
  }
	
  menuobj.innerHTML=thecontent

  return false;
}

function depressButton(button) {
button.className += "active";
}

function resetButton(button) {
  removeClassName(button, "active");
}

function resetSub(button) {
  menuobj.innerHTML=""
}
//]]>
