// JavaScript Document
function OpenFoto(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=40,top=40,width="+width+",height="+height+",location=no,toolbar=no,menubar=no,status=no,scrol lbars=no,resizable=no");
output.document.writeln("<html><head><title>ABZ<\/title><\/head>");
output.document.writeln("<body bgcolor=\"white\" text=\"white\" link=\"white\" vlink=\"white\" alink=\"white\" 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=\"click here to close the window\"></a><\/p><\/td><\/tr>");
output.document.writeln("<\/table><\/body><\/html>");
output.focus();
}


function oeffnefenster (url) {
 fenster = window.open(url, "fenster1", "width=400,height=280,status=yes,scrollbars=no,resizable=no");
 fenster.focus();
 fenster.moveTo(
200, // X-Koordinate
200 // Y-Koordinate
); // der linken oberen Ecke
}


function oeffnefenster2 (url) {
	
	var breite = 500;
	var hoehe = 400;
	var positionX=((screen.availWidth / 2) - breite / 2);
	var positionY=((screen.availHeight / 2) - hoehe / 2);
	

	
	
 fenster = window.open(url, 
"fenster1",// Name des neuen Fensters
+"toolbar=0" // Toolbar
+",location=0" // Adress-Leiste
+",directories=0" // Zusatzleisten
+",status=0" // Statusleiste
+",menubar=0" // Menü
+",scrollbars=1" // Scrollbars
+",resizable=1" // Fenstergrösse veränderbar?
+",width=500" // Fensterbreite in Pixeln
+",height=400" // Fensterhöhe in Pixeln
);
 fenster.focus();
 fenster.moveTo(
positionX,positionY
); // der linken oberen Ecke
}
