function initHover()
{
	var _button = document.getElementsByTagName("input");
	for(var j = 0; j < _button.length; j++)
	{
		if(_button[j].parentNode.className.indexOf("button") != -1)
		{
			_button[j].onmouseover = function()
			{
				if (this.className.indexOf("hover") == -1)
				{
					this.className += " hover";
				}
			}
			_button[j].onmouseout = function()
			{
				this.className = this.className.replace(" hover", "");
				this.className = this.className.replace(" active", "");
			}
			_button[j].onmousedown = function()
			{
				if (this.className.indexOf("active") == -1)
				{
					this.className += " active";
				}
			}
			_button[j].onmouseup = function()
			{
				this.className = this.className.replace(" active", "");
			}
		}
	}
}


if (window.attachEvent && !window.opera)
	window.attachEvent("onload", initHover);
