var g_nBrowserType = 0;
var g_strIgnoreMouseOut = "";
var g_strLastButton = "";

function GetBrowserType()
{
var nBrowserType = 0;

if
 (navigator.userAgent.indexOf("Mozilla/3.0") != -1)
  nBrowserType=3;
else if
 (navigator.userAgent.indexOf("Mozilla/4.0") != -1)
  nBrowserType=4;
else if
 (navigator.userAgent.indexOf("Mozilla/4.5") != -1)
  nBrowserType=4;
else if
 (navigator.userAgent.indexOf("Mozilla/4.6") != -1)
  nBrowserType=4;
else if
 (navigator.userAgent.indexOf("Mozilla/4.7") != -1)
  nBrowserType=4;
else if
 (navigator.userAgent.indexOf("Mozilla/5.0") != -1)
  nBrowserType=6;
else if
 (navigator.userAgent.indexOf("MSIE") != -1)
  nBrowserType=1;
else if
 (navigator.userAgent.indexOf("Mozilla/2.0") != -1)
  nBrowserType=2;
else
  nBrowserType=0;

return (nBrowserType);
}

g_nBrowserType = GetBrowserType();

function HoverButtonOn(strButtonName)

{
	if (g_strIgnoreMouseOut == strButtonName) return;
	if (g_nBrowserType >= 3)
	{
		imgOn = eval (strButtonName + "y.src");
		if(document.images[strButtonName].src != imgOn)
		{
		  document.images[strButtonName].src = imgOn;
		}
	}
}

function HoverButtonOff(strButtonName)

{
	if (g_strIgnoreMouseOut == strButtonName) return;
	if (g_nBrowserType >= 3)

	{
		imgOff = eval(strButtonName + ".src");
		if(document.images[strButtonName].src != imgOff)
		{
		  document.images[strButtonName].src = imgOff;
		}
	}
}

function ButtonDown(strButtonName)

{
	if (g_nBrowserType >= 3)
	{
		if (g_strLastButton != "")
		{
		  imgOff = eval(g_strLastButton + ".src");
		  if(document.images[g_strLastButton].src != imgOff)
		  {
		   document.images[g_strLastButton].src =imgOff;
		  }
		}
		imgOn = eval(strButtonName + "x.src");
		if(document.images[strButtonName].src != imgOn)
		{
		  document.images[strButtonName].src = imgOn;
		}
		g_strIgnoreMouseOut = strButtonName;
		g_strLastButton = strButtonName;
	}
}

