// JavaScript Document
function popup(links,breite,hoehe)
{
popi=window.open(links,'demo_popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+breite+',height='+hoehe+'');
popi.focus();
}
var PicWindow;

function picView(iName,titel){//by johannesSeebacher egoist@egomanie.com
    if(!titel)titel='Bildanzeige';
        WinBild=new Image();
	WinBild.src=iName;
	Attrib='width=500,height=500,scrollbars=no,left=15,top=15,status=yes';
	
	PicWindow = window.open("","PicWindow",Attrib);
			
			with(PicWindow.document){
				open();
				write('<html>\n<head><link href="../css/style.css" rel="stylesheet" type="text/css">\n<title>'+titel+'</title>\n<body onBlur="self.close()" style="margin:2px;padding:0px" class="dklgruenBg">'); 
				write('\n<center><img src=\"'+WinBild.src+'" alt="'+titel+'"></center>\n');
				write('</body>\n</html>\n\n');
				close();
			}
			PicViewLoadet();
}
function PicViewLoadet(){
	var xTime;
	
	if(WinBild && WinBild.width && WinBild.width>5){//wenn bild bereits geladen wurde
		PicWindow.resizeTo((WinBild.width)+10,(WinBild.height)+80)// breiten und höhen für fenster
		if(xTime)//wenn timer vorhanden: timer löschen
			clearTimeout(xTime);
	}else{//wenn es noch nicht geladen wurde.. noch mal versuchen.
		xTime=window.setTimeout('PicViewLoadet()',50);
	}
}
