// JavaScript Document
var currentOpen;
var timeout;

function ProcessClick(id)
{
	switch(id)
	{
		case(1): {window.location = "./DEFAULT.ASP"; break;}
		case(2): {window.location = "./COMINGSOON.php"; break;}
		case(3): {window.location = "./COMINGSOON.php"; break;}
		case(4): {window.location = "./COMINGSOON.php"; break;}
		case(5): {window.location = "./COMINGSOON.php"; break;}
		case(6): {window.location = "./COMINGSOON.php"; break;}
		case(7): {window.location = "./COMINGSOON.php"; break;}
		case(8): {window.location = "./coltandfillyprogram.php"; break;}
		case(9): {window.location = "./younghorseprogram.php"; break;}
	
	}
}

function HighlightOption(obj)
{
	obj.style.background = "#838372";
	obj.style.color = "#FFFFFF";
}

function NormalizeOption(obj)
{
	obj.style.background = "#DEDFC0";
	obj.style.color = "#518460";
}

function Normalize(id)
{
	timeout = window.setTimeout("Close()","200");
}

function Close()
{
	window.clearTimeout(timeout);
	var menuHeader = document.getElementById("button"+currentOpen);
	menuHeader.className = "menuitem";
	menuHeader.children[0].style.color = "#FFFFFF";
	var menu = document.getElementById("menu"+currentOpen);
	if (menu != null)
	{
		menu.style.display = "none";
	}
}

function Highlight(id)
{
	if (currentOpen != null)
	{
		Close();
	}
	
	currentOpen = id;

	var menuHeader = document.getElementById("button"+id);
	var menuTD = document.getElementById("menutd");
	var menu = document.getElementById("menu"+id);
	menuHeader.className = "menuItemOver";
	menuHeader.children[0].style.color = "#333333";
	if (menu != null)
	{
		//menuHeader.style.borderBottomColor = "#DEDFC0";
		menu.style.top = GetPosOffset(menuHeader, "top") + 32;
		menu.style.left = GetPosOffset(menuHeader, "left");
		menu.style.display = "";
	}
}

function GetPosOffset(what, offsettype)
{
	var totaloffset = (offsettype == "left") ? what.offsetLeft : what.offsetTop;
	var parentEl = what.offsetParent;
	while (parentEl != null)
	{
		totaloffset = (offsettype == "left") ? totaloffset + parentEl.offsetLeft : totaloffset + parentEl.offsetTop;
		parentEl = parentEl.offsetParent;
	}
	return(totaloffset);
}
