var scrWidth = screen.availWidth;
	var scrHeight = screen.availHeight;

	function setWSize(what, width, height)
	{
		if (navigator.appName == "Netscape")
		{
			what.outerWidth=width;
			what.outerHeight=height;
		}
		else
			what.resizeTo(width,height);
	}

function openLrgWindow(theURL,width,height) 
{
		var NewWnd = null;
		var output = "";
	
		img = theURL;
		sTitle = "Preview";
		
		if (navigator.appName == "Netscape")
		{
			width = (width+4 > scrWidth) ? scrWidth : width+6;
		}
		else
		{
			width = (width+6 > scrWidth) ? scrWidth : width+4;
		}
		height = (height+26 > scrHeight) ? scrHeight : height+26;
		
		if ((NewWnd == null) || NewWnd.closed)
		{
			NewWnd=window.open("","NewWnd","resizable=0,scrollbars=0,width="+width+",height="+height);
		}
		setWSize(NewWnd,width,height);
		NewWnd.moveTo((parent.scrWidth-width)/2+230,(parent.scrHeight-height)/2-80);
		output = '<html><head><title>'+sTitle+'</title></head><body bgcolor="#140000" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 text="white" scroll="no"><table cellspacing="0" cellpadding="0" border="0" width="100%" height="100%"><tr><td align="center" valign="middle"><img src="'+img+'" border=0></td></tr></table></body></html>';
		NewWnd.document.open();
		NewWnd.document.write(output);
		NewWnd.document.close();
		NewWnd.focus();
	
}

function openHtml(theURL,width,height) 
{
		var NewWnd = null;
		var output = "";
		
		if (navigator.appName == "Netscape")
		{
			width = (width+6 > scrWidth) ? scrWidth : width+6;
		}
		else
		{
			width = (width+4 > scrWidth) ? scrWidth : width+4;
		}
		height = (height+26 > scrHeight) ? scrHeight : height+26;
		
		if ((NewWnd == null) || NewWnd.closed)
		{
			NewWnd=window.open(theURL,"NewWnd","resizable=0,scrollbars=0,width="+width+",height="+height);
		}
		setWSize(NewWnd,width,height);
		NewWnd.moveTo((parent.scrWidth-width)/2+230,(parent.scrHeight-height)/2-80);
		//output = '<html><head><title>'+sTitle+'</title></head><body bgcolor="#140000" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 text="white" scroll="no"><table cellspacing="0" cellpadding="0" border="0" width="100%" height="100%"><tr><td align="center" valign="middle"><img src="'+img+'" border=0></td></tr></table></body></html>';
		//NewWnd.document.open();
		//NewWnd.document.write(output);
		//NewWnd.document.close();
		NewWnd.focus();
	
}