var ImageFolder = "0"; // preload images

function main() {
	var m;
  m = menue("m1", 0, 247);m.addLink("Sophienklinik", "klinik-stuttgart.html");m.addLink("Dr. Kotzur", "dr-kotzur.html");m.addLink("Prof. Dr. Oellinger", "prof-dr-oellinger.html");m.addLink("Dr. Fuchshuber", "dr-fuchshuber.html");m.addLink("Team", "team-plastische-chirurgie.html");m.addLink("Operation", "operation.html");m.addLink("Narkose", "narkose.html"); m.write(); m = menue("m2", 0, 319);m.addLink("Brustvergrößerung", "brustvergroesserung.html");m.addLink("Brustvergrößerung mit Eigenfett", "brustvergroesserung-eigenfett.html");m.addLink("Brustverkleinerung und Bruststraffung", "bruststraffung.html"); m.write(); m = menue("m3", 0, 387);m.addLink("Fettabsaugung", "fettabsaugung.html");m.addLink("Männliche Fettbrust", "gynaekomastie.html");m.addLink("Bauchdeckenstraffung", "bauchdeckenstraffung.html");m.addLink("Oberarmstraffung", "oberarmstraffung.html");m.addLink("Oberschenkelstraffung", "fettabsaugen-oberschenkel.html");m.addLink("Schamlippenkorrektur", "schamlippenkorrektur.html");m.addLink("Haartransplantation", "haartransplantation.html"); m.write(); m = menue("m4", 0, 466);m.addLink("Faltenbehandlung", "falten.html");m.addLink("Lidstraffung", "lidstraffung.html");m.addLink("Stirnlifting", "stirnlifting.html");m.addLink("Gesichtsstraffung", "gesichtsstraffung.html");m.addLink("Nasenkorrektur", "nasenkorrektur.html");m.addLink("Kinnkorrektur", "kinnkorrektur.html");m.addLink("Ohrkorrektur", "ohrkorrektur.html"); m.write(); m = menue("m5", 0, 548);m.addLink("Promi-Talk", "promi-talk.html"); m.write(); m = menue("m6", 0, 627);m.addLink("Kontaktformular", "kontakt.html");m.addLink("Presse", "presse.html");m.addLink("Ratenzahlung", "ratenzahlung.html");m.addLink("Sprechzeiten", "sprechzeiten.html");m.addLink("Anfahrt", "anfahrt.html");m.addLink("Kooperationen", "kooperationen.html");m.addLink("Impressum", "impressum.html"); m.write();
	OK = true;
}
var OK = false; // Funktionen fuer das Menue
function overImage(img){
	if (document.images){
  	// document.images[img].src=eval(img + "_over.src");
  }
}
function upImage(img){
	if (document.images){
      // document.images[img].src=eval(img + "_up.src");
  }
}
if(document.layers) {
	window.captureEvents(Event.MOUSEUP);
	window.onmouseup=hide_all;
}
else {
	document.onmouseup=hide_all;
}
function show_layer(x) {
 // if (OK)
  {
    if(document.layers) document.layers[x].visibility="show";
    if (document.all) document.all[x].style.visibility="visible";
    if ((document.getElementById)&& (!document.all))  document.getElementById(x).style.visibility="visible";
  }
}

function hide_layer(x) { // if (OK)
{
  if(document.layers)
     document.layers[x].visibility="hide";
  if (document.all) document.all[x].style.visibility="hidden";
  if ((document.getElementById)&& (!document.all)) document.getElementById(x).style.visibility="hidden";
}
}
function do_menu(x) {
	hide_all();
  show_layer(x);
  overImage(x+"_img");
}
function hide_all() {
	for (n=1; n<7; n++) {
  	eval("hide_layer('m"+n+"')");
    eval("upImage('m"+n+"_img')");
  }
}
function addLink(name, url) {
	url = ""+url;
	this.linkarray = this.linkarray.concat(new Array(new Array(name, url)));
}
function addSeparator() {
	this.linkarray = this.linkarray.concat(new Array("SEPARATOR"));
}
function writeMenue() {
	var str = "";
  str += '\n<div id="'+this.name+'" style="position:absolute; z-index:20; top:170px; left:'+this.leftPosition+'px; visibility:hide; visibility:hidden;">  \n';
  str += '<table bgcolor="'+this.border+'" cellspacing="0" cellpadding="0" border="0">\n';
  str += '<tr><td>\n';
  str += '<table background="" cellspacing="0" cellpadding="2" border="0" width="'+this.width+'">\n';
  for (i=0; i<this.linkarray.length; i++) { // links schreiben
    str += '        <tr valign="middle" height="20">\n';
    if (this.linkarray[i]=="SEPARATOR") {
    	str += '<td bgcolor="'+this.border+'"><img src="images/spacer.gif" height="1" width="1"></td>\n';
    }
    else {
      str += ' <td onmouseover="this.style.backgroundColor=\''+this.overcolor+'\'"\n';
      str += ' onclick="location.href=\''+this.linkarray[i][1]+'\'"\n';
      str += ' onmouseout="this.style.backgroundColor=\''+this.bgcolor+'\'" bgcolor="'+this.bgcolor+'"><ilayer><layer\n';
      str += ' width="'+this.width+'" onMouseover="this.bgColor=\''+this.overcolor+'\'\;" \n';
      str += ' onMouseout="this.bgColor=\''+this.bgcolor+'\';"><a href="'+this.linkarray[i][1]+'" \n';
      str += ' class="ddmenue">&nbsp;&nbsp;'+this.linkarray[i][0]+'&nbsp;&nbsp;</a></layer></ilayer></td> \n';
    }
    	str += '        </tr>\n';
	}
	    str += '</table>\n';
      str += '</td></tr>\n';
      str += '</table>\n';
      str +='</div>\n\n';
      // alert(this.linkarray.join("\n"));  // uncomment the next two lines to get debugging information
      // alert(str);
      document.write(str);
}
function menue(name, width, leftPosition) {
	this.border = "#ffffff";
	this.bgcolor = "#ffffff";
	this.overcolor = "#DEDDE6";
	this.name = name;
	this.width = width;
	this.leftPosition = leftPosition;
	this.linkarray = new Array();
	this.write = writeMenue;
	this.addLink = addLink;
	this.addSeparator = addSeparator;
	return this
}
function bka_writestyle(code, menu_code) {
	if (menu_code == code) {
  	document.write ('<span style="color:#fff;">');
  } else {
    document.write ('<span>');
  }
}

main(); // create the menues