function changeInputs() {
	var inputField = document.getElementsByTagName('input');
	for (var i=0; i <  inputField.length ;i++ ){
		if ( inputField[i].getAttribute('type') ) {
			if ( inputField[i].getAttribute('type') == "text" ) {
				if( inputField[i].className ) {inputField[i].className = inputField[i].className ; } else { inputField[i].className = ' text '; }
			} else if ( inputField[i].getAttribute('type') == "checkbox" ) {
				if( !inputField[i].className )  inputField[i].className = ' checkbox '; 
			} else if ( inputField[i].getAttribute('type') == "radio" ) {
				if( !inputField[i].className )  inputField[i].className = ' radio '; 
			} else if ( inputField[i].getAttribute('type') == "file" ) {
				if( !inputField[i].className )  inputField[i].className = ' file '; 
			} else if ( inputField[i].getAttribute('type') == "image" ) {
				if( !inputField[i].className )  inputField[i].className = ' image '; 
			} else if ( inputField[i].getAttribute('type') == "password" ) {
				if( !inputField[i].className )  inputField[i].className = ' password '; 
			} else {
				if( inputField[i].className ) {inputField[i].className = inputField[i].className +  ' button ' ; } else { inputField[i].className = ' button '; }
			}
		}
   }
}
window.onload = function() { changeInputs(); }

