function show(did) {
	var theDivs = document.getElementsByTagName("div");
	for(i=0;i<theDivs.length;i++) {
		var toHide = theDivs[i];
		var toHideCid = theDivs[i].id;
		if(toHideCid!=null && toHideCid.indexOf("idiv")==-1	&& toHideCid.indexOf("fdiv")==-1 && toHide.style.display=="block") {
			toHide.style.display = "none";
		}
		if(toHideCid!=null && toHideCid.indexOf("insider")==-1 && toHideCid.indexOf("fantasy")==-1) {
			toHideC = document.getElementById(toHideCid+"_control");
			if(toHideC!=null)
			toHideC.style.display = "block";
		}
	}
	var toShow = document.getElementById(did);
	if(toShow!=null) {
		toShow.style.display = "block";
		var toShowC = document.getElementById(did+"_control");
		if(toShowC!=null)
			toShowC.style.display = "none";
	}
}

// 4 TABBED IMAGES
imag = new Array ()
imag[0] = "http://espn-att.starwave.com/i/nhl/playoffs2006/tabs01_05.jpg"
imag[1] = "http://espn-att.starwave.com/i/nhl/playoffs2006/tabs02_05.jpg"
imag[2] = "http://espn-att.starwave.com/i/nhl/playoffs2006/tabs03_05.jpg"
imag[3] = "http://espn-att.starwave.com/i/nhl/playoffs2006/tabs04_05.jpg"
imag[4] = "http://espn-att.starwave.com/i/nhl/playoffs2006/tabsclean_05.jpg"
imag[5] = "http://espn-att.starwave.com/i/nhl/playoffs2006/tab201_04.jpg"
imag[6] = "http://espn-att.starwave.com/i/nhl/playoffs2006/tab202_04.jpg"
imag[7] = "http://espn-att.starwave.com/i/nhl/playoffs2006/tab101_04.jpg"
imag[8] = "http://espn-att.starwave.com/i/nhl/playoffs2006/eastern2_02.jpg"
imag[9] = "http://espn-att.starwave.com/i/nhl/playoffs2006/western2_02.jpg"
// TWO TABBED IMAGES
imag[10] = "http://espn-att.starwave.com/i/nhl/playoffs2006/2tabs_tab1_05.jpg"
imag[11] = "http://espn-att.starwave.com/i/nhl/playoffs2006/2tabs_tab2_05.jpg"
imag[12] = "http://espn-att.starwave.com/i/nhl/playoffs2006/2tabsclean_05.jpg"

function swtch(num, imgname){
	imgname.src = im[num].src
}
im = new Array()
for (var i = 0; i < imag.length; i++){
	im[i] = new Image ()
	im[i].src = imag[i]
}





function navTxt(divId){
	// to get all the tabs get the surrounding div object
	container = document.getElementById('tabContainer');
	// loop through and turn off all "ons
	children = container.childNodes;
    for( var i = 0; i < children.length; i++ ) {
		children[i].className = "tabNavTxt";
	}
	// turn on the single divId that was passed in
	document.getElementById(divId).className = "tabNavTxtOn";
}

var selfnav;
function LTwoNavBar()
{
	selfnav = this;
	this.mouseState = 'off';
	this.interval = null;
	this.mNode = null;
	this.cNode = null;
	this.initializing = false;
	this.init();
}

LTwoNavBar.prototype.init = function() // this will poll the bar until it finds the node
{
	this.mNode = this.getElement('n2I');
	var selects;
	if(this.mNode == null && this.initializing == false)
	{
		this.interval = setInterval('selfnav.init()', 200);
	}
	else
	{
		this.cNode = this.getElement('dcm');
		if(this.cNode != null)
		{
			clearInterval(this.interval);
			this.mNode.onmouseout = function()
			{
				selfnav.mouseState = 'off';
				setTimeout('selfnav.checkMouse()',1000);
			}
			this.mNode.onmouseover = function() 
			{
				selfnav.mouseState = 'on';
				selfnav.mNode.style.color = '#FFF';
				selfnav.cNode.style.display = 'block';
				selects = document.getElementsByTagName('select');
				for(var i=0; i<selects.length; i++)
				{
					if(selects[i].className == 'tablesm')
					{
						selects[i].style.visibility = 'hidden';
					}
				}
			}
			this.cNode.onmouseout = this.mNode.onmouseout;
			this.cNode.onmouseover = this.mNode.onmouseover;
		}
	}
	this.initializing = true;
}

LTwoNavBar.prototype.checkMouse = function()
{
	if(selfnav.mouseState == 'off')
	{
		selfnav.mNode.style.color = '#CCC';
		selfnav.cNode.style.display = 'none';
		selects = document.getElementsByTagName('select');
		for(var i=0; i<selects.length; i++)
		{
			if(selects[i].className == 'tablesm')
			{
				selects[i].style.visibility = 'visible';
			}
		}
	}
}

LTwoNavBar.prototype.getElement = function(el)
{
	if(document.getElementById(el))
	{
		return document.getElementById(el);
	}
	else if(!document.getElementById && document.all[el])
	{
		return document.all[el];
	}
	else
	{
		return null;
	}
}
var lTwoNav = new LTwoNavBar(); 
