/************************************************
	MENU SCRIPT, SHOW HIDE DIVS
*************************************************/
var ns4 = (document.layers); 
var ie4 = (document.all &&!document.getElementById); 
var ie5 = (document.all && document.getElementById); 
var ns6 = (!document.all && document.getElementById);

function show(id){ 
	// Netscape 4 
	if(ns4){ 
		document.layers[id].visibility = "show"; 
	} 
	// Explorer 4 
	else if(ie4){
		document.all[id].style.visibility = "visible"; 
	} 
	// W3C - Explorer 5+ and Netscape 6+ 
	else if(ie5 || ns6){ 
		document.getElementById(id).style.visibility = "visible";
	} 
	hideAllExcept(id);
} 

function hideAllExcept(thisId){
	for (var i=0; i <= 8; i++){
		
		var menuId = "m" + i;
		
		if (thisId != menuId){
			hide(menuId);
		}
	}
}

function hide(id){ 
	// Netscape 4 
	if(ns4){ 
		document.layers[id].visibility = "hide"; 
	} 
	// Explorer 4 
	else if(ie4){ 
		document.all[id].style.visibility = "hidden"; 
	} 
	// W3C - Explorer 5+ and Netscape 6+ 
	else if(ie5 || ns6){ 
		document.getElementById(id).style.visibility = "hidden"; 
	} 
}

/************************************************
	FIX IE BORDER
************************************************/
function fixUglyIE() {
	for (a in document.links) document.links[a].onfocus = document.links[a].blur;
	}
if (document.all) {
	document.onmousedown = fixUglyIE;
}

/************************************************
	onClick href
************************************************/
function go(go,win) {
	if (win == "new")
	{
		window.open(go,"metalsites")
	}
	else
	{
		window.location.href=go;
	}
}

/************************************************
	Bookmark page
************************************************/
function BookmarkPage() {
	if (window.external)
		external.AddFavorite(location.href,"METALSITES.net - Metal Band & Artist Archive")
	else
		alert("Please press Ctrl+D to bookmark this page");
}

/**
* Bookmark Us - Mambo Add to Bookmarks Module
* @ version 1.0
* @ package Bookmark_Us
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License - http://www.gnu.org/copyleft/gpl.htm
* @ copyright (C) 2005 by Michael Carico - All rights reserved
* @ website http://www.kabam.net
**/


function displayLink(p_type, p_url, p_title, p_link_text) {

  var agt = navigator.userAgent.toLowerCase();
  var p_here = top.location.href

  if (p_type == 3)
  {
    if ((agt.indexOf("opera") != -1)) // || (agt.indexOf("firefox") != -1))
    {
      document.write("<a href=\""+p_here+"\" title=\"" + p_title + "\" rel=\"sidebar\">" + p_link_text + "</a>");
    } else
    {
      document.write("<a href=\"javascript:addBookmark('"+p_title+"',top.location.href);\" title=\"" + p_title + "\" >" + p_link_text + "</a>");
    }
  } else
  {
    if (agt.indexOf("opera") != -1) 
    {
      document.write("<a href=\"" + p_url + "\" title=\"" + p_title + "\" rel=\"sidebar\">" + p_link_text + "</a>");
    } else
    {
      document.write("<a href=\"javascript:addBookmark('"+p_title+"','"+p_url+"');\" title=\"" + p_title + "\" >" + p_link_text + "</a>");
    }
  }
}


function addBookmark() {

	var msg_netscape	= "NetScape message";
	var msg_opera		= "This function does not work with this version of Opera.  Please bookmark us manually.";
	var msg_other		= "Your browser does not support automatic bookmarks.  Please bookmark us manually.";
	var agt				= navigator.userAgent.toLowerCase();
	var title			= document.title;
	var url				= this.location;

  if (agt.indexOf("opera") != -1) 
  {
    if (window.opera && window.print)
    {
      return true;
    } else 
    {
      alert(msg_other);
    }
  }    
  else if (agt.indexOf("firefox") != -1) window.sidebar.addPanel(title,url,"");
  else if ((agt.indexOf("msie") != -1) && (parseInt(navigator.appVersion) >=4)) window.external.AddFavorite(url,title); 
  else if (agt.indexOf("netscape") != -1) window.sidebar.addPanel(title,url,"")         
  else if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(title,url,""); 
  else alert(msg_other);
  
}
//-->