function initInput(){
	var _input = document.getElementsByTagName("input");
	for (var i = 0; i < _input.length; i++){
		if (_input[i].className.indexOf("button") != -1) {
			_input[i].onmouseover = function(){
				this.src = this.src.replace('.gif','') + "-hover.gif"; 
			}
			_input[i].onmouseout = function(){
				this.src = this.src.replace('-hover.gif','') + ".gif"; 
			}
		}
		if (_input[i].className.indexOf("text") != -1) {
			_input[i].onfocus = function(){
				this.parentNode.className +=" active-inp"
			}
			_input[i].onblur = function(){
				this.parentNode.className = this.parentNode.className.replace(' active-inp',''); 
			}
		}
	}
}
if (window.addEventListener){
	window.addEventListener("load", initInput, false);
}
else if (window.attachEvent){
	window.attachEvent("onload", initInput);
}