
function dimension() {
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);
if(ns6||ns4) {
breite = innerWidth;
hoehe = innerHeight;
}
else if(ie4) {
breite = document.body.clientWidth;
hoehe = document.body.clientHeight;
}
return
}


function infowin(info1,info2) {
msg=window.open("","msg","height=120,width=500,left=250,top=150");
msg.focus();
msg.document.open();
with (msg) {
document.write("<html><head><title>Telefon</title>");
document.write("<script type='text/javascript' language='JavaScript'>");
document.write("function click() { window.close(); } ");  // bei click  schliessen
document.write("document.onmousedown=click ");
document.write("</script>");
document.write("</head><body bgcolor='#D5D0F4' onblur=window.close()>");
document.write("<font face='ARIAL,HELVETICA'>" + info1);
document.write("<br><center><h1>");
document.write( info2 + "</font>");
document.write("</h1></center><br>");
document.write("</body></html>");
msg.document.close();
}
}

// Fensterposition horizontal: mitte, vertical mitte
// uebergabe url , breite , hoehe , scroll ja/nein , groesse aendern ja/nein
// aufruf: <a href="javascript: popwin1('dateiname.htm','700','450',1,1)">link</a>
function popwin1(url,w,h,s,r)
{
x=screen.width/2;
x=x-w/2;
y=screen.height/2;
y=y-h/2;
popUp=window.open(url,'win','width='+ w +',height='+ h +',left=' + x +',top='+ y +',directories=0,status=0,scrollbars='+s +',resizable='+ r + ',menubar=0,locationbar=0')
popUp.focus();
}

// Fensterposition horizontal mitte, vertical 20 pixel von links
// nur scroll ja,  groesse aendern ja
// uebergabe url , breite , hoehe
// aufruf: <a href="javascript: popwin2('dateiname.htm','700','450')">link</a>
function popwin2(url,w,h)
{
x=screen.width/2;
x=x-w/2;
y=20;
popUp=window.open(url,'win','width='+ w +',height='+ h +',left=' + x +',top='+ y +',directories=0,status=0,scrollbars=1,resizable=1,menubar=0,locationbar=0')
popUp.focus();
}

// Fensterposition horizontal mitte, vertical mitte
// uebergabe url , breite , hoehe
// aufruf: <a href="javascript: popwin3('dateiname.htm','700','450')">link</a>
function popwin3(url,w,h)
{
x=screen.width/2;
x=x-w/2;
y=screen.height/2;
y=y-h/2;
popUp=window.open(url,'win','width='+ w +',height='+ h +',left=' + x +',top='+ y +',directories=1,status=1,scrollbars=1,resizable=1,menubar=1,locationbar=1')
popUp.focus();
}

// Fensterposition horizontal mitte, vertical mitte
// uebergabe url , breite , hoehe
// aufruf: <a href="javascript: popwin4('dateiname.htm','700','450')">link</a>
function popwin4(url,w,h) {
dimension()

x=breite/2;
x=x-w/2;
y=hoehe/2;
y=y-h/2;
popUp=window.open(url,'win','width='+ w +',height='+ h +',left=' + x +',top='+ y +',directories=0,status=0,scrollbars=0,resizable=0,menubar=0,locationbar=1')
popUp.focus();
}

// Fensterposition x-pos y-pos
// uebergabe url , breite , hoehe
// aufruf: <a href="javascript: popwin5('dateiname.htm','700','450')">link</a>
function popwin5(url,w,h) {

x=1 ;
y=1 ;

popUp=window.open(url,'win','width='+ w +',height='+ h +',left=' + x +',top='+ y +',directories=0,status=0,scrollbars=0,resizable=0,menubar=0,locationbar=1')
popUp.focus();
}





// Als Übergabeparameter wird die bildquelle,breite und höhe übergeben
function FotoFenster(bildurl,b,h,text)
{
var eigenschaft,sbreite,shoehe,fenster,b,h;
breite = b-5;
hoehe = h-5;

// stellt die Bildschirmabmessungen fest
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);

if(ns6||ns4) {
sbreite = innerWidth;
shoehe = innerHeight;
}
else if(ie4) {
sbreite = document.body.clientWidth;
shoehe = document.body.clientHeight;
}

if(isNaN(b) == false)
   {
   b=parseInt(b);
   }
if(isNaN(h) == false)
   {
   h=parseInt(h);
   }

x = (sbreite-b+20)/2;
y = (shoehe-h+20)/2;

//absoluter Pfad zum Leeren Gif
cleargif="http://www.baerengehege.fawh.de/media/img/clear.gif";
var zu =" - Zum Schließen klicken.";
//Shim-Gif-TAG zusammensetzen in XHTML
leer="<img src=" + cleargif + " style='border:1px solid #000000; padding:1px;' alt=\" "+text+ zu +" \" title=\" "+text+ zu +" \" width="+breite+" height="+hoehe+"/>";
b = b + 40;
h = h + 65;
eigenschaften="left="+50+",top="+50+",screenX="+x+",screenY="+y+",width="+b+",height="+h+",menubar=no,toolbar=no,locationbar=no";

fenster=window.open("","fotowin",eigenschaften);
fenster.focus();
fenster.document.open();
with (fenster) {
  document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
  document.write('<html><head>');
  document.write('<meta http-equiv="imagetoolbar" content="no">');
  document.write("<script type='text/javascript' language='JavaScript'>");
  document.write("function click() { window.close(); } ");  // bei click  schliessen
  document.write("document.onmousedown=click ");
  document.write("</script>");
  document.write('<title>Zum Schlie&szlig;en auf das Bild klicken.</title></head>');
  document.write('<body bgcolor="#ebebeb" onblur="window.close()" >'); // bei Focusverlust schliessen
  document.write('<center>');
  document.write('<div style="font-family:Arial;font-weight: bold;font-size:80%; color:#004400; margin-top: 5px;">'+text+'</div>');
  document.write('<table width="'+breite+'"  border="0" cellspacing="0" cellpadding="0">');
  document.write('  <tr>');
  document.write('    <td background="'+ bildurl +'">'+leer+'</td>');
  document.write('  </tr>');
  document.write('</table>');
  document.write('</center>');
  document.write('<div align="center" style="margin-top: 10px;"><a href="javascript:window.close();" style="color:#004400; font-size:80%; text-decoration: none;">Fenster schlie&szlig;en</a></div>');
  document.write('</body></html>');
  fenster.document.close();
}
}



function lastupdate() {
// wochentage
var wochentag = new
Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");

// monatsnamen
var monat = new Array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");

today = new Date()
modifiziert = new Date(document.lastModified)
tageher = Math.ceil( (today.getTime()- modifiziert.getTime())/(24*60*60*1000) )

if(tageher == 1) {
wtag = " Tag"
} else {
wtag = " Tagen"
}
var then = new Date(document.lastModified);
document.writeln("update: "+ wochentag[then.getDay()] + " " + then.getDate() + ". " + monat[then.getMonth()]  + ",  vor " + tageher +  wtag + "!")
return
}
