var timerID = null;

var IsNS = (document.layers) ? 1 : 0;

var agt=navigator.userAgent.toLowerCase();

var is_net6  = (agt.indexOf('netscape6')!=-1);

function GoPulldown(destination){
	document.location.href=destination;
}

function ChkPW(redirectURL, leaguenum)
{
	var winName;

	winName = "../forms/check_password.asp?redirectURL=" + redirectURL + "&LeagueNum=" + leaguenum;	
	
	window.open(winName, 'passwordwindow', 'height=310,width=510');

	return false;
}

function Confirm(redirectURL, msgText, b1, b2)
{
	var winName;
	
	winName = "/2000/baseball/includes/confirm.asp?msgText=" + msgText + "&b1=" + b1 + "&b2=" + b2 + "&redirectURL=" + redirectURL;	

	window.open(winName, 'confirmwindow', 'height=200,width=390,left=300,top=300');

	return false;
}

function ConfirmAndSubmit1(msgText, b1, b2)
{
	var winName;
	
	if (is_net6) {
		alert(msgText);
		return true;
	}
	else {	
		winName = "/2000/baseball/includes/confirm1.asp?msgText=" + msgText + "&b1=" + b1 + "&b2=" + b2;	
	
		window.open(winName, 'confirmwindow', 'height=200,width=390,left=300,top=300');
	}
	return false;
}

function ConfirmAndSubmit(msgText, b1, b2)
{
	var winName;
	if (is_net6) {
		alert(msgText);
		return true;
	}
	else {	
		winName = "/2000/baseball/includes/confirm.asp?msgText=" + msgText + "&b1=" + b1 + "&b2=" + b2;	
	
		window.open(winName, 'confirmwindow', 'height=200,width=390,left=300,top=300');
	}

	return false;
}

function showItem(showId)
{
	// Show Item
	if (IsNS) 
		document.layers[showId].visibility= "show";
	else 
		document.getElementById(showId).style.visibility = "visible";
}

function hideItem(hideId)
{
	// Hide Item
	if (IsNS) 
		document.layers[hideId].visibility= "hide";
	else 
		document.getElementById(hideId).style.visibility= "hidden";
}

function hideSubMenu()
{
	content_deactivate("nav", 10);
}

function mHideSubMenu()
{
	content_deactivate("mnav", 8);
}

function turnOnMenu(targetNum, prefix, numChoices) 
{
	clearTimeout(timerID);
	menu_deactivate(prefix, numChoices);
	menu_activate(targetNum, prefix);
	turnOnContent(targetNum, prefix, numChoices);
}	

function menu_activate(targetNum, prefix) 
{
	var rowId;

	rowId = prefix + "class" + targetNum;
	
	if (IsNS) 
		document.layers[rowId].className= "buttonDown";
	else 
		document.getElementById(rowId).className= "buttonDown";
}	

function menu_deactivate(prefix, numChoices) 
{
	var rowId;

	for (var i=1; i<=numChoices; i++) {
		rowId= prefix + "class" + i;
		if (IsNS) 
			document.layers[rowId].className= "buttonUp";
		else 
			document.getElementById(rowId).className= "buttonUp";
	}

}	

function turnOnContent(targetNum, prefix, numChoices) 
{
	content_deactivate(prefix, numChoices);
	content_activate(targetNum, prefix);
	return false;
}	

function content_deactivate(prefix, numChoices) {
var contentId;

	for (var i=1; i<=numChoices; i++) {
		contentId= prefix + "Content" + i;
		if (IsNS) 
			document.layers[contentId].visibility= "hide";
		else 
			document.getElementById(contentId).style.visibility= "hidden";
	}
}

function content_activate(targetNum, prefix) 
{
var contentId;
var cElement;

	contentId = prefix + "Content" + targetNum;
	if (IsNS) 
		document.layers[contentId].visibility= "show";
	else 
		document.getElementById(contentId).style.visibility = "visible";
}

