var imgWindow = null;

function zoomImage(src,alt,caption,width,height)
{
	if (imgWindow != null)
		imgWindow.close();
		
	imgWindow = window.open('','_blank','location=no,menubar=no,scrollbars=yes,directories=no'
		+ 'status=no,toolbar=no,resizable=yes,width=' + width + ',height=' + height);
	
	if (screen.availWidth)
	{
		var newX = (screen.availWidth - (width + 16)) / 2;
		var newY = (screen.availHeight - (height + 96)) / 2;
		imgWindow.moveTo(newX, newY);
	}
	else
	{
		imgWindow.moveTo(0, 0);
	}
	imgWindow.resizeTo(width + 16, height + 96);
	
	imgWindow.document.innerHTML = '';
	
	imgWindow.document.write('<html>\n');
	imgWindow.document.write('<head>\n');
	imgWindow.document.write('<title>' + caption + '</title>\n');
	imgWindow.document.write('</head>\n');
	imgWindow.document.write('<body leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0" marginwidth="0" marginheight="0" x-onload="doSize()">\n');
	imgWindow.document.write('<div align="center">');
	imgWindow.document.write('<img alt="' + alt + '" src="' + src + '" width="' + width + '" height="' + height + '" border="0">');
	imgWindow.document.write('</div>\n');
	imgWindow.document.write('<div><img alt="" src="site_images/blank.gif" width="1" height="6" border="0"></div>\n');
	imgWindow.document.write('<div align="center" style="font-family:Arial,Helvetica,sans-serif;font-size:10pt">');
	imgWindow.document.write(caption);
	imgWindow.document.write('</div>\n');
	imgWindow.document.write('<div><img alt="" src="site_images/blank.gif" width="1" height="6" border="0"></div>\n');
	imgWindow.document.write('<div align="center" style="font-family:Arial,Helvetica,sans-serif;font-size:8pt">');
	imgWindow.document.write('<a href="javascript:window.close()" style="text-decoration:none">close</a>');
	imgWindow.document.write('</div>\n');
	imgWindow.document.write('</body>\n');
	imgWindow.document.write('</html>\n');
	imgWindow.document.close();
}
