// Öffnet PopUp mit größerem Bild
function zoom(titel, breite, hoehe, pfad) {
  zoomFenster = window.open("", "anzeige", "width=" + breite + ",height=" + hoehe + ", scrollbars=no, menubar=no, resizeable=0");
  zoomFenster.document.open();
  with (zoomFenster.document) {
  	writeln('<html><head><title>',titel,'</title></head>');
  	writeln('<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 onblur="window.close();" bgcolor="#EFEFEF">');
	writeln('<a href="javascript:self.close()"><img src="',pfad,'" border=0 alt="Klicken Sie auf das Bild, um das Fenster zu schliessen" width=',breite,' height=',hoehe,'></a>');
	writeln('</body></html>');
  }
  zoomFenster.document.close();
}

function popfenster(url, titel, breite, hoehe, left, top, scroll, menu) {
	window.open(url, "fenster", "width=" + breite + ",height=" + hoehe + ",left=" + left + ",top=" + top + ",scrollbars=" + scroll + ",menubar=" + menu + ", resizable=0");
}



// Liest X-Position eines Bildes aus
function getPosXfromPic(bild) {
	if (document.layers) {
    	return document.images[bild].x;
	}
	else if (document.all){
    	return getLeft(document.all[bild]);
  	}
	else if (document.getElementById) {
    	return getLeft(document.getElementById(bild));
	}
}

// Liest Y-Position eines Bildes aus
function getPosYfromPic(bild) {
	if (document.layers) {
    	return document.images[bild].y;
	}
	else if (document.all){
    	return getTop(document.all[bild]);
  	}
	else if (document.getElementById) {
    	return getTop(document.getElementById(bild));
	}
}

function getLeft(l) {
  if (l.offsetParent) return (l.offsetLeft + getLeft(l.offsetParent));
  else return (l.offsetLeft);
}

function getTop(l) {
  if (l.offsetParent) return (l.offsetTop + getTop(l.offsetParent));
  else return (l.offsetTop);
}

// blendet den nächsten Layer ein
function next(category, maxAnz) {
hideLayer(category+actLayer);
actLayer++;
if (actLayer > maxAnz) actLayer = 1;
showLayer(category+actLayer);

}

// blendet den vorherigen Layer ein
function previous(category, maxAnz) {
hideLayer(category+actLayer);
actLayer--;
if (actLayer < 1) actLayer = maxAnz;
showLayer(category+actLayer);
}

//positioniert Layer und blendet 1. Layer ein
function initLayers(category, maxAnzLayer) {
	for (i=maxAnzLayer;i>=1;i--) {
		var ebene = category + i;
		setLayerPos(ebene, xPos, yPos );
	}
	showLayer(ebene);
}

// verhindert NS Resize-Bug
function WM_netscapeCssFix() {
  if (document.WM.WM_netscapeCssFix.initWindowWidth != window.innerWidth || document.WM.WM_netscapeCssFix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function WM_netscapeCssFixCheckIn() {
  // This function checks to make sure the version of Netscape
  // in use contains the bug; if so, it records the window's
  // width and height and sets all resize events to be handled
  // by the WM_netscapeCssFix() function.
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.WM == 'undefined'){
      document.WM = new Object;
    }
    if (typeof document.WM.WM_scaleFont == 'undefined') {
      document.WM.WM_netscapeCssFix = new Object;
      document.WM.WM_netscapeCssFix.initWindowWidth = window.innerWidth;
      document.WM.WM_netscapeCssFix.initWindowHeight = window.innerHeight;
    }
    window.onresize = WM_netscapeCssFix;
  }
}

WM_netscapeCssFixCheckIn()
