function bildFenster(datei, text, breite, hoehe) {
var fenster_property = "width=" +breite+ ",height=" +hoehe+ " ,left=200,top=200,resizable=no"
var groesser=null

groesser = window.open("about:blank", "bild", fenster_property);
      groesser.document.writeln("<html> ");
      groesser.document.writeln("  <head> ");
      groesser.document.writeln("    <title>");
      groesser.document.writeln(text);
      groesser.document.writeln("</title> ");
      groesser.document.writeln("    <meta http-equiv='content-type' content='text/html;charset=ISO-8859-1'> ");
      groesser.document.writeln("  </head> ");
      groesser.document.writeln("  ");
      groesser.document.writeln("  <body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'> ");
      groesser.document.writeln("    <a href='javascript:close()'> ");
      groesser.document.writeln("      <img src=" +datei+ " alt='Fenster schließen' border=0 hspace=0 vspace=0></a>" );	 
      groesser.document.writeln("  </body> ");
      groesser.document.writeln("</html> ");  
      groesser.focus(); 

}

function formCheck(formobj){
	// Enter name of mandatory fields
	var fieldRequired = Array("FirstName", "LastName");
	// Enter field description to appear in the dialog box
	var fieldDescription = Array("First Name", "Last Name");
	// dialog message
	var alertMsg = "Please complete the following fields:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}

function divswitch (thediv) {   
  if (document.getElementById(thediv).style.display == "none") {
    document.getElementById(thediv).style.display = "block";
  } else {
    document.getElementById(thediv).style.display = "none";
  }
}

function popUp(URL) {
id = "popUp";
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=600,height=600,left = 340,top = 212');");
}

function popUp_klein(URL) {
id = "popUp_k";
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=400,height=200,left = 340,top = 212');");
}

