/* JavaScript-Funktionen fuer PopUp-Fenster */

function newWindow(url,breite,hoehe) {
 fenster = window.open(url,'_blank','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,left=10,top=10,width='+breite+',height='+hoehe);
 fenster.focus();
 return false;
}


function newScrollWindow(url,breite,hoehe){
 fenster = window.open(url,'_blank','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,left=10,top=10,width='+breite+',height='+hoehe);
 fenster.focus();
 return false;
}


function newFullWindow(url) {
 schirm_b=screen.availWidth - 15;    /* verfuegbare Bildschirmbreite */
 schirm_h=screen.availHeight - 200;  /* verfuegbare Bildschirmhoehe  */
 
// alert('verfügbar: ' + schirm_b + ' x ' + schirm_h); 

 fenster = window.open(url,'_blank','toolbar=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,left=0,top=0,width='+schirm_b+',height='+schirm_h);
 fenster.focus();
 return false;
}


function schliessen() {
 if (window.opener) {
   document.write('<p style="margin-top:10px; margin-bottom:10px;"><a href="javascript:self.close();" class="close" style="cursor:pointer;">Schlie&szlig;en<\/a><\/p>');
 }   
}


neuFenster="";

function popdown() {
  if (!neuFenster.closed && neuFenster.location) { neuFenster.close(); }
}

function OpenImageWindow(bild,breite,hoehe,alttext) {
  xsize = breite;
  ysize = hoehe+25;
  abstand = hoehe+2;
  xpos = 10;
  ypos = 10;

  popdown();

  html = ('<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1.0 Strict\/\/EN" "http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-strict.dtd"><html xmlns="http:\/\/www.w3.org\/1999\/xhtml" xml:lang="de" lang="de"><head><title>'+alttext+' &ndash; gro&szlig;<\/title><meta http-equiv="Content-Type" content="text\/html;charset=iso-8859-1" \/><meta http-equiv="imagetoolbar" content="no" \/> <meta http-equiv="Content-Script-Type" content="text/javascript" \/><style type="text\/css">html, body, p, a {margin:0 0 0 0; padding:0; font-family: Verdana,Geneva,Arial,sans-serif; color:#fff; text-align: center;} body {font-size:100.01%; background:#333 url('+bild+') no-repeat;} p {font-size: 0.8em;} a:link {color:#fff; text-decoration:none;} a:visited {color:#fff; text-decoration:none;} a:hover {color:#aaa; text-decoration:none;}<\/style><\/head><body onload="focus()"><p style="margin-top:'+abstand+'px;"><a href="" onclick="top.self.close()" onmouseover="window.status=\'Fenster&nbsp;schlie&szlig;en\'; return true;" onmouseout="window.status=\'\'; return true;">Fenster&nbsp;schlie&szlig;en<\/a><\/p><\/body><\/html>');
  neuFenster=window.open("","bild","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,top="+ypos+",left="+xpos+",width="+xsize+",height="+ysize);
  neuFenster.document.open("text/html", "replace");
  neuFenster.document.write(html);
  neuFenster.document.close();
  return false;
}


window.onunload = popdown;   // Popup-Fenster automatisch schliessen beim Verlassen der aufrufenden Seite



function f_open_window_max(aURL)
{
   var wOpen;
   var sOptions;

   sOptions = 'status=yes,menubar=yes,scrollbars=yes,resizable=yes,toolbar=yes';
   sOptions = sOptions + ',width=' + (screen.availWidth - 10).toString();
   sOptions = sOptions + ',height=' + (screen.availHeight - 110).toString();
   sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';

   wOpen = window.open('', '', sOptions);
   wOpen.location = aURL;
   wOpen.focus();
   wOpen.moveTo(-3, -3);
   wOpen.resizeTo(screen.availWidth + 6, screen.availHeight + 6);
   return !wOpen;
}

