function ToggleDetails(id){
	if (document.all["FrontImg_" + id].src.indexOf ("gfx/expand.gif") > 0){
		document.all["FrontImg_" + id].src = "gfx/collapse.gif";
		document.all["FrontImg_" + id].alt = "Maximieren";

		var items = this.document.all.tags("TR")

		for(i = 0; i < items.length; i++){
			if (items(i).id.indexOf ('FrontRow_' + id) == 0){
				items(i).style.display = 'inline';
			}
		}
	}
	else{
		document.all["FrontImg_" + id].src = "gfx/expand.gif";
		document.all["FrontImg_" + id].alt = "Minimieren";

		var items = this.document.all.tags("TR")

		for(i = 0; i < items.length; i++){
			if (items(i).id.indexOf ('FrontRow_' + id) == 0){
				items(i).style.display = 'none';
			}
		}
	}
}

function CheckZahl(Wert){
	if(isNaN(Wert) == true){
		alert(Wert + " ist keine Zahl");
		return false;
	}
	else return true;
}

function CheckInhalt(){
	var form = document.forms["form"];
	var n = 0;
	var Info = "Folgende Felder müssen noch ausgefüllt werden:\n\n";

	for(var i = 0; i < form.elements.length; i++){
		if(form.elements[i].type != "hidden"){
			if(form.elements[i].value == ""){
				Info += "- " + form.elements[i].name + "\n"
				n++;
			}
		}
	}

	if(n > 0){
		alert(Info);
		return false;
	}

	return true;
}

function ShowWindow(url,width,height){
     var nets = navigator.appName == "Netscape";
     if (nets){
          window.open(url,
          '_blank',
          'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizeable=1,width='+width+',height='+height);
     }
     else{
          winpop=window.open(url,
          "_blank",
          "[toolbar=no, location=no, directories=no, status=no, menubar=no,scrollbars=yes, resizeable=yes, width="+width+", height="+height+"]");
     }
}

function previewColor(element,newColor){
     element.style.backgroundColor = newColor;
}