function mainHeader_ButtonOver(td, type)
{
	td.className = "mainHeaderContentTopOtherButtonsTextOverTd";
	switch(type)
	{
		case "header":
			document.getElementById("mainHeader_HomepageText").src = "/images/stumpy/setAsHomepageOver.gif";
			break;
		case "favorites":
			document.getElementById("mainHeader_FavoritesText").src = "/images/stumpy/addToFavoritesOver.gif";
			break;
		case "search":
			document.getElementById("mainHeader_SearchText").src = "/images/stumpy/findAGameOver.gif";
			document.getElementById("q").className = "textboxOver";
			break;

	}


}
function mainHeader_ButtonOut(td, type)
{
	td.className = "mainHeaderContentTopOtherButtonsTextTd";
	switch(type)
	{
		case "header":
			document.getElementById("mainHeader_HomepageText").src = "/images/stumpy/setAsHomepageNormal.gif";
			break;
		case "favorites":
			document.getElementById("mainHeader_FavoritesText").src = "/images/stumpy/addToFavoritesNormal.gif";
			break;
		case "search":
			document.getElementById("mainHeader_SearchText").src = "/images/stumpy/findAGameNormal.gif";
			document.getElementById("q").className = "textbox";
			break;

	}

}
function mainHeader_ButtonDown(td, type)
{
	switch(type)
	{
		case "header":
			if(browserType != "ie")
			{
				alert("Sorry, this button only works in Internet Explorer.  However, if you go to Tools/Options in the browser menu you can set your homepage to Stumpy yourself :)");
			}
			break;
		case "favorites":
			if(browserType == "ie")
			{
				window.external.AddFavorite(document.location.href , document.title);
			} 
			else
			{
				window.sidebar.addPanel(document.title, document.location.href,""); 
			}
			break;
		case "search":
			break;

	}
}
function mainHeader_Search()
{
	var value = document.getElementById("q").value;
	if(value != "")
	{
		document.getElementById("form_search").submit();
	}
}

function mainHeader_SearchKeyPress(e)
{
	var keyCode;
	if (window.event) keyCode = window.event.keyCode;
	else if (e) keyCode = e.which;
	switch(keyCode)
	{
		case 13:
			document.getElementById("q").blur();
		break;
	}
}
function mainHeader_MenuOver(td)
{
	td.className = "mainHeaderContentMenuOverTd";
}
function mainHeader_MenuOut(td)
{
	td.className = "mainHeaderContentMenuTd";
}
function mainHeader_MenuDown(td)
{

}
