
var currentlyActiveInputRef = false;
var currentlyActiveInputClassName = false;

function highlightActiveInput() {
  if(currentlyActiveInputRef) {
    currentlyActiveInputRef.className = currentlyActiveInputClassName;
  }
   currentlyActiveInputClassName = this.className;
   this.className = 'eingabeaktiviert';
   currentlyActiveInputRef = this;

}

function blurActiveInput() {
  this.className = "form";
 
}

function initInputHighlightScript() {

  var tags = ['INPUT','TEXTAREA'];
  for(tagCounter=0;tagCounter<tags.length;tagCounter++){
    var inputs = document.getElementsByTagName(tags[tagCounter]);
    for(var no=0;no<inputs.length;no++){

      if(inputs[no].tagName.toLowerCase()=='textarea' || inputs[no].type.toLowerCase()=='password' || (inputs[no].tagName.toLowerCase()=='input' && inputs[no].type.toLowerCase()=='text')){
        inputs[no].onfocus = highlightActiveInput;
        inputs[no].onblur = blurActiveInput;
      }
      
      
        
    }
  }
}






