var myWin = null;

function newWindow(content,w,h)
{
	maxW  = screen.availWidth - 10;
	maxH  = screen.availHeight - 61;
	w     = Math.min(maxW, w + 28);
	h     = Math.min(maxH, h + 08);
	winL  = 0;
   winT  = 0;

/* Open new window */
	if (myWin)
		myWin.close();
	myWin = window.open('', '', 'left=' + winL + ', top=' + winT + ', width=' + w  + ', height=' + h + ', scrollbars=yes, resizable=yes, menubar=no, toolbar=no status=no');

/* Display "Loading Image" message */	
   myWin.document.writeln('<html>');
   myWin.document.writeln('<body>');
   myWin.document.writeln('<div style="position:absolute; top:20; left:20; z-index:1;">');
   myWin.document.writeln('<b><font color="#FF0000">Loading Image ...</font></b>');
   myWin.document.writeln('</div>');

/* Display image */   
   myWin.document.writeln('<div style="position:absolute; top:05; left:05; z-index:2;">');
   myWin.document.writeln('<img src="' + content + '">');
   myWin.document.writeln('</div>');
   myWin.document.writeln('</body>');
   myWin.document.writeln('</html>');
	myWin.document.close();

/* If the new window didn't open, alert the user to disable their pop-up stopper */
	if (!myWin) alert("If you're using a pop-up stopper, it needs to \nbe disabled to display the enlargements");
}
