function stringTrim(strToTrim) {

	return(strToTrim.replace(/^\s+|\s+$/g, ''));

}

function clearName(id,standard,init){
	var obj=document.getElementById(id);
	var inhalt=stringTrim(obj.value);
	if(inhalt==standard) {
		if(init) {lightColor(obj);}
		else {obj.value=""; darkColor(obj);}
	}
	else if(inhalt==""){resetField(obj,standard);}
	else{darkColor(obj);}
}

function lightColor(objl){
	objl.style.color="#484848";
}
function darkColor(objd){
	objd.style.color="#484848";
}
function resetField(robj,std){
	robj.value=std; lightColor(robj);
}
