//**********************************************************************
//                                                                      
//  Copyright (c) 2001 Paul Rubin, Roswell, GA                          
//  as an unpublished work.  All rights reserved.                       
//                                                                      
//  This program is owned by Paul Rubin                             
//                                                                      
// *********************************************************************
var win = null;
function newImageWindow(myImage, myTitle, w, h, scroll){
	textColor = "#000077";
	background = pathToRoot + "images/Background.jpg";
	if (win == null || win.closed) {
		if (screen.width && w >= screen.width) w = screen.width;
		if (screen.height && h >= screen.height) h = screen.height;
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
		if (w == screen.width) w = screen.width - (screen.width / 60);
		if (h == screen.height) h = screen.height - (screen.height / 7.5);
		settings = 'height=' + h + ',width=' + w
		   + ',top='+TopPosition+',left='+LeftPosition+',scrollbars=' + scroll + ',resizable';
		win = window.open("","imageView",settings);
	}
	html =        "<html>\n<head>\n   <title>" + myTitle + "</title>\n";
	html = html + "   <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n</head>\n";
	html = html + "<body background=\"" + background + "\" text=\"" + textColor + "\">\n";
	html = html + "   <div align=\"center\">\n";	
	html = html + "	   <font face=\"Arial, Helvetica, sans-serif\" size=\"+4\"><b><i>" + myTitle + "</i></b></font>\n";
	html = html + "      <p><img src=\"" + myImage + "\"></p>\n";
	html = html + "	   <a href=\"#\" onClick=\"window.close();return false\">\n";
	html = html + "   	   <font face=\"Arial, Helvetica, sans-serif\" size=\"+3\" color=\"";
	html = html + textColor + "\"><b><i>\n";
	html = html + "      	   Close\n      </i></b></font></a>\n";	
	html = html + "   </div>\n</body></html>"
	win.document.open();
	win.document.writeln(html);	
	win.document.close();
	win.focus();
	return false;
}
