
var popupWindow = false;
var NS4      = (document.layers);
var IE4      = (document.all);
var isMac    = (navigator.appVersion.indexOf("Mac")!=-1);

function konsole(url,width,height,screenX,screenY) {

  if (NS4 && !isMac) {                                            // use this script for Netscape4+ on a PC
    if(popupWindow && popupWindow.open && !popupWindow.closed) {  // prueft, ob konsole noch nicht geoeffnet, bzw. schon wieder geschlossen wurde
      popupWindow.close();
      popupWindow = window.open('','popupWindow','width=' + width + ',height=' + height + ',screenX=' + screenX + ',screenY=' + screenY + ', resizable=no, scrollbars=yes, toolbar=no, menubar=no, location=no, dependent=yes');
    }
    else
      popupWindow = window.open('','popupWindow','width=' + width + ',height=' + height + ',screenX=' + screenX + ',screenY=' + screenY + ', resizable=no, scrollbars=yes, toolbar=no, menubar=no, location=no, dependent=yes');
  }
  
  else if (IE4 && isMac) {                                        // use this script for InternetExplorer4+ on a Mac
    if(popupWindow && popupWindow.open && !popupWindow.closed) {  // prueft, ob konsole noch nicht geoeffnet, bzw. schon wieder geschlossen wurde
      popupWindow.close();
    }
    popupWindow = window.open('','popupWindow','width=' + width + ',height=' + height + ',top=' + screenX + ',left=' + screenY + ', resizable=no, scrollbars=yes, toolbar=no, menubar=no, location=no, dependent=yes');
  }
  
  else if (NS4 && isMac) {                                        // use this script for Netscape4+ on a Mac
    if(popupWindow && popupWindow.open && !popupWindow.closed) {  // prueft, ob konsole noch nicht geoeffnet, bzw. schon wieder geschlossen wurde
      popupWindow.close();
    // alert('hello');
    }
    popupWindow = window.open('','popupWindow','width=' + width + ',height=' + height + ',screenX=' + screenX + ',screenY=' + screenY + ', resizable=no, scrollbars=yes, toolbar=no, menubar=no, location=no, dependent=yes');
  }
  
  else {                                                          // use this script for InternetExplorer4+ on a PC and anything else
    if(popupWindow && popupWindow.open && !popupWindow.closed)    // prueft, ob konsole noch nicht geoeffnet, bzw. schon wieder geschlossen wurde
      popupWindow.resizeTo(width,height+20);
    else
      popupWindow = window.open('','popupWindow','width=' + width + ',height=' + height + ',top=' + screenX + ',left=' + screenY + ', resizable=no, scrollbars=yes, toolbar=no, menubar=no, location=no, dependent=yes');
  }
  
  if (popupWindow != null) {                                    // 'null' falls es nicht erstellt/geoeffnet werden kann (due to low memory, for example). 
    popupWindow.location.href = url;
    popupWindow.focus();                                 // holt das erzeugte Fenster in den Vordergrund
  }

}
//</script>


/* Aufruf im <body> [a href tag im body des Dokumentes geben wo ich auf die Konsole verlinken moechte] 
<a href="#" class="Wert des style sheets wenn es ein Textlink ist" onmouseover="status='zur Konsole';return true" onmouseout="status='';return true" onclick="konsole('Pfad_der_konsole.html',500,350,0,0);" onfocus="blur();">Geltungsbereich d.h. Bild oder Text zum Aufruf der Konsole</a><br>
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/

/* **** wenn man vom PopupFenster (Konsole) auf eine andere Seite im Dokument springen will ****************
################ in den <head> einzubinden - (in das Javascript) ##############################
in den <head der Konsole> 
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function go_kontakt() {
  window.opener.location.href="../kontakt.html";
  window.close();
}
</script>
</head>

Aufruf erfolgt dann im [a href tag im body der Konsole] 
<a href="javascript:go_kontakt()" onmouseover="status='zum Kontaktformular';return true" onmouseout="status='';return true">zum Kontaktformular-Button</a>

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
/* **** wenn man das PopupFenster (Konsole) separat schlieszen will ****************
################ Aufruf erfolgt dann im [a href tag im body der Konsole]  ##############################

<a href="javascript:window.close()">close-Button</a>
*/



