function fenster(url)  {
   Fenster = window.open(url,"Bilder","toolbar=no,menubar=no,scrollbars=yes,top=0,left=0,width=700,height=700")
   Fenster.focus();
}

function zu(){
  if (Fenster != null)
	if (!Fenster.closed)
         Fenster.close();
}

if(document.images) {
  var normal=new Image();
  normal.src="/images/navi/1_leave.jpg";
  var over=new Image();
  over.src="/images/navi/1_take.jpg";
}

function take(imgid) {
  if(document.images) {
      document['img'+imgid].src=over.src;
  }
}

function leave(imgid) {
   if(document.images) {
      document['img'+imgid].src=normal.src;
   }
}

function ViewImage(ifile,ix,iy,ititle) {
  var win;
  var sWidth;
  var sHeight;
  var NS = (document.layers) ? 1 : 0;
  win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");
  if (NS) {
    sWidth = win.innerWidth;
    sHeight = win.innerHeight;
  }
  else {
    sWidth = win.document.body.clientWidth;
    sHeight = win.document.body.clientHeight;
  }
  if(sWidth!=ix || sHeight!=iy) {
    win.close();
    setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
    return;
  }
  win.document.open();
  win.document.write("<html><head><title>"+ititle+"</title>");
  win.document.write("</head><body>");
  win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
  win.document.write("<img src="+ifile+"></div></body></html>");
  win.document.close();
}

function bilder(file,title) {
  var win;
  var sWidth;
  var sHeight;
//  var NS = (document.layers) ? 1 : 0;

  win = window.open("","imageviewer","menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no, width=600,height=640");
  win.document.open();
  win.document.write("<html><head><title>"+title+"</title>");
  win.document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/style.css\"></head><body>");
  win.document.write("<center><img src="+file+" /><br /><b>"+title+"</b></center></body></html>");
  win.document.close();
}
