// ---------------------------------------------------------------------------------------	
// scripte fuer www.mw-schickart.de
// author michael schulze, www.jms-design.de, 2011
// ---------------------------------------------------------------------------------------	

	
//---------------------------------------------------------------------------------------	
// Ebenenfunktionen
	// Style setzen
	function setStyle(layerName,stil,wert) {
		if (eval('document.getElementById("'+ layerName + '")')) {eval('document.getElementById("'+layerName+'").style.' + stil + '="' + wert + '"');}
	}
	
	//alle Layer einer Gruppe verbergen
	function hideAll(bereich,anzahl) {
		for(count=1; count <= anzahl; count++){
			eval('setStyle("' + bereich + count + '","display","none");');
		}	
	}
	

//---------------------------------------------------------------------------------------	
// String-Funktion
	function trim(s) {
	  	while (s.substring(0,1) == ' ') {
	    	s = s.substring(1,s.length);
	  	}
	  	while (s.substring(s.length-1,s.length) == ' ') {
	   		s = s.substring(0,s.length-1);
	  	}
	  	return s;
	}
	
//---------------------------------------------------------------------------------------	
//Formular-Funktionen
	function clearForm(name){
		if (confirm('Wollen Sie Ihre Angaben wirklich verwerfen?') == true) {
			var ref="document." + name;
			eval(ref + '.reset()');
		}
	}
	
		
	
//---------------------------------------------------------------------------------------	
// Schutzfunktionen
	// E-Mail-Adresse sichern
	function writeMail(dom,pre,klasse){
		document.write("<a ");
		if (klasse!='') document.write("class='" + klasse + "' ");
		document.write("href='mailto:" + pre + "@" + dom + "'>" + pre + "@" + dom + "</a>");
	}
	
	
//---------------------------------------------------------------------------------------	
// Seitenspezifische Funktionen
	
