// <!--
//These functions keep track of popup windows and allow editing of open windows

//this function returns handle to parent of popup window.  If it has been closed, opens window with default settings
function GetMainPage()
{
	if (self.name != "InternalPop")
	{
		alert("Calling GetMainPage from non-popup window.");
		return null;
	}
	
	if (window.opener.closed)
	{
		var hw_main = window.open("http://www.metalsuppliersonline.com","Main");
		hw_main.opener = null;
		return hw_main;
	}
	else
	{
		return window.opener;
	}
}

//this will open a and track a single PopUpWindow with opener property
function OpenPopup(strURL, strWinProperties)
{
	var hw_pop = self.opener
	if (hw_pop != null)
	{
		if (!hw_pop.closed)
		{
			hw_pop.close();
		}
	}
	self.opener = window.open(strURL,"InternalPop",strWinProperties);
}

// -->