doc = document;
bilder = "/Bilder/Menue/";
actItem = -2;
actImg = "";
descr = new Array(
  "zur Startseite",
  "Vorstand, Spiellokal, Chronik, ...", // unser Verein
  "Aufstellung, Termine, Ergebnisse", // Mannschaften
  "Termine, Tabellen, ...", // Turniere
  "Termine, Tabellen, ...", // Jugendschach
  "DWZ-Liste", // DWZ
  "Presse-<br>artikel", // Presse
  "Biografie, Problemschach", // Orlimont
  "natürlich immer mit Schach", // bes. Aktivitaeten
  "Verweise in die weite Welt", // Links
  "Ihr Kommentar bitte", // Gaestebuch
  "", // Impressum
  ""  // Partien
);

var f = null, foto;
var bild,descript,titel;
var fwidth, fheight;

function highlightImage(bildnr, bildname) {
  if (actItem != bildnr) {
    if(bildnr >= 0)
      eval("window.doc."+bildname).src = bilder+bildname+"Hw.gif";
    if (document.layers) {
      doc.nsLayer.document.open();
      doc.nsLayer.document.write(descr[bildnr+1]);
      doc.nsLayer.document.close();
    }
    else if (document.all)
      doc.all.ms.innerHTML = descr[bildnr+1];
  }
}

function resetImage(bildnr, bildname) {
  if (actItem != bildnr) {
    if(bildnr >= 0)
      eval("window.doc."+bildname).src = bilder+bildname+"w.gif";
    if (document.layers) {
      doc.nsLayer.document.open();
      doc.nsLayer.document.write("");
      doc.nsLayer.document.close();
    }
    else if (document.all)
      doc.all.ms.innerHTML = "";
  }
}

function setImage(bildnr, bildname) {
  nr = actItem;
  actItem = bildnr;
  if (nr >= 0)
    resetImage(nr, actImg);
  else {
    if (doc.layers) {
      doc.nsLayer.document.open();
      doc.nsLayer.document.write("");
      doc.nsLayer.document.close();
    }
    else if (document.all)
      doc.all.ms.innerHTML = "";
  }
  actImg = bildname;
  eval("window.doc."+bildname).src = bilder+bildname+"Hw.gif";
}

function showImage(img, d, align, t) {
  bild = img;
  descript = d;
  titel = t;
  if (align=='h') {
    f = window.open("bb.html", "Bilder", "width=440,height=380,scrollbars,resizable");
    //f.resizeTo(fwidth,fheight);
  }
  else if (align=='v') {
    f = window.open("bb.html", "Bilder", "width=300,height=470,scrollbars,resizable");
    //f.resizeTo(320,495);
  }
  else f=window.open("bb.html", "Bilder", "width=450,height=470,scrollbars,resizable");
  f.document.close();
  f.focus();
  foto = new Image();
  foto.onload = bildda;
  foto.onerror = bildfehler;
  foto.src = "/Bilder/"+bild;
}

function bildda(event) {
  this.onerror=null; this.onload=null;
  if (f != null) {
    f.document.open();
    f.document.writeln("<html><head><title>"+titel+"</title></head>");
    f.document.writeln("<body bgproperties=fixed background='Bilder/klublogo-c3b.gif'>");
    f.document.writeln("<center><img src='/Bilder/"+bild+"' alt='"+unescape(descript)+"'><br>"+descript+"</center>");
    f.document.writeln("<table align='right'><tr><td><a href='javascript:window.close()'><small>Fenster schließen</small></a></td></tr></table></body></html>");
    f.document.close();
    f.resizeTo(foto.width+50, foto.height+80);
  }
  //else alert("kein f");
}

function bildfehler(event) {
  this.onerror=null; this.onload=null;
  alert("Das Bild konnte nicht geladen werden!");
  if (f != null)  f.close();
}
