// JavaScript Document
// project32.net
// started 20th December, 2004

function popImg(srcImg,w,h)
{
	PositionX = 100;
	PositionY = 100;
	defaultWidth  = 300;
	defaultHeight = 200;
	var AutoClose = false; // allow multiple popups
	var params='scrollbars=no,resizable=yes,width=400,height=300,left='+PositionX+',top='+PositionY;

	imgWin = window.open('about:blank','',params);
	with (imgWin.document)
	{ 	
		writeln('<html><head><title>Loading Image...</title><style>body{margin:0px;}</style>');
		writeln('<sc'+'ript>');
	
		writeln('function reSizeToImage(){');
		writeln('window.resizeTo(100,100);');
		writeln('width=120-(document.body.clientWidth-document.images[0].width);');
		writeln('height=200-(document.body.clientHeight-document.images[0].height);');
		writeln('window.resizeTo(width,height);');
		writeln('document.title="www.project32.net";}');
		writeln('</sc'+'ript>');
		if (!AutoClose)
			writeln('</head><body bgcolor=000000 scroll="no" onLoad="reSizeToImage();self.focus()">');
		else 
			writeln('</head><body bgcolor=000000 scroll="no" onLoad="reSizeToImage();self.focus()" onBlur="self.close()">'); 
	
		writeln('<img name="gbiz" src='+srcImg+' style="display:block"></body></html>');
		close();
	}
}
