// Menüpunkte ein- bzw. ausblenden
function toggleMenu(item, subMenu) {
	domStyleMSub = document.getElementById(subMenu).style;
	menuItem = document.getElementById(item).firstChild;
	if (domStyleMSub.display == 'block') {
		menuItem.nodeValue = "+" + menuItem.nodeValue.slice(1);
		domStyleMSub.display = 'none';	
	} else {
		menuItem.nodeValue = "-" + menuItem.nodeValue.slice(1);
		domStyleMSub.display = 'block';	
	}	
}

// Anzeige des ausgewählten Inhaltes im iframe
function displayframe(a) {
	if (a == 'home') {
		document.getElementById("mainarea").src="home.htm";
	}
	if (a == 'verein') {
		document.getElementById("mainarea").src="verein.htm";
	}
	if (a == 'beratungsstelle') {
		document.getElementById("mainarea").src="beratungsstelle.htm";
	}
	if (a == 'kontakt') {
		document.getElementById("mainarea").src="kontakt.htm";
	}	
	if (a == 'sponsoren') {
		document.getElementById("mainarea").src="sponsoren.htm";
	}		
	if (a == 'Haftung') {
		document.getElementById("mainarea").src="http://www.disclaimer.de/disclaimer.htm?farbe=DAE9F1/000000/000000/000000";
	}
}

function FormularCheck() {
	if (document.Feedback.Name.value == "") {  // prüft, ob etwas eingegeben wurde
		alert("Sie haben keinen Namen eingegeben!");
		document.Feedback.Name.focus();
		return false; // gibt false zurück -> Formular wird nicht versendet
	}
	if (document.Feedback.EMail.value == "") {
		alert("Sie haben keine E-Mail-Adresse eingegeben!");
		document.Feedback.EMail.focus();
		return false;
	}
	if (document.Feedback.EMail.value.indexOf('@') == -1) {
		alert("Die von Ihnen eingegebene E-Mail-Adresse ist ungültig");
		document.Feedback.EMail.focus();
		return false;
	}
}

function open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}