/* This is a function to open a popup window. Place it in your script directory,
Load it by placing this statement into the HEAD of your document:
<script language = "Javascript" src = "scripts/popupWindow.js"></script>
To call it add the following line:

<A HREF="javascript:OpenPopUpWindow('Railfan.htm', 'scrollbars=1,resizable=1,width=300,height=400,left = 10,top = 10');">Open the Popup Window</A>

If you want the window to close when the user clicks in the main window, add onfocus="ClosePopUpWindow()" to the body tag.

*/

var PopUpWindow = null;

function OpenPopUpWindow(URL, WindowFeatures) 
{

PopUpWindow = window.open(URL, null, WindowFeatures);
}

function ClosePopUpWindow()
{
    if (PopUpWindow != null)
    {
	if (!PopUpWindow.closed)
	{
	    PopUpWindow.close()
	}
    }
}