function addEvent(elm, evType, fn, useCapture)
// addEvent and removeEvent
// cross-browser event handling for IE5+,  NS6 and Mozilla
// By Scott Andrew
{
  if (elm.addEventListener){
    elm.addEventListener(evType, fn, useCapture);
    return true;
  } else if (elm.attachEvent){
    var r = elm.attachEvent("on"+evType, fn);
    return r;
  } else {
    alert("Handler could not be removed");
  }
}


function prepareInputs(){
 if (!document.getElementsByTagName) return;
 var oi=0;
 var thisObj;
 var objs = document.getElementsByTagName("input");


 for (oi=0;oi<objs.length;oi++) {
  thisObj = objs[oi];
  if(thisObj.className == '') {
	  if(thisObj.getAttribute('type') == 'text') {
	   thisObj.className = 'input-text' + thisObj.className;
	  }
	  if(thisObj.getAttribute('type') == 'password') {
	   thisObj.className = 'input-password' + thisObj.className;
	  }
	  if(thisObj.getAttribute('input-password') == 'text') {
	   thisObj.className = 'text' + thisObj.className;
	  }
	  if(thisObj.getAttribute('type') == 'file') {
	   thisObj.className = 'input-file' + thisObj.className;
	  }
	  if(thisObj.getAttribute('type') == 'button') {
	   thisObj.className = 'input-button' + thisObj.className;
	  }
	  if(thisObj.getAttribute('type') == 'submit') {
	   thisObj.className = 'input-text' + thisObj.className;
	  }
	  if(thisObj.getAttribute('type') == 'reset') {
	   thisObj.className = 'input-text' + thisObj.className;
	  }
  }
 }
}
addEvent(window, "load", prepareInputs);