/* ******************************************** */ 
/*                                              */ 
/* ### BLUR LINKS FÜR GRAFIK- UND TEXTLINKS ### */
/*                                              */ 
/* ******************************************** */ 

function BlurLinks(){

// Text- u. Grafik-Links
lnks=document.getElementsByTagName('a');
for(i=0;i<lnks.length;i++){
lnks[i].onfocus=new Function("this.blur()");
}
}

onload=BlurLinks;

var currentlyActiveInputRef = false;
var currentlyActiveInputClassName = false;

function highlightActiveInput()
{
	if(currentlyActiveInputRef){
		currentlyActiveInputRef.className = currentlyActiveInputClassName;
	}
	currentlyActiveInputClassName = this.className;
	this.className = 'inputHighlighted';
	currentlyActiveInputRef = this;
	
	
}

function blurActiveInput()
{
	this.className = currentlyActiveInputClassName;
	
	
}


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=='donothilightthis')continue;
			if(inputs[no].tagName.toLowerCase()=='textarea' || (inputs[no].tagName.toLowerCase()=='input' && inputs[no].type.toLowerCase()=='text')){
				inputs[no].onfocus = highlightActiveInput;
				if(inputs[no].className && inputs[no].className!='mandatoryField'){
					inputs[no].onblur = blurActiveInput;
				}
			}
		}
	}
}


/* ************************************** */ 
/*                                        */ 
/* ### ACHTUNG.GIF WIEDER AUSBLENDEN  ### */
/*                                        */ 
/* ************************************** */ 


function resetForm(){
	var mandatory= new Array("Vorname","Name","Strasse","PLZ","Ort","Mailadresse");
	
	
	for(i in mandatory){
		document.getElementsByName(mandatory[i])[1].className="mandatory";
	}

}