var projektname = "Eckhart Dietz";
document.title=projektname;
var seite = document.location.href;
if (seite == "http://www.eckhart-dietz.de/") {seite=seite + "index.htm";}

// Menu
// ------------------------------------------------------------------------------------
function MenuPunkt(linkziel, linktext)
{
 this.linkziel=linkziel;
 this.linktext=linktext;
}
var z = new Array;
var zi=0;
z[zi++]=new MenuPunkt("index.htm","Startseite");
z[zi++]=new MenuPunkt("edleben.htm","Vita");
z[zi++]=new MenuPunkt("edguss.htm","Metallguss");
z[zi++]=new MenuPunkt("edbesuch.htm","Besuch");
z[zi++]=new MenuPunkt("edtanz.htm","Tanz");
z[zi++]=new MenuPunkt("edlehre.htm","Lehrtätigkeit");
z[zi++]=new MenuPunkt("edgalerie.htm","Galerie");
z[zi++]=new MenuPunkt("edveroeff.htm","Veröffentlichungen");
z[zi++]=new MenuPunkt("edkontakt.htm","Kontakt");
z[zi++]=new MenuPunkt("edimpressum.htm","Impressum");

function MenuAnzeigen()
{
 for (var zx=0; zx<zi; zx++)
 {
  // alert(zx); 
  document.write("<a class='menupunkt' id='a" + (zx+1) + "' href='" + z[zx].linkziel);
  document.write("' onmouseover='MenuMaus(a" + (zx+1) + ",1,seite);' onmouseout='MenuMaus(a" + (zx+1));
  document.write(",0,seite);'>" + z[zx].linktext + "</a><br><br>");
 }
}
function MenuMaus(a,maus,seite)
{
 if (maus == 0)
 {
  // alert(a+"   -   "+seite); 
  if (seite == a) {a.className = "menupunktaktiv"}
             else {a.className = "menupunkt"}
 }
 else
 {
  if (seite == a) {a.className = "menupunktaktiv"}
             else {a.className = "menupunktmaus"}
 }
}
// Seite initialisieren
// ------------------------------------------------------------------------------------
function SeiteInit(seite)
{
 // alert(navigator.userAgent);
 var a_Count;
 var ix;
 var img_suffix = "index"; 
 a_Count = document.anchors.length;
 // alert (document.title);
 for (ix=0;ix<a_Count;ix++)
 {
  if (document.anchors[ix] == seite)
  {
   document.anchors[ix].className = "menupunktaktiv";
   document.title=document.title + ": " + z[ix].linktext;
   // alert (document.title);
   document.all("h1titel").innerText=z[ix].linktext;
   
   img_suffix = z[ix].linkziel.substr(0,z[ix].linkziel.length-4);
   window.document.head1.src = "images/edhead1-" + img_suffix + ".jpg"; 

  }
 }
 TitelInit();
}
// Titel einblenden 255,255,159 -> 0,0,0 (nur IE, nicht NS)
// ------------------------------------------------------------------------------------
var col1=255;
var col2=0;
var step=3;
function TitelInit()
{
 if (document.all)
 {
  document.all("h1titel").style.color="rgb(255,255,159)";
  TitelEinblenden();
 }
}
function TitelEinblenden()
{
 col1=col1-step;
 if (col1<step) {col1=0}
 if (document.all) {document.all("h1titel").style.color="rgb("+col1+","+col1+","+col2+")";}
 if (col1>step) {window.setTimeout("TitelEinblenden()",5);}
 return;
}
// Neues Browserfenster öffnen
// ------------------------------------------------------------------------------------
var newwin;
var hoch = screen.height*0.85;
var links = screen.width-720;
function NeuesFenster(sURL,f)
{
 switch(f)
 {
  case "0": // ohne Menüleiste 
   newwin = window.open(sURL,"_blank","left="+links+",top=0,width=700,height="+(hoch-120)+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no");
   break;
  case "1": // mit Menüleiste für andere Websites u.ä.
   newwin = window.open(sURL,"_blank","left="+links+",top=0,width=700,height="+(hoch-120)+",resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,location,status");
   break;
  case "2": // ohne Menüleiste für Bilder aus Popup heraus 
   newwin = window.open(sURL,"dietz1","left="+links+",top=30,width=700,height="+(hoch-120)+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no");
   newwin.window.focus();
   break;
  case "3": // ohne Menüleiste in dasselbe Fenster für Presseberichte u.ä.
   newwin = window.open(sURL,"dietz2","left=20,top=0,width=600,height="+hoch+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no");
   newwin.window.focus();
   break;
  case "4": // PDF 
   newwin = window.open(sURL,"_blank","left="+links+",top=0,width=700,height="+(hoch-120)+",resizable=yes,scrollbars=yes,menubar=no,toolbar=no");
   break;
  case "5": // ohne Menüleiste in dasselbe Fenster für Audio
   newwin = window.open(sURL,"dietz5","left=350,top=150,width=380,height=350,resizable=yes,scrollbars=yes,menubar=no,toolbar=no");
   newwin.window.focus();
   break;
 }
} 
