<!--

var currentlyActiveInputRef = false;
var currentlyActiveInputClassName = false;

function jscss(a,o,c1,c2)
{
  switch (a){
  
    case 'swap':
      o.className=!jscss('check',o,c1)?o.className.replace(c2,c1): o.className.replace(c1,c2);
    break;
    
    case 'add':
      if(!jscss('check',o,c1)){o.className+=o.className?' '+c1:c1;}
    break;
    
    case 'remove':
      var rep=o.className.match(' '+c1)?' '+c1:c1;
      o.className=o.className.replace(rep,'');
    break;
    
    case 'check':
      return new RegExp('\\b'+c1+'\\b').test(o.className)
    break;
    
  }//switch
}  

function highlightActiveInput()
{
	if(currentlyActiveInputRef){
		currentlyActiveInputRef.className = currentlyActiveInputClassName;
	}
	currentlyActiveInputClassName = this.className;
	
	jscss('add',this,'inputHighlighted','');
	currentlyActiveInputRef = this;
	
	
}

function blurActiveInput()
{
	//this.className = currentlyActiveInputClassName;
	jscss('remove',this,'inputHighlighted','');
}

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].className && inputs[no].className=='doNotHighlightThisInput')continue;
			
			if(inputs[no].tagName.toLowerCase()=='textarea' || (inputs[no].tagName.toLowerCase()=='input' 
			&& ( (inputs[no].type.toLowerCase()=='text')|| (inputs[no].type.toLowerCase()=='password') )
			)){
				jscss('add',inputs[no],'inputText','');
				inputs[no].onfocus = highlightActiveInput;
				inputs[no].onblur = blurActiveInput;
			}
		}
	}
}

-->