
// Button changes color when pointing with mouse over it. This doesn't work in IE<7, 
// so this function is to fix it.
// Adds an onmouseover and onmouseout events, theese event add/remove button_hover class.
// 2006-10-30 Levente Bagi
function makeButtonHoverIeCompatible() {
	if (!document.getElementById) return
	
	var p = document.getElementsByTagName('input');
	for(var i = 0; i < p.length; i++){
		if (p[i].className.indexOf('button') != -1) {
			p[i].onmouseover = function(){
				this.className = this.className.replace('button', 'button button_hover');
			}
			p[i].onmouseout  = function(){
				this.className = this.className.replace('button button_hover', 'button');
			}
		}
	}
}
window.onload = makeButtonHoverIeCompatible;

