<!--
// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 3.0.2 
// changed by Ueli Wahli 
function PictureWindow(imageName,imageWidth,imageHeight,alt) {

	var w = screen.width  - 20;
	var h = screen.height - 20;
	var byFactor = 1;

	if (imageWidth>w){	
	  byFactor    = w / imageWidth;			
	  imageWidth  = w;
	  imageHeight = imageHeight * byFactor;
	}
	if (imageHeight>h){
	  byFactor    = h / imageHeight;
	  imageWidth  = (imageWidth * byFactor);
	  imageHeight = h; 
	}
	   
	var scrWidth  = imageWidth;
	var scrHeight = imageHeight;
	var posLeft   = (w - scrWidth)  / 2;
	var posTop    = (h - scrHeight) / 2;

	posTop    = parseInt(posTop);
	posLeft   = parseInt(posLeft);		
	scrWidth  = parseInt(scrWidth); 
	scrHeight = parseInt(scrHeight);
	
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1){
	  var args= new Array();
	  args[0]='parent';
	  args[1]=imageName;
	  var i ; document.MM_returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	} else {
	  newWindow = window.open("picwindow.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
	  newWindow.document.open();
	  newWindow.document.write('<html><title>'+alt+' - click to close</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="#000000" onBlur="self.close()" onClick="self.close()">');  
	  newWindow.document.write('<table align="center" height='+scrHeight+'><tr><td><img src="'+imageName+'" alt="Click window to close" ></td></tr></table>'); 
	  newWindow.document.write('</body></html>');
	  newWindow.document.close();
	  newWindow.focus();
	}
}
//-->
