<!--
var theFade;


/////////// BROWSER DETECTION ///////////
var theBrowser;
detectBrowser();
function detectBrowser()
{
	//NN4 ONLY
	if (document.layers) {
		theBrowser = "nn4";
	}
	//NN6 or IE6
	else if (document.getElementById) {
		if(navigator.appName == 'Microsoft Internet Explorer')
		{
			theBrowser = "ie4";
		}
		if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 5))
		{
			theBrowser = "nn6";
		} 
	}
		//IE4 OR HIGHER
	else if (document.all) {
		theBrowser = "ie4";
	}
	//alert("This browser is: " + navigator.appName + ", version: " + navigator.appVersion);
}


/////////// TIMEOUT/VISIBILITY FUNCTION ///////////
var checkDivStatus;
var theTimeOut;

function placeDivs(categoryName, categoryHeight)
{
	clearTimeout(theTimeOut);
	if(categoryHeight == undefined)
	{
		categoryHeight = 0;
	}
	//THIS IS THE ONLY EDITABLE PART OF THE JAVASCRIPT; JUST ADD THE CATEGORY NAME HERE
	theMenues = new Array("store", "community");
	
	for(i=0; i < theMenues.length; i++)
	{
		if(theMenues[i] != categoryName)
		{
			categoryNameHide = theMenues[i];
			checktheDivState();
		}
	}
	
	if(theBrowser == "nn4")
	{
		theHeight = eval(categoryHeight);
		eval("document." + categoryName + "Children.style.visibility = 'visible'");
		//eval("document." + categoryName + "Children.style.left = 0");
		//eval("document." + categoryName + "Children.style.top = 28");
	}
	else if(theBrowser == "ie4")
	{
		theHeight = eval(categoryHeight);
		eval("document.all." + categoryName + "Children.style.visibility = 'visible'");
		//eval("document.all." + categoryName + "Children.style.posLeft = 0");
		//eval("document.all." + categoryName + "Children.style.posTop = 28");
	}
	else if(theBrowser == "nn6")
	{
		theHeight = eval(categoryHeight) + "px";
		//eval("document.getElementById('" + categoryName + "Children" + "').style.top = '" + theHeight + "'");
		//eval("document.getElementById('" + categoryName + "Children" + "').style.left = '0px'");
		//document.getElementById(categoryName + "Children").style.opacity = .98;
		eval("document.getElementById('" + categoryName + "Children" + "').style.visibility = 'visible'");
	}
	
}

/////////// HIDE DIVS FUNCTION ///////////
var timeOutLength = 300;
var categoryNameHide;
var categoryNameHide;
function hideDivs(categoryName)
{
	checkDivStatus = "hide";
	categoryNameHide = categoryName;
	theTimeOut = setTimeout(checktheDivState, timeOutLength);
	//document.getElementById('freshWaterPearlsChildren').style.visibility = 'hidden';
	//document.getElementById('freshWaterPearlsChildren').style.top = '0px';
	//document.getElementById('freshWaterPearlsChildren').style.left = '0px';
}

function fadeMenu(theName)
{
	if(document.getElementById(theName).style.opacity > 0)
	{
		document.getElementById(theName).style.opacity -= .1;
	}
	else
	{
		clearInterval(theFade);
		eval("document.getElementById('" + theName + "').style.visibility = 'hidden'");
	}
}

/////////// CHECK DIV STATUS ///////////
function checktheDivState()
{
	if(checkDivStatus == "hide")
	{
		if(theBrowser == "nn4")
		{
			eval("document." + categoryNameHide + "Children.style.visibility = 'hidden'");
		}
		else if(theBrowser == "ie4")
		{
			eval("document.all." + categoryNameHide + "Children.style.visibility = 'hidden'");
			
			
		}
		else if(theBrowser == "nn6")
		{
			eval("document.getElementById('" + categoryNameHide + "Children" + "').style.visibility = 'hidden'");
		}
	}
}