
function callGoogle() {
var NewScript=document.createElement('script')
NewScript.src="https://apis.google.com/js/plusone.js"
document.body.appendChild(NewScript);
}

setTimeout ("callGoogle()",1000);






function Bookmarks(){


document.write('<div id="bookmarks">');
document.write('<h3><span class="h3pfeil">»</span> &nbsp;social bookmarks</h3>');

//facebook/
document.write('<a rel="nofollow" style="text-decoration:none;" href="http://www.facebook.com/" onclick="window.open(\'http://www.facebook.com/sharer.php?t=Geilenkirchen-Kreis-Heinsberg-NRW&u=http://www.web-toolbox.net/geilenkirchen/index.htm\');return false;" title="Bookmark bei: facebook"><img src="images/book-facebook32.gif" width="20" height="20" border="0" alt="Bookmark bei: facebook"></a>');

//twitter/
document.write('<a rel="nofollow" style="text-decoration:none;" href="http://www.twitter.com/" onclick="window.open(\'http://www.twitter.com/home?status=Geilenkirchen-Kreis-Heinsberg-NRW+http://www.web-toolbox.net/geilenkirchen/index.htm\');return false;" title="Bookmark bei: twitter"><img src="images/book-twitter32.gif" width="20" height="20" border="0" alt="Bookmark bei: twitter"></a>');

//schuelervz/
document.write('<a rel="nofollow" style="text-decoration:none;" href="http://www.google.com/" onclick="window.open(\'http://www.schuelervz.net/Suggest/Selection/?u=http://www.web-toolbox.net/geilenkirchen/index.htm&desc=Geilenkirchen-Kreis-Heinsberg-NRW\');return false;" title="Bookmark bei: SchülerVZ"><img src="images/book-schuelervz32.gif" width="20" height="20" border="0" alt="Bookmark bei: schülervz"></a>');

//google
document.write('<a rel="nofollow" style="text-decoration:none;" href="http://www.google.com/" onclick="window.open(\'http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk=\'+encodeURIComponent(location.href)+\'&annotation=&labels=&title=\'+encodeURIComponent(document.title));return false;" title="Bookmark bei: Google"><img src="images/book-google32.gif" width="20" height="20" border="0" alt="Bookmark bei: Google"></a>');

document.write('<g:plusone size="medium" count="false"></g:plusone>');
document.write('</div><br><br><br>');
}


function Bookmark2(){
document.write('<div align="center" id="bookmarks">');


//facebook/
document.write('<a rel="nofollow" style="text-decoration:none;" href="http://www.facebook.com/" onclick="window.open(\'http://www.facebook.com/sharer.php?t=Webseite-Gerbils-Crossing&u=http://www.web-toolbox.net/maus/index.html\');return false;" title="Bookmark bei: facebook"><img src="images/book-facebook32.gif" width="20" height="20" border="0" alt="Bookmark bei: facebook"></a>');

//twitter/
document.write('<a rel="nofollow" style="text-decoration:none;" href="http://www.twitter.com/" onclick="window.open(\'http://www.twitter.com/home?status=Webseite-Gerbils-Crossing+http://www.web-toolbox.net/maus/index.html\');return false;" title="Bookmark bei: twitter"><img src="images/book-twitter32.gif" width="20" height="20" border="0" alt="Bookmark bei: twitter"></a>');

//schuelervz/
document.write('<a rel="nofollow" style="text-decoration:none;" href="http://www.google.com/" onclick="window.open(\'http://www.schuelervz.net/Suggest/Selection/?u=http://www.web-toolbox.net/maus/index.html&desc=Webseite-Gerbils-Crossing\');return false;" title="Bookmark bei: SchülerVZ"><img src="images/book-schuelervz32.gif" width="20" height="20" border="0" alt="Bookmark bei: schülervz"></a>');

//google
document.write('<a rel="nofollow" style="text-decoration:none;" href="http://www.google.com/" onclick="window.open(\'http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk=\'+encodeURIComponent(location.href)+\'&annotation=&labels=&title=\'+encodeURIComponent(document.title));return false;" title="Bookmark bei: Google"><img src="images/book-google32.gif" width="20" height="20" border="0" alt="Bookmark bei: Google"></a>');

document.write('<g:plusone size="medium" count="false"></g:plusone>');
document.write('</div><br><br><br>');
}



if(document.location.protocol=='http:'){
 var Tynt=Tynt||[];Tynt.push('cuBKQeh0yr4km8adbi-bpO');Tynt.i={"ap":"Inhalte stammen von:","as":"www.rennmaus.net","t":true};
 (function(){var s=document.createElement('script');s.async="async";s.type="text/javascript";s.src='http://tcr.tynt.com/ti.js';var h=document.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);})();
}


// Hintergrundbild
function BgPicture() {
MaxBreite = document.body.scrollWidth;
  if(MaxBreite < 1180) {
  document.getElementById("Picture").style.visibility = "hidden";
  }
  else
  {
  document.getElementById("Picture").style.left = "1090px";
  document.getElementById("Picture").style.visibility = "visible";
  }

//alert(MaxBreite);
}

document.write('<div id="Picture"><img src="grafiken/gc-90-adr.gif" width="90" height="120" border="0" alt=""></div>');
setTimeout("BgPicture()",3000);


function Textauswahl(StdAktuell)  {
  if (StdAktuell<=5)
  TextAnzeige = "Immer noch wach?";
  else
  if (StdAktuell<=11)
  TextAnzeige = "Guten Morgen";
  else
  if (StdAktuell<=17)
  TextAnzeige = "Guten Tag";
  else
  TextAnzeige = "Guten Abend";
return TextAnzeige
}

function Begruessung()
{
uhrzeit=new Date()
var StdAktuell = uhrzeit.getHours()
Textauswahl(StdAktuell)
document.write(TextAnzeige);
}

function Register() {
document.write('<h3><span class="h3pfeil">»</span> &nbsp;Schlagwortsuche A-Z</h3><table height="50" id="map" cellspacing="0" cellpadding="2" border="0"><tr><td><a href="register.htm#a">A</a></td><td> <a href="register.htm#b">B</a></td><td><a href="register.htm#c">C</a></td><td><a href="register.htm#d">D</a></td><td><a href="register.htm#e">E</a></td><td><a href="register.htm#f">F</a></td><td><a href="register.htm#g">G</a></td></tr><tr><td><a href="register.htm#h">H</a></td><td><a href="register.htm#i">I</a></td><td><a href="register.htm#j">J</a></td><td><a href="register.htm#k">K</a></td><td><a href="register.htm#l">L</a></td><td><a href="register.htm#m">M</a></td><td><a href="register.htm#n">N</a></td></tr><tr><td><a href="register.htm#o">O</a></td><td><a href="register.htm#p">P</a></td><td><a href="register.htm#q">Q</a></td><td><a href="register.htm#r">R</a></td><td><a href="register.htm#s">S</a></td><td><a href="register.htm#t">T</a></td><td><a href="register.htm#u">U</a></td></tr><tr><td> <a href="register.htm#v">V</a></td><td><a href="register.htm#w">W</a></td><td><a href="register.htm#ax">X</a></td><td><a href="register.htm#ay">Y</a></td><td><a href="register.htm#z">Z</a></td></tr></table><br>');
return
}




function BlurLinks(){
links=document.getElementsByTagName('a');
  for(i=0;i<links.length;i++)
  {
  links[i].onfocus=new Function("if(this.blur)this.blur()");
  }
}
onload=BlurLinks;


function Zeige(x){
//x = "Schriftgröße";
document.getElementById("Hinweis").value = x;
}

function IntMenue(){
document.write('<div id="Schrift"><a onMouseOver="Zeige(\'letzte Updates\')" onMouseOut="Zeige(\'\')" title="Änderungen Erweiterungen Updates" target="_top" href="updates.htm"><img src="images/22-update.gif" width="22" height="22" border="0" alt="letzte Updates"></a><a onMouseOver="Zeige(\'Register A-Z anzeigen\')" onMouseOut="Zeige(\'\')" title=" alphabetisches Register " href="register.htm"><img src="images/22-abisz.gif" width="22" height="22" border="0" alt=" alphabetisches Register "></a><a onMouseOver="Zeige(\'SiteMap anzeigen\')" onMouseOut="Zeige(\'\')" title=" zur Sitemap " href="sitemap.htm"><img src="images/22-map.gif" width="22" height="22" border="0" alt=" Sitemap "></a><a onMouseOver="Zeige(\'Info zum Forum anzeigen\')" onMouseOut="Zeige(\'\')" title=" Übersicht Rennmaus-Forum" href="forum-vorschau.htm"><img src="images/22-forum.gif" width="22" height="22" border="0" alt=" Forum "></a><a onMouseOver="Zeige(\'Gästebuch öffnen\')" onMouseOut="Zeige(\'\')" target="_blank" title=" zum Gästebuch " href="http://gb.webmart.de/gb.cfm?id=368438"><img src="images/22-book.gif" width="22" height="22" border="0" alt=" Gästebuch "></a><a onMouseOver="Zeige(\'Startseite anzeigen\')" onMouseOut="Zeige(\'\')" title=" Home " target="_top" href="index.php"><img src="images/22-home.gif" width="22" height="22" border="0" alt=" Home "></a><a onMouseOver="Zeige(\'normale Schrifttype\')" onMouseOut="Zeige(\'\')" onClick="SetCookie(nameOfCookie, 1, exp); doRefresh();" href="javascript:void(0)"><img src="images/schrift-klein.gif" width="22" height="22" border="0" alt=""></a><a onMouseOver="Zeige(\'große Schrifttype\')" onMouseOut="Zeige(\'\')" onClick="SetCookie(nameOfCookie, 2, exp); doRefresh();" href="javascript:void(0)"><img src="images/schrift-gross.gif" width="22" height="22" border="0" alt=""></a></div>');

Update6()
}


function Update6() {
var Ueberarbeitet = new Date(document.lastModified);
var monat = new Array("Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez");
var UpDatum = " update: " + Ueberarbeitet.getDate() + ". " + monat[Ueberarbeitet.getMonth()] + " " + Ueberarbeitet.getFullYear();
Zeige(UpDatum)
}


function Fuss(){
document.write('<div id="fussleiste"><span class="IntNavUnten"><a title=" alphabetisches Register " href="register.htm"><img src="images/22-abisz.gif" width="22" height="22" border="0" alt=" alphabetisches Register "></a><a title=" zur Sitemap " href="sitemap.htm"><img src="images/22-map.gif" width="22" height="22" border="0" alt=" Sitemap "></a><a target="_blank" title=" zum Rennmaus-Forum" href="http://f3.webmart.de/f.cfm?ID=46723"><img src="images/22-forum.gif" width="22" height="22" border="0" alt=" Forum "></a><a target="_blank" title=" zum Gästebuch " href="http://gb.webmart.de/gb.cfm?id=368438"><img src="images/22-book.gif" width="22" height="22" border="0" alt=" Gästebuch "></a><a title=" Home " target="_top" href="index.php"><img src="images/22-home.gif" width="22" height="22" border="0" alt=" Home "></a><a title=" zum Eingangsportal " target="_blank" href="../index.htm"><img src="images/22-return.gif" width="22" height="22" border="0" alt=" www.clickstart.de "></a></span><span class="MitteUnten"><a href="index.php">GerbilsCrossing</a> <a href="impressum.htm">Impressum</a> <a href="kontakt02.php">Kontakt</a> <a href="sitemap.htm">Sitemap</a> <a href="register.htm">Register A-Z</a> <a target="_blank" href="http://f3.webmart.de/f.cfm?ID=46723">Forum</a> <a target="_blank" href="http://f3.webmart.de/f.cfm?id=3041793">ErzählCafe</a></span><span class="SchriftUnten"><a title=" zum Seitenanfang " href="#oben">nach oben</a></span></div><div id="footer">')
lastupdate();
document.write(' &nbsp;&nbsp;&nbsp;Rennmausseite GerbilsCrossing - Wilhelm Jansen - Geilenkirchen -  <a href="http://www.clickstart.de">www.clickstart.de</a></div>');
}

function Foren(){
document.write('<br><br><a target="_blank" class="mitte" href="http://f3.webmart.de/f.cfm?ID=46723"><img src="images/button-forum-03.gif" width="145" height="45" border="0" alt=""><br><div style="margin-bottom:5px" align="center">Fenster öffnen</div></a><a target="_blank" class="mitte" href="http://f3.webmart.de/f.cfm?id=3041793"><img src="images/button-forum-04.gif" width="145" height="45" border="0" alt=""><br><div style="margin-bottom:5px" align="center">Fenster öffnen</div></a><a target="_blank" class="mitte" href="http://f2.webmart.de/f.cfm?id=2763658"><img src="images/button-forum-05.gif" width="145" height="45" border="0" alt=""><br><div style="margin-bottom:5px" align="center">Fenster öffnen</div></a><a target="_blank" class="mitte" href="http://f2.webmart.de/f.cfm?id=2609023"><img src="images/button-forum-06.gif" width="145" height="45" border="0" alt=""><br><div style="margin-bottom:5px" align="center">Fenster öffnen</div></a><br>');
}




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 EinAus() {
dimension()

document.write('<style type="text/css">');

if(breite >= 1260) {
document.write('#werbung{display:inline;}');
}
else {
document.write('#werbung{display:none;}');
}
document.write('</style>');
return
}

//var timeout=("EinAus()",1000)



function printWindow() {
Browser = parseInt(navigator.appVersion);
if (Browser >= 4) window.print();
}



function lastupdate() {
var Ueberarbeitet = new Date(document.lastModified);
// wochentage
var wochentag = new
Array("Sonntag","Mo.","Di.","Mi.","Do.","Fr.","Sa.");
// monatsnamen
var monat = new Array("Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez");
today = new Date()
modifiziert = new Date(document.lastModified)
tageher = Math.ceil( (today.getTime()- modifiziert.getTime())/(24*60*60*1000) )
tageher = tageher-1;

//alert(Math.abs(tageher));

if(tageher == 1) {
Wann = ",  vor " + tageher + " Tag!"
}
else
{
Wann = ",  vor " + tageher +  " Tagen!"
}

if(tageher == 0) {
WannMin = Ueberarbeitet.getMinutes();
if (WannMin < 10) WannMin = "0" + WannMin;
Wann = " um " + Ueberarbeitet.getHours() +":" + WannMin + " Uhr";
}

document.write("<br>erstellt: 29.05.1999 &nbsp;&nbsp; letztes update: "+ wochentag[Ueberarbeitet.getDay()] + " " + Ueberarbeitet.getDate() + ". " + monat[Ueberarbeitet.getMonth()] + Wann )
return
}


function update() {
var Ueberarbeitet = new Date(document.lastModified);
// wochentage
var wochentag = new
Array("Sonntag","Mo.","Di.","Mi.","Do.","Fr.","Sa.");
// monatsnamen
var monat = new Array("Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez");
today = new Date()
modifiziert = new Date(document.lastModified)
tageher = Math.ceil( (today.getTime()- modifiziert.getTime())/(24*60*60*1000) )
tageher = tageher-1;
if(tageher == 1) {
Wann = ",  vor " + tageher + " Tag!"
}
if(tageher > 1) {
Wann = ",  vor " + tageher +  " Tagen!"
}
if(tageher == 0) {
WannMin = Ueberarbeitet.getMinutes();
if (WannMin < 10) WannMin = "0" + WannMin;
Wann = " um " + Ueberarbeitet.getHours() +":" + WannMin + " Uhr";
}

document.write("Letztes update: "+ wochentag[Ueberarbeitet.getDay()] + " " + Ueberarbeitet.getDate() + ". " + monat[Ueberarbeitet.getMonth()] + Wann )
return
}





// Anfang InfoBox2011

if (document.layers) {navigator.family = "nn4"}
if (document.all) {navigator.family = "ie4"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {navigator.family = "gecko"}

overdiv="0";

var offsetx=20
var offsety=0

function Box2011Anzeigen(a)
{

if(!InfoBox2011Inhalt[a]){InfoBox2011Inhalt[a]="<font color=red>Dieses PopUp (#"+a+") ist nicht korrekt definiert<br>Die Beschreibung fehlt. Ein Array-Element mit dieser Index-Nummer wurde nicht definiert!</font>";
}

Inhalt = InfoBox2011Inhalt[a];

if(navigator.family =="nn4") {
        document.InfoBox2011.document.write(Inhalt);
        document.InfoBox2011.document.close();
        document.InfoBox2011.left=x+offsetx;
        document.InfoBox2011.top=y+offsety;
        }
else if(navigator.family =="ie4"){
        InfoBox2011.innerHTML=Inhalt;
        InfoBox2011.style.pixelLeft=x+offsetx;
        InfoBox2011.style.pixelTop=y+offsety;
        }
else if(navigator.family =="gecko"){
        document.getElementById("InfoBox2011").innerHTML=Inhalt;
        document.getElementById("InfoBox2011").style.left=x+offsetx;
        document.getElementById("InfoBox2011").style.top=y+offsety;
        }
}


function Box2011Ausblenden(){
if (overdiv == "0") {
        if(navigator.family =="nn4") {eval(document.InfoBox2011.top="-2000");}
        else if(navigator.family =="ie4"){InfoBox2011.innerHTML="";InfoBox2011.style.pixelTop=y-2000;}
        else if(navigator.family =="gecko") {document.getElementById("InfoBox2011").style.top="-2000";}
        }
}

var isNav = (navigator.appName.indexOf("Netscape") !=-1);

function Position2011(e){
// oder Plazierung neben Mauszeiger
x = (isNav) ? e.pageX : event.clientX + document.body.scrollLeft;
y = (isNav) ? e.pageY : event.clientY + document.body.scrollTop;
}

if (isNav){document.captureEvents(Event.mouseMove);}
document.onmousemove = Position2011;

// Ende InfoBox2011






/*
        Lightbox JS: Fullsize Image Overlays
        by Lokesh Dhakar - http://www.huddletogether.com

        For more information on this script, visit:
        http://huddletogether.com/projects/lightbox/

        Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
        (basically, do anything you want, just leave my name and link)

        Table of Contents
        -----------------
        Configuration

        Functions
        - getPageScroll()
        - getPageSize()
        - pause()
        - getKey()
        - listenKey()
        - showLightbox()
        - hideLightbox()
        - initLightbox()
        - addLoadEvent()

        Function Calls
        - addLoadEvent(initLightbox)

*/



//
// Configuration
//

// If you would like to use a custom loading image or close button reference them in the next two lines.
var loadingImage = 'images/loading01.gif';
var closeButton = 'images/close12.gif';





//
// getPageScroll()
// Returns array with x,y page scroll values.
// Core code from - quirksmode.org
//
function getPageScroll(){

        var yScroll;

        if (self.pageYOffset) {
                yScroll = self.pageYOffset;
        } else if (document.documentElement && document.documentElement.scrollTop){         // Explorer 6 Strict
                yScroll = document.documentElement.scrollTop;
        } else if (document.body) {// all other Explorers
                yScroll = document.body.scrollTop;
        }

        arrayPageScroll = new Array('',yScroll)
        return arrayPageScroll;
}




// getPageSize()
// Returns array with page width, height and window width, height
// Core code from - quirksmode.org
// Edit for Firefox by pHaez

function getPageSize(){

        var xScroll, yScroll;

        if (window.innerHeight && window.scrollMaxY) {
                xScroll = document.body.scrollWidth;
                yScroll = window.innerHeight + window.scrollMaxY;
        } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
                xScroll = document.body.scrollWidth;
                yScroll = document.body.scrollHeight;
        } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
                xScroll = document.body.offsetWidth;
                yScroll = document.body.offsetHeight;
        }

        var windowWidth, windowHeight;
        if (self.innerHeight) {        // all except Explorer
                windowWidth = self.innerWidth;
                windowHeight = self.innerHeight;
        } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
                windowWidth = document.documentElement.clientWidth;
                windowHeight = document.documentElement.clientHeight;
        } else if (document.body) { // other Explorers
                windowWidth = document.body.clientWidth;
                windowHeight = document.body.clientHeight;
        }

        // for small pages with total height less then height of the viewport
        if(yScroll < windowHeight){
                pageHeight = windowHeight;
        } else {
                pageHeight = yScroll;
        }

        // for small pages with total width less then width of the viewport
        if(xScroll < windowWidth){
                pageWidth = windowWidth;
        } else {
                pageWidth = xScroll;
        }


        arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
        return arrayPageSize;
}



// pause(numberMillis)
// Pauses code execution for specified time. Uses busy code, not good.
// Code from http://www.faqts.com/knowledge_base/view.phtml/aid/1602

function pause(numberMillis) {
        var now = new Date();
        var exitTime = now.getTime() + numberMillis;
        while (true) {
                now = new Date();
                if (now.getTime() > exitTime)
                        return;
        }
}


// getKey(key)
// Gets keycode. If 'x' is pressed then it hides the lightbox.


function getKey(e){
        if (e == null) { // ie
                keycode = event.keyCode;
        } else { // mozilla
                keycode = e.which;
        }
        key = String.fromCharCode(keycode).toLowerCase();

        if(key == 'x'){ hideLightbox(); }
}


//
// listenKey()
//
function listenKey () {        document.onkeypress = getKey; }


//
// showLightbox()
// Preloads images. Pleaces new image in lightbox then centers and displays.
//
function showLightbox(objLink)
{
        // prep objects
        var objOverlay = document.getElementById('overlay');
        var objLightbox = document.getElementById('lightbox');
        var objCaption = document.getElementById('lightboxCaption');
        var objImage = document.getElementById('lightboxImage');
        var objLoadingImage = document.getElementById('loadingImage');
        var objLightboxDetails = document.getElementById('lightboxDetails');


        var arrayPageSize = getPageSize();
        var arrayPageScroll = getPageScroll();

        // center loadingImage if it exists
        if (objLoadingImage) {
                objLoadingImage.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - objLoadingImage.height) / 2) + 'px');
                objLoadingImage.style.left = (((arrayPageSize[0] - 20 - objLoadingImage.width) / 2) + 'px');
                objLoadingImage.style.display = 'block';
        }

        // set height of Overlay to take up whole page and show
        objOverlay.style.height = (arrayPageSize[1] + 'px');
        objOverlay.style.display = 'block';

        // preload image
        imgPreload = new Image();

        imgPreload.onload=function(){
                objImage.src = objLink.href;

                // center lightbox and make sure that the top and left values are not negative
                // and the image placed outside the viewport
                var lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - imgPreload.height) / 2);
                var lightboxLeft = ((arrayPageSize[0] - 20 - imgPreload.width) / 2);

                objLightbox.style.top = (lightboxTop < 0) ? "0px" : lightboxTop + "px";
                objLightbox.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";


                objLightboxDetails.style.width = imgPreload.width + 'px';

                if(objLink.getAttribute('title')){
                        objCaption.style.display = 'block';
                        //objCaption.style.width = imgPreload.width + 'px';
                        objCaption.innerHTML = objLink.getAttribute('title');
                } else {
                        objCaption.style.display = 'none';
                }

                // A small pause between the image loading and displaying is required with IE,
                // this prevents the previous image displaying for a short burst causing flicker.
                if (navigator.appVersion.indexOf("MSIE")!=-1){
                        pause(250);
                }

                if (objLoadingImage) {        objLoadingImage.style.display = 'none'; }

                // Hide select boxes as they will 'peek' through the image in IE
                selects = document.getElementsByTagName("select");
        for (i = 0; i != selects.length; i++) {
                selects[i].style.visibility = "hidden";
        }


                objLightbox.style.display = 'block';

                // After image is loaded, update the overlay height as the new image might have
                // increased the overall page height.
                arrayPageSize = getPageSize();
                objOverlay.style.height = (arrayPageSize[1] + 'px');

                // Check for 'x' keypress
                listenKey();

                return false;
        }

        imgPreload.src = objLink.href;

}





//
// hideLightbox()
//
function hideLightbox()
{
        // get objects
        objOverlay = document.getElementById('overlay');
        objLightbox = document.getElementById('lightbox');

        // hide lightbox and overlay
        objOverlay.style.display = 'none';
        objLightbox.style.display = 'none';

        // make select boxes visible
        selects = document.getElementsByTagName("select");
    for (i = 0; i != selects.length; i++) {
                selects[i].style.visibility = "visible";
        }

        // disable keypress listener
        document.onkeypress = '';
}




//
// initLightbox()
// Function runs on window load, going through link tags looking for rel="lightbox".
// These links receive onclick events that enable the lightbox display for their targets.
// The function also inserts html markup at the top of the page which will be used as a
// container for the overlay pattern and the inline image.
//
function initLightbox()
{

        if (!document.getElementsByTagName){ return; }
        var anchors = document.getElementsByTagName("a");

        // loop through all anchor tags
        for (var i=0; i<anchors.length; i++){
                var anchor = anchors[i];

                if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "lightbox")){
                        anchor.onclick = function () {showLightbox(this); return false;}
                }
        }

        // the rest of this code inserts html at the top of the page that looks like this:
        //
        // <div id="overlay">
        //                <a href="#" onclick="hideLightbox(); return false;"><img id="loadingImage" /></a>
        //        </div>
        // <div id="lightbox">
        //                <a href="#" onclick="hideLightbox(); return false;" title="zum Schließen irgendwo klicken">
        //                        <img id="closeButton" />
        //                        <img id="lightboxImage" />
        //                </a>
        //                <div id="lightboxDetails">
        //                        <div id="lightboxCaption"></div>
        //                        <div id="keyboardMsg"></div>
        //                </div>
        // </div>

        var objBody = document.getElementsByTagName("body").item(0);

        // create overlay div and hardcode some functional styles (aesthetic styles are in CSS file)
        var objOverlay = document.createElement("div");
        objOverlay.setAttribute('id','overlay');
        objOverlay.onclick = function () {hideLightbox(); return false;}
        objOverlay.style.display = 'none';
        objOverlay.style.position = 'absolute';
        objOverlay.style.top = '0';
        objOverlay.style.left = '0';
        objOverlay.style.zIndex = '90';
         objOverlay.style.width = '100%';
        objBody.insertBefore(objOverlay, objBody.firstChild);

        var arrayPageSize = getPageSize();
        var arrayPageScroll = getPageScroll();

        // preload and create loader image
        var imgPreloader = new Image();

        // if loader image found, create link to hide lightbox and create loadingimage
        imgPreloader.onload=function(){

                var objLoadingImageLink = document.createElement("a");
                objLoadingImageLink.setAttribute('href','#');
                objLoadingImageLink.onclick = function () {hideLightbox(); return false;}
                objOverlay.appendChild(objLoadingImageLink);

                var objLoadingImage = document.createElement("img");
                objLoadingImage.src = loadingImage;
                objLoadingImage.setAttribute('id','loadingImage');
                objLoadingImage.style.position = 'absolute';
                objLoadingImage.style.zIndex = '150';
                objLoadingImageLink.appendChild(objLoadingImage);

                imgPreloader.onload=function(){};        //        clear onLoad, as IE will flip out w/animated gifs

                return false;
        }

        imgPreloader.src = loadingImage;

        // create lightbox div, same note about styles as above
        var objLightbox = document.createElement("div");
        objLightbox.setAttribute('id','lightbox');
        objLightbox.style.display = 'none';
        objLightbox.style.position = 'absolute';
        objLightbox.style.zIndex = '100';
        objBody.insertBefore(objLightbox, objOverlay.nextSibling);

        // create link
        var objLink = document.createElement("a");
        objLink.setAttribute('href','#');
        objLink.setAttribute('title','Klicken zum Schließen');
        objLink.onclick = function () {hideLightbox(); return false;}
        objLightbox.appendChild(objLink);

        // preload and create close button image
        var imgPreloadCloseButton = new Image();

        // if close button image found,
        imgPreloadCloseButton.onload=function(){

                var objCloseButton = document.createElement("img");
                objCloseButton.src = closeButton;
                objCloseButton.setAttribute('id','closeButton');
                objCloseButton.style.position = 'absolute';
                objCloseButton.style.zIndex = '200';
                objLink.appendChild(objCloseButton);

                return false;
        }

        imgPreloadCloseButton.src = closeButton;

        // create image
        var objImage = document.createElement("img");
        objImage.setAttribute('id','lightboxImage');
        objLink.appendChild(objImage);

        // create details div, a container for the caption and keyboard message
        var objLightboxDetails = document.createElement("div");
        objLightboxDetails.setAttribute('id','lightboxDetails');
        objLightbox.appendChild(objLightboxDetails);

        // create caption
        var objCaption = document.createElement("div");
        objCaption.setAttribute('id','lightboxCaption');
        objCaption.style.display = 'none';
        objLightboxDetails.appendChild(objCaption);

        // create keyboard message
        var objKeyboardMsg = document.createElement("div");
        objKeyboardMsg.setAttribute('id','keyboardMsg');
        objKeyboardMsg.innerHTML = 'Foto anklicken <a href="#" onclick="hideLightbox(); return false;"><kbd></kbd></a> zum Schließen';
        objLightboxDetails.appendChild(objKeyboardMsg);


}




//
// addLoadEvent()
// Adds event to window.onload without overwriting currently assigned onload functions.
// Function found at Simon Willison's weblog - http://simon.incutio.com/
//
function addLoadEvent(func)
{
        var oldonload = window.onload;
        if (typeof window.onload != 'function'){
            window.onload = func;
        } else {
                window.onload = function(){
                oldonload();
                func();
                }
        }

}

setTimeout ("initLightbox()", 1000);

//addLoadEvent(initLightbox);        // run initLightbox onLoad







function FotoWindow2(bildurl,b,h,bildtitel)
{
var eigenschaften,sbreite,shoehe,fenster,b,h;


var FestePosition = "nein";
VonLinks = 20;
VonOben = 20;

if(FestePosition == "ja") {
x = VonLinks;
y = VonOben;
} else {

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;
//shoehe = document.documentElement.clientHeight;
}

x = parseInt((sbreite-b)/2);
y = parseInt((shoehe-h)/2);

}

if(isNaN(b) == false)
   {
   b=parseInt(b);
   }
if(isNaN(h) == false)
   {
   h=parseInt(h);
   }

eigenschaften="left="+x+",top="+y+",width="+b+",height="+h+",menubar=no,toolbar=no,location=no,status=no,scrollbars=no";

fenster=window.open("","",eigenschaften);
fenster.focus();
fenster.document.open();
with (fenster) {
  document.write('<html><head>');
  document.write('<scr' + 'ipt type="text/javascr' + 'ipt" language="JavaScr' + 'ipt">');
  document.write("function click() { window.close(); } ");  // bei click  schliessen
  document.write("document.onmousedown=click ");
  document.write('</scr' + 'ipt>');
  document.write('<title>'+ bildtitel +'</title></head>');
  document.write('<' + 'body onblur="window.close();" ');// bei Focusverlust schliessen
  document.write('marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">');
  document.write('<img src="'+ bildurl +'"border="1">');
  document.write('</body></html>');
  fenster.document.close();
}
}


// mit Rand
// W. Janen  - web-toolbox.net
// wenn eine feste Position für die Anzeige gewünscht wird
// dann für die Variable 'FestePosition' ein "ja" eintragen
// und die X- / Y-Werte (linke obere Ecke) hier eintragen


function FotoWindow(bildurl,b,h,bildtitel)
{

var eigenschaften,sbreite,shoehe,fenster,b,h;

var FestePosition = "nein";
VonLinks = 20;
VonOben = 20;

if(FestePosition == "ja") {
x = VonLinks;
y = VonOben;
} else {

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;
//shoehe = document.documentElement.clientHeight;
}

x = parseInt((sbreite-b)/2);
y = parseInt((shoehe-h)/2);

}

if(isNaN(b) == false)
   {
   b=parseInt(b);
   }
if(isNaN(h) == false)
   {
   h=parseInt(h);
   }

b = b + 122;
h = h + 122;

eigenschaften="left="+x+",top="+y+",width="+b+",height="+h+",menubar=no,toolbar=no,location=no,status=no,scrollbars=no";

fenster=window.open("","",eigenschaften);
fenster.focus();
fenster.document.open();
with (fenster) {
  document.write('<html><head>');
  document.write('<scr' + 'ipt type="text/javascr' + 'ipt" language="JavaScr' + 'ipt">');
  document.write("function click() { window.close(); } ");
  document.write("document.onmousedown=click ");
  document.write('</scr' + 'ipt>');
  document.write('<title>'+ bildtitel +'</title></head>');
  document.write('<' + 'body bgcolor="#FFFFFF" onblur="window.close();" ');
  document.write('marginwidth="60" marginheight="60" leftmargin="60" topmargin="60">');
  document.write('<img src="'+ bildurl +'"border="1">');
  document.write('</body></html>');
  fenster.document.close();
}
}
