var dername = null;
var img = new Image();
var weite = 0;
var hoehe = 0;

function openWindow(url, iWeite,iHoehe, szScreenshotPfad)
{ 
	weite = iWeite;
	hoehe = iHoehe;
	
	if (dername == null || navigator.appName != "Netscape" || dername.closed)
	{		
		// Pfad des Screenshots dem Image-Objekt zuweisen
		img.src = szScreenshotPfad;
		
		// Breite und Hoehe des Screenshots ermitteln				
		weite = img.width;		
		hoehe = img.height;				

		if (!img.complete)
		{			
			// Breite und Hoehe des Screenshots ermitteln				
			weite = img.width;		
			hoehe = img.height;	
		}
		
		// Falls immer noch 0, dann lade Default-Groesse:
		if (weite == 0 || hoehe == 0)
		{
			weite = 850;
			hoehe = 700;
		}
									
		// Groesse fuer Popup berechnen (+ Platz fuer Text "Fenster schliessen")		
		weite = weite + 10;
		hoehe = hoehe + 60;
		
	 	opt  = "dependent=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width="+weite+",height="+hoehe+",copyhistory=0";
						
		if (navigator.appVersion.substring(0, 1) >= 4)
		{
			xpos = 0;
		 	ypos = 0;
			opt += ",screenX="+xpos+",screenY="+ypos+",left="+xpos+",top="+ypos;
		}		
		dername = window.open(url,"name",opt);		
		dername.resizeTo(weite, hoehe);
		dername.focus();		
	}
	else
	{	
		dername.location = url;
		dername.focus();
	}						
}

function ok()
{
	return true;
}
window.onerror = ok;
