function check( message, form_number )
{
  if( confirm( message ) )
  {
    document.forms[form_number].submit();
  }
  
  else
  {
    history.back();
  }

}

function change_it(id) {

  if(document.getElementById(id).style.visibility == "hidden"){

   document.getElementById(id).style.visibility = "visible";

   document.getElementById(id).style.display = "block";

   document.getElementById(id).style.height = "";

   //document.getElementById("pic" + id).src = "../Pics/Cms/switch_up.gif"; // opened

   for( i=1; i<=9; i++ ) {

    j = "m"+i;

   	if( j != id ) {

	document.getElementById(j).style.visibility = "hidden";

	document.getElementById(j).style.display = "none";

	document.getElementById(j).style.height = "0px";

	}

   }

  } else {

   document.getElementById(id).style.visibility = "hidden";

   document.getElementById(id).style.display = "none";

   document.getElementById(id).style.height = "0px";

   //document.getElementById("pic" + id).src = "../Pics/CMS/switch_down.gif"; // closed

  }

}

function info(url,name,w,h,r,s) {

	window.open

		(url,name,

		'toolbar=no,location=no,directories=no,'+

		'status=no,menubar=no,scrollbars='+s+','+

		'resizable='+r+',copyhistory=no,'+

		'width='+w+',height='+h+''

		);

}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

// Formularfelder zurücksetzen, 
// wenn Feldwert dem ursprünglich gesetzten Wert entspricht
function resetField(formname,fieldname,initialvalue) {
  
  if( window.document.forms[ formname ].elements[ fieldname ].value == initialvalue )
  {

    window.document.forms[ formname ].elements[ fieldname ].value = '';
  }
}

function restoreField(formname,fieldname,initialvalue) {
  
  if( window.document.forms[ formname ].elements[ fieldname ].value == "" )
  {

    window.document.forms[ formname ].elements[ fieldname ].value = initialvalue;
  }
}

// Fokus setzen auf Formularelement
function setFocus(formname, fieldname) {
  
  window.document.forms[formname].elements[fieldname].focus();
}