
var dolphintabs={
	subcontainers:[], last_accessed_tab:null,

	revealsubmenu:function(curtabref){
	this.hideallsubs()
	if (this.last_accessed_tab!=null)
		this.last_accessed_tab.className=""
	if (curtabref.getAttribute("rel")) //If there's a sub menu defined for this tab item, show it
	document.getElementById(curtabref.getAttribute("rel")).style.display="block"
	curtabref.className="current"
	this.last_accessed_tab=curtabref
	},

	hideallsubs:function(){
	for (var i=0; i<this.subcontainers.length; i++)
		document.getElementById(this.subcontainers[i]).style.display="none"
	},


	init:function(menuId, selectedIndex){
	var tabItems=document.getElementById(menuId).getElementsByTagName("a")
		for (var i=0; i<tabItems.length; i++){
			if (tabItems[i].getAttribute("rel"))
				this.subcontainers[this.subcontainers.length]=tabItems[i].getAttribute("rel") //store id of submenu div of tab menu item
			if (i==selectedIndex){ //if this tab item should be selected by default
				tabItems[i].className="current"
				this.revealsubmenu(tabItems[i])
			}
		tabItems[i].onmouseover=function(){
		dolphintabs.revealsubmenu(this)
		}
		} //END FOR LOOP
	}

}


function hidediv(idName) 
{
    if (document.getElementById)
    { // DOM3 = IE5, NS6
        document.getElementById(idName).style.visibility = 'hidden';
    }
    else 
    {
        if (document.layers) 
        { // Netscape 4
            document.idName.visibility = 'hidden';
        }
        else 
        { // IE 4
            document.all.idName.style.visibility = 'hidden';
        }
    }
}

function showdiv(idName) 
{
    if (document.getElementById) 
    { // DOM3 = IE5, NS6
        document.getElementById(idName).style.visibility = 'visible';
    }
    else 
    {
        if (document.layers) 
        { // Netscape 4
            document.idName.visibility = 'visible';
        }
        else 
        { // IE 4
            document.all.idName.style.visibility = 'visible';
        }
    }
}

function popUp(URL) 
{
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=600,left = 420,top = 200');");
}
