function openWindow(url, width, height, name) {
  var left = (width - screen.width) / 2;
  var top = (height - screen.height) / 2;
  var Fenster1 = window.open(url, name, "width="+width+",height="+height+",left="+left+",top="+top+",menubar=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,dependent=yes");
  Fenster1.focus();
}

function openHelpWindow(topic) {
  var width = 400;
  var height = 460;
  var left = (width - screen.width) / 2;
  var top = (height - screen.height) / 2;
  var Fenster1 = window.open('/beta/help.html?topic='+topic, '_help', "width="+width+",height="+height+",left="+left+",top="+top+",menubar=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,dependent=yes");
  Fenster1.focus();
}

function textCounter(field, countfield, maxlimit)
{
   if (field.value.length > maxlimit)
      field.value = field.value.substring(0, maxlimit);
   else
      countfield.value = maxlimit - field.value.length;
}

