// Show a picture in own window
// Steve Kelly - 25/4/01
//
// Pass - 
//	_thepic 	= base file name of image (Must be in images/popups folder)
//	_wid		= width of window (in pixels)
//  _hgt		= height of window (in pixels)
//	_title		= window title
//	_onlyimg	= 0 - Do not show 'close this window' OR 1 - Show 'close this window' text. 
//


// A HREF stub

function	showpicS()	{
}


function	showpic(_thepic, _wid, _hgt, _title, _onlyimg)	{
	
		var	srcname = "../images/popups/" + _thepic
		var	imgwid=_wid;

		if(_onlyimg == 0)	{
			winhgtadd = 0;
			bgc = "FFFFFF";
			txc = "000000";
		}
		else	{
			winhgtadd = 50;
			bgc = "000000";
			txc = "FFFFFF";
		}


	var	imghgt=_hgt + winhgtadd;

 // NOT USED IN THIS VERSION ... YET
 
/*
	var	legalBrowser = false;
	var	brName = "";

	bAgent = window.navigator.userAgent; 
	bAppName = window.navigator.appName;

	if (bAppName.indexOf("Netscape") >= 0)	{
		legalBrowser = true;
		brName = "Navigator";
	}

	if (bAppName.indexOf("Explorer") >= 0) {

		if 	(
			bAgent.indexOf("Mozilla/4") >= 0	||
			bAgent.indexOf("Mozilla/5") >= 0 	||
			bAgent.indexOf("Mozilla/6") >= 0
			)	{
				legalBrowser = true;
				brName = "Explorer";
		}
	}
*/

// Top/Left are IE only ...
	var newwin = window.open("","Popupwindow","scrollbars=no,toolbar=no,menubar=no,status=yes,resizable=no,left=50,top=50,width="+ imgwid + ",height=" + imghgt);

	var	nd = newwin.document;
	nd.open();

	nd.writeln("<HTML>");
	nd.writeln("<head>");
	nd.writeln("<title>"+_title+"</title></head>");

	nd.writeln("<body bgcolor='#" + bgc + "' text='#" + txc + "' vlink='#" + txc + "' alink='#" + txc + "' marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>");
	nd.writeln("<center>");
	nd.writeln("<img src='" + srcname + "'>");
	nd.writeln("<br><font face='arial'><a href='' onclick='window.close();'>Close this window</a></font><br>");
	nd.writeln("</center></body></HTML>");
	nd.close();

	newwin.focus();
}
	
