window.defaultStatus  = '';

function menue_go(index,value)  
{
  if (value == "") {
    document.forms[index].reset();
    document.forms[index].elements[0].selectedIndex = 0;
  }
  else {
    document.forms[index].submit();
  }
  return;
}

function open_window(url,title,b,h)
 {
   var maxwidth = screen.width-50;
   var maxheight = screen.height-120;
   var scroll = "yes";
   h+=20; 
   if (b > maxwidth)  b = maxwidth; 
   if (h > maxheight) { h = maxheight; b+=20; }
   if (navigator.appVersion.search(/AOL/) != -1) { scroll = 'yes'; b = maxwidth; h = maxheight;} 
   var param = "dependent=yes,resizable=no,location=no,directories=no,status=no,menubar=no,scrollbars="+ scroll +",toolbar=no,width="+ b +",height="+ h;
   f = window.open(url,title,param);
   f.blur();
   f.moveTo((screen.width-b)/2,(screen.height-h)/2-40);
   f.focus();
 }

function autoStatus(index,rubrik)
 {
   window.status = window.document.title + ' ' + document.all[index].innerText;
 }


function CountMax(form,element,max,counter)
{
  var wert = max - document.forms[form].elements[element].value.length;
  if (wert < 0) {
    //alert("Es duerfen nicht mehr als " + max + " Zeichen eingegeben werden!");
    document.forms[form].elements[element].value = document.forms[form].elements[element].value.substring(0,max)
    document.forms[form].elements[counter].value = "(0";
  }
  else {
    document.forms[form].elements[counter].value = "(" + wert;
  }
}

