w = 900; h = 600;
zoomw = 100; zoomh = 100;
var tu = 0; var ti = 0;
var tx = 0;

function vermessen2 () {
	tx = document.getElementById("testbildchen").offsetLeft;
tu = document.getElementById("untermenu").offsetLeft;
ti = document.getElementById("inhalt").offsetLeft;
tdif = ti - tu - tx - 2;

if (tdif != 0)
	document.getElementById("inhalt").style.left = ((ti-tdif)-1) + "px";
}

function vermessen () {
	if (window.innerWidth)
		weite = window.innerWidth; else
	if (document.body && document.body.offsetWidth)
		weite = document.body.offsetWidth;

w = document.getElementById("zaehler").offsetLeft + 106;
h = document.getElementById("zaehler").offsetTop + 30 + 222;

//	var trans = "<a href=\"javascript: BildAus()\"><img src=\"essen-implantatzentrum/Bilder/transparent.gif\" width=\""+(w-6)+"\" height=\""+(h-3)+"\" border=\"0\"></a>";
//	document.getElementById("graugrund").innerHTML = trans;

document.getElementById("zoombild").style.left = (w/2-50) + "px";
document.getElementById("zoombild").style.top = (h/2-50) + "px";
	vermessen2();
Menuposition(w);
}

function BildAn (adr, titel, x, y) {

document.getElementById("inhalt").style.backgroundColor="#5E5E5A";
	graunummer = new Array ( 5, 14, 5, 14, 5, 10);
var grauton = "#";
	for ( i = 1; i <= 6; i++)
	grauton = grauton + Graufarben[graunummer[i-1]];
document.getElementById("untermenu").style.backgroundColor = grauton;

t = "<br><center>"+titel+"</center>";
document.getElementById("zoombild").innerHTML = t;
//	document.getElementById("graugrund").style.display = "block";
document.getElementById("zoombild").style.display = "block";
groesser (adr, x, y);
}

function groesser (a, b, c) {
adr = a; x = b; y = c;
if ( zoomh < y ) {
zoomh = zoomh + 3;
document.getElementById("zoombild").style.top = (h/2-50-((zoomh-100)/2)) + "px";
document.getElementById("zoombild").style.height = (zoomh-2) + "px";
document.getElementById("zoombild").innerHTML = t + "<br><center><small>"+Math.floor((zoomh/y)*50)+"%</small></center>";
window.setTimeout("groesser(adr, x, y)", 1);
	} else
breiter (adr, x, y);
}

function breiter (a, b, c) {
adr = a; x = b; y = c;
if ( zoomw < x ) {
zoomw = zoomw + 4;
document.getElementById("zoombild").style.left = (w/2-50-((zoomw-100)/2)) + "px";
document.getElementById("zoombild").style.width = zoomw + "px";
document.getElementById("zoombild").innerHTML = t + "<br><center><small>"+Math.floor((zoomw/x)*50+48)+"%</small></center>";
window.setTimeout("breiter(adr, x, y)", 1);
	} else
gross (adr, x, y);
}

function gross (adr, x, y) {
document.getElementById("zoombild").innerHTML = "<img src=\"essen-implantatzentrum/Bilder/"+adr+"\" width=\""+x+"\" height=\""+y+"\" border=\"0\"><div style=\"float: right;\"><button type=\"button\" style=\"color: #100060; background-color: #836832; position: relative; top: -26px; left: 0px;\" onclick=\"top.location='javascript: BildAus()'\">schlie&szlig;en</button></div>";
    document.bgColor = "#E0E2E4";
}

function BildAus () {
//	document.getElementById("graugrund").style.display = "none";
document.getElementById("zoombild").style.display = "none";

document.getElementById("inhalt").style.backgroundColor="#D4D4D2";
FarbWechsel();

document.getElementById("zoombild").style.left = (w/2-50) + "px";
document.getElementById("zoombild").style.top = (h/2-50) + "px";
zoomw = 100; zoomh = 100;
document.getElementById("zoombild").style.width = zoomw + "px";
document.getElementById("zoombild").style.height = zoomh + "px";
}
