//Funktion, um das Popup Fenster zu formatieren und zu öffnen.
function openWindow(url,title,typ) {
  var options = "width=400,height=400,menubar=no,status=yes,resizable=no,scrollbars=auto";
  if (typ == 0) {
    options = "width=550,height=400,menubar=no,status=no,resizable=yes,scrollbars=yes";
  }
  if (typ == 1) {
    options = "width=400,height=400,menubar=no,status=no,resizable=yes,scrollbars=yes";
  }
  var newWin = window.open(url,"_blank",options);
}

function openWindowH(url,title,typ) {
  var options = "width=400,height=400,menubar=no,status=yes,resizable=yes,scrollbars=auto";
  if (typ == 0) {
    options = "width=850,height=650,menubar=no,status=no,resizable=yes,scrollbars=auto";
  }
  if (typ == 1) {
    options = "width=400,height=400,menubar=no,status=no,resizable=yes,scrollbars=auto";
  }
  var newWin = window.open(url,"neu",options);
  newWin.moveTo(50,50);
}

function openWindowCAD(datei) {
  var options = "width=810,height=600,menubar=no,status=yes,resizable=yes,scrollbars=auto";
  // fuer Flash
  // var newWin = window.open("cadanzeige.php?datei=" + datei,"neu",options);
  // fue JPEG
  var newWin = window.open("bildzeigen.php?name=" + datei + "&breite=800","neu",options);
  newWin.moveTo(50,50);
}

/*------------- setzeAlle() ---------------------------------*/
/* setzt alle Checkboxen einer Ergebnis- bzw. Auswahlliste   */
/*                                                           */
/*-----------------------------------------------------------*/
function setzeAlle(intAnz)
  {
  for (var i = 0; i < document.auswahlliste.length; ++i) {
    if (document.auswahlliste.elements[i].type == "checkbox") document.auswahlliste.elements[i].checked = 1;  
    }      
  /* document.auswahlliste.elements["auswahllisteDd"].checked = 1;  */
  for(i=0;i <= intAnz + 1; i++)
    {
    /* document.auswahlliste.elements[6+2*i].checked = 1 */
    }
  document.forms["auswahlliste"].elements["hmzuordnungsid"].value = "x";  
  }

/*------------- setzeKeinen() -------------------------------*/
/* setzt alle Checkboxen einer Ergebnis- bzw. Auswahlliste   */
/* zurück                                                    */
/*-----------------------------------------------------------*/
function setzeKeinen(intAnz)
  {
  for (var i = 0; i < document.auswahlliste.length; ++i) {
    if (document.auswahlliste.elements[i].type == "checkbox") document.auswahlliste.elements[i].checked = 0;  
    }      
  /*      
  for(i=0;i <= intAnz; i++)
    {
    document.auswahlliste.elements[6+2*i].checked = 0
    }
 */
  document.forms["auswahlliste"].elements["hmzuordnungsid"].value = "";
  }


