var IE4 = (document.all) ? true : false;
var NS4 = (document.layers) ? true : false;

function docjslib_doThisCommandEveryIntervalMS(command, interval) {
  setInterval(eval('"' + command + '"'), interval);
}
function docjslib_getWindowWidth() {
  if (NS4) {return window.innerWidth}
  else {return document.body.clientWidth}
}
function docjslib_getWindowHeight() {
  if (NS4) {return window.innerHeight}
  else {return document.body.clientHeight}
}
function docjslib_getPageScrollLeft() {
  if (NS4) {return window.pageXOffset}
  else {return document.body.scrollLeft}
}
function docjslib_getPageScrollTop() {
  if (NS4) {return window.pageYOffset}
  else {return document.body.scrollTop}
}
function docjslib_getSrc(id) {
  if (NS4) {return eval("document." + id + ".document." + id + "img.src")}
  else {return eval("document.all." + id + "img.src")}
}
function docjslib_setSrc(id, url) {
  if (NS4) {eval("document." + id + ".document." + id + "img").src = url}
  else {eval("document.all." + id + "img").src = url}
}
function docjslib_getWidth(id) {
  if (NS4) {return eval("document." + id + ".clip.width")}
  else {return eval("document.all." + id + ".style.pixelWidth")}
}
function docjslib_getVisibility(id) {
  if (NS4) {
    if (eval("document." + id).visibility == "show") return true
    else return false;
  }
  else {
   if (eval("document.all." + id).style.visibility == "visible") return true
    else return false;
  }
}
function docjslib_setVisibility(id, flag) {
  if (NS4) {
    var str = (flag) ? 'show' : 'hide';
    eval("document." + id).visibility = str;
  }
  else {
    var str = (flag) ? 'visible' : 'hidden';
    eval("document.all." + id).style.visibility = str;
  }
}
function docjslib_setPosFromLeft(id, xCoord) {
  if (NS4) {eval("document." + id).left = xCoord}
  else {eval("document.all." + id).style.left = xCoord}
}
function docjslib_setPosFromTop(id, yCoord) {
  if (NS4) {eval("document." + id).top = yCoord}
  else {eval("document.all." + id).style.top = yCoord}
}
function docjslib_setZposition(id, z) {
  if (NS4) {eval("document." + id).zIndex = z}
  else {eval("document.all." + id).style.zIndex = z}
}
function docjslib_findHighestZ() {
  var documentDivs = new Array();
  if (NS4) {documentDivs = document.layers}
  else {documentDivs = document.all.tags("DIV")};
  var highestZ = 0;
  for (var i = 0; i < documentDivs.length; i++) {
     var zIndex = (NS4) ? documentDivs[i].zIndex : documentDivs[i].style.zIndex;
     highestZ = (zIndex > highestZ) ? zIndex : highestZ;
  }
  return highestZ;
}
function docjslib_makeLinkedImage(imgID,    // given id
                   imgURL,         // image URL
                   imgHeight,      // image height
                   imgWidth,       // image width
                   imgAlt,         // alternative image
                   posFromLeft,    // absolute position from left of window
                   posFromTop,     // absolute position from top of window
                   imgVisibility,  // image visibility  (true of false)
                   imgZindex)      // image Z index
  {
  var visibility = (imgVisibility) ? 'visible' : 'hidden';
  document.write('<map name="2pic"><area SHAPE=RECT COORDS="0,0,25,23" ');
// testen der datei und übergeordnete datei setzen
URLname=window.location.pathname;
if ( URLname.search(/para-imp.html/)!=-1)   	document.write('HREF="index.html"');
if ( URLname.search(/para-imp-big.+/)!=-1)   	document.write('HREF="para-imp.html"');
if ( URLname.search(/agfa-optik.html/)!=-1)   	document.write('HREF="ephoto.html"');
if ( URLname.search(/rosen.html/)!=-1)		document.write('HREF="index.html"');
if ( URLname.search(/apo.html/)!=-1)		document.write('HREF="index.html"');
if ( URLname.search(/bk-big.+/)!=-1)   		document.write('HREF="bk.html"');
if ( URLname.search(/apo-big.+/)!=-1)   	document.write('HREF="apo.html"');
if ( URLname.search(/rosen-big.+/)!=-1)   	document.write('HREF="rosen.html"');
if ( URLname.search(/ephoto.html/)!=-1)   	document.write('HREF="index.html"');
if ( URLname.search(/bk.html/)!=-1)   		document.write('HREF="../index.html"');
if ( URLname.search(/pancam.+._eng.html/)!=-1) 	document.write('HREF="spiegel-selfmade_eng.html"');
if ( URLname.search(/spiegel-panorama.html/)!=-1)document.write('HREF="index.html"');
if ( URLname.search(/spiegel-panorama_eng.+/)!=-1)document.write('HREF="index_eng.html"');
if ( URLname.search(/spiegel-selfmade_eng.+/)!=-1)document.write('HREF="spiegel-panorama_eng.html"');
if ( URLname.search(/spiegel-selfmade.html/)!=-1)document.write('HREF="spiegel-panorama.html"');
if ( URLname.search(/pancam.+/)!=-1)   		document.write('HREF="spiegel-selfmade.html"');
if ( URLname.search(/ncp-opt.+/)!=-1)   	document.write('HREF="ncp4500-optik.html"');
if ( URLname.search(/ncp-opt-tele.php/)!=-1)   	document.write('HREF="ncp-opt-tele.html"');
if ( URLname.search(/ncp-ww.php/)!=-1)   	document.write('HREF="ncp-opt-ww.html"');
if ( URLname.search(/ncp-cl.php/)!=-1)   	document.write('HREF="ncp-opt-cl.html"');
if ( URLname.search(/ncp4500-optik.html/)!=-1)  document.write('HREF="ncp4500.html"');
if ( URLname.search(/ncp4500.html/)!=-1) 	document.write('HREF="index.html"');
if ( URLname.search(/index.html/)!=-1) 		document.write('HREF="../index.html"');
if ( URLname.search(/muehlen.html/)!=-1) 	document.write('HREF="index.html"');
if ( URLname.search(/flugplatz.html/)!=-1) 	document.write('HREF="index.html"');
if ( URLname.search(/schloss.html/)!=-1) 	document.write('HREF="index.html"');
if ( URLname.search(/frosch.html/)!=-1) 	document.write('HREF="index.html"');
if ( URLname.search(/3d+/)!=-1) 		document.write('HREF="index.html"');

  else
	document.write('HREF="javascript:history.go(-1)"');

  document.write('ALT="Zurück"><area SHAPE=RECT COORDS="26,0,50,23" HREF="../index.html" ALT="Startseite"></map>', // by crosus
    '<STYLE TYPE="text/css">',
    '#', imgID, ' {',
      'position: absolute;',
      'visibility: ', visibility, ';',
      'left: ', posFromLeft, ';',
      'top: ', posFromTop, ';',
      'width: ', imgWidth, ';',
      'z-index:', imgZindex,
    '}',
    '</STYLE>',
    '<DIV ID="', imgID, '">',
    '<A TARGET="_top">',
    '<IMG NAME="', imgID, 'img" ID="', imgID, 'img" SRC="', imgURL, '" ALT="', imgAlt, 
    '" BORDER="0" USEMAP="#2pic"', 'HEIGHT="', imgHeight, '" WIDTH="', imgWidth, '">',
    '</A></DIV>'
  );
}

var windowWidth= 0;
var windowHeight= 0;
var pageScrollLeft= 0;
var pageScrollTop= 0;
var imageWidth= 50;
var imageHeight= 23;
var rightSpacer= 30;
var bottomSpacer= 30;

function waterMark(){
  if (navigator.appVersion.indexOf("Mac") == -1){
    oldWindowWidth= windowWidth;
    oldWindowHeight= windowHeight;
    oldPageScrollLeft= pageScrollLeft;
    oldPageScrollTop= pageScrollTop;
    windowWidth = docjslib_getWindowWidth();
    windowHeight = docjslib_getWindowHeight();
    pageScrollLeft = docjslib_getPageScrollLeft();
    pageScrollTop = docjslib_getPageScrollTop();
    if ((windowHeight != oldWindowHeight)||(windowWidth != 
      oldWindowWidth)||(pageScrollLeft != oldPageScrollLeft)||
      (pageScrollTop != oldPageScrollTop)){

      docjslib_setPosFromTop("docjslib", windowHeight + pageScrollTop - 
                            (imageHeight + bottomSpacer));
      docjslib_setPosFromLeft("docjslib", windowWidth + pageScrollLeft - 
                            (imageWidth + rightSpacer));
      var topZ = docjslib_findHighestZ();
      docjslib_setZposition("docjslib", topZ);
    }
  }
}
docjslib_makeLinkedImage("docjslib",             // id
              "../nav.gif",                    // image URL
              23,                                // height
              50,                               // width
              "Zurück / Startseite",  				// alternative
              916,                                 // position from left
              519,                                 // position from top
              true,                              // visibility
              0);                             // z index
             
docjslib_doThisCommandEveryIntervalMS("waterMark()", 100);
// -->
