// Script für MO-Bild #############
var B_Type = new crossBrowserType();
function crossBrowserType() {
	this.IE = false;
	this.NS4 = false;
	this.NS6 = false;
	this.id = "";

	if (document.all) {this.IE = true; this.id = "IE";}
	else if (document.getElementById) {this.NS6 = true; this.id = "NS6";}
	else if (document.layers) {this.NS4 = true; this.id = "NS4";}
}
//##################
var crossMouseX, crossMouseY;
if (B_Type.NS4) document.captureEvents(Event.MOUSEMOVE);

function crossMousePosition(e) {
	if (B_Type.IE) {
		crossMouseX=event.x + document.body.scrollLeft; 
		crossMouseY=event.y + document.body.scrollTop;
	}
	else {crossMouseX=e.pageX; crossMouseY=e.pageY;}
}
//#####################

layer = null;
yKorrektur = 0;
document.onmousemove = mousepos;
function mousepos(e) {
  if ((layer != null && layer.style.display == 'block')) {	
	crossMousePosition(e);
	x = crossMouseX;
	y = crossMouseY
	
    layer.style.left = (x + 40) + "px";
	layer.style.top   = (y - yKorrektur) + "px";
  }
}
function showLayer(img) {
  layer = document.getElementById("bildGross");
  imgBig = img.replace("klein", "gross");
  layer.innerHTML = "<img id='img' src='" + imgBig + "' />";
  layer.style.display = "block";
  yKorrektur = document.getElementById("img").height;
}
function hideLayer() {
  layer.style.display = "none";
}
