var currentlyActiveInputRef = false;
var currentlyActiveInputClassName = false;

function highlightActiveInput()
{
	if(currentlyActiveInputRef){currentlyActiveInputRef.className = currentlyActiveInputClassName;}
	currentlyActiveInputClassName = this.className;
	if (this.className == "rue")
		{this.className = 'rueinputHighlighted';}
	else if (this.className == "inscriptobli")
		{this.className = 'inscriptobliinputHighlighted';}
	else if (this.type.toLowerCase == "radio")
		{this.className = 'radioinputHighlighted';}
	else
		{this.className = 'inputHighlighted';}
	currentlyActiveInputRef = this;
	//this.select();
}

function blurActiveInput()
{
	this.className = currentlyActiveInputClassName;
}

function initInputHighlightScript()
{
	var tags = ['INPUT','TEXTAREA','SELECT','OPTION'];
	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()=='select' || (inputs[no].tagName.toLowerCase()=='input' && inputs[no].type.toLowerCase()=='text') || (inputs[no].tagName.toLowerCase()=='input' && inputs[no].type.toLowerCase()=='password')){
				inputs[no].onfocus = highlightActiveInput;
				inputs[no].onblur = blurActiveInput;
			}
		}
	}
}