function PopUpWindow(status, url, iw, ih)
{
	if(!window.window2) // window has not been defined and needs to be opened
	{
		window2 = (window.open(url,"Title","width="+iw+",height="+ih+",resizable=yes,scrollbars=yes,toolbar=no,status=no")) ;
	} 
	else // window has been defined
	{
		if(!window2.closed)
		{
			// still open, so change url and refocus
			window2.close() ;
			window2 = (window.open(url,"messageWindow1","width="+iw+",height="+ih+",resizable=yes,scrollbars=yes,toolbar=no,status=no")) ;
		}
		else
		{
			// it's been closed, so needs to be re-opened
			window2 = (window.open(url,"messageWindow1","width="+iw+",height="+ih+",resizable=yes,scrollbars=yes,toolbar=no,status=no")) ;
		}
	}
}