//Bild öffnen
function OpenFenster(img){
foto= new Image();
foto.src=(img);
ControlFoto(img);
}
function ControlFoto(img){
if((foto.width!=0)&&(foto.height!=0)){
ViewFoto(img);
}
else{
interval_a="ControlFoto('"+img+"')";
interval_b=setTimeout(interval_a,20);
}
}
function ViewFoto(img){
width=foto.width+20;
height=foto.height+24;

try {
if (output.closed == false) throw "offen";
}
catch (e) {
if (e=="offen") {
output.close();
}
}
output=window.open("","output","left=50,top=50,width="+width+",height="+height+",location=no,toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no");
output.document.writeln("<html><head><title>Bild<\/title><\/head>");
output.document.writeln("<body bgcolor=\"#FBC679\" text=\"white\" link=\"#FBC679\" vlink=\"#FBC679\" alink=\"#FBC679\" leftmargin=\"0\" marginwidth=\"0\" topmargin=\"0\" marginheight=\"0\">");
output.document.writeln("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" height=\"100%\">");
output.document.writeln("<tr><td width=\"100%\" height=\"100%\" align=\"left\" valign=\"top\"><p><a href=\"javascript:self.close()\"><img src=\""+img+"\" width=\""+foto.width+"\" height=\""+foto.height+"\" border=\"10\" alt=\"Bitte klicken zum Fenster schliessen\"></a><\/p><\/td><\/tr>");
output.document.writeln("<\/table><\/body><\/html>");
output.document.close();
output.focus();
}

			
// öffnet idividuelle Pauschale Fenster
function MM_Fenster_oeffnen(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

// öffnet Bildfenster bei"Bad Elster"Seite Lage im Ort
function FensterOeffnen (Adresse, title, wwidth, wheight) {
  var wwidth;
  var wheight;
  var width;
  var height;
  var postop;
  var posleft;
  if (wwidth > 90) {wwidth = 50;}
  if (wheight > 90) {wheight = 80;}
  height  = (screen.availHeight / 100) * wheight;
  width   = (screen.availWidth  / 100) * wwidth;
  //postop  = (screen.availHeight - height) / 2;
  //posleft = (screen.availWidth  - width) / 2;
  postop  = 30;
  posleft = 50;

  dasFenster = window.open(Adresse, title, 'width=' + width + ', height=' + height + ', scrollbars=yes, top=' + postop +', left=' + posleft +', dependent=yes');
  dasFenster.focus();
}
