// 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	newwinS()	{
}


function	newwin(_thehtml, _wid, _hgt, _title)	{
	
	var	imgwid=_wid;
	var	imghgt=_hgt;

	var newwin = window.open( "../html/" + _thehtml,"Form","scrollbars=yes,toolbar=no,menubar=no,status=yes,resizable=yes,left=50,top=50,width="+ imgwid + ",height=" + imghgt);
	newwin.focus();
}


function	newwinA(_thehtml, _wid, _hgt, _title)	{
	
	var	imgwid=_wid;
	var	imghgt=_hgt;

	var newwin = window.open( _thehtml,"xwin","scrollbars=yes,toolbar=no,menubar=no,status=yes,resizable=yes,left=50,top=50,width="+ imgwid + ",height=" + imghgt);
	newwin.focus();
}


function	newImgWin(_thepic, _wid, _hgt, _title, _onlyimg)	{

		var	srcname = _thepic
		var	imgwid=_wid;

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


	var	imghgt=_hgt + winhgtadd;

// Top/Left are IE only ...

	var newwin = window.open("","intimg","scrollbars=no,toolbar=no,menubar=no,status=yes,resizable=yes,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();
}
	

