// Function to kill the progress pop up window. If we have a NavBar checks to see if the function fnEndDisplay is defined yet
// (it may not be defined if the frame containing the NavBar doesn't finish executing before the frame containing the page that
// calls this function). This function will wait until the function fnEndDisplay is defined or up to 500 milliseconds (.5 seconds)
// before going on.
function killProgressPopUp(strframeName)
{
	var westlawFrame = getWestlawFrameReference(strframeName);

	//Tracker 81375. WSI/Workflow - there is no navbar, so check first.
	try {
		if(westlawFrame.navbar) { }
	}
	catch(err1) {
		return;
	}
	
	if (westlawFrame.navbar)
	{
		var now = new Date().getTime();
		while (westlawFrame.navbar.fnEndDisplay == null && ((new Date().getTime() - now) < 1000))
		{
			// do nothing
		}
		if (westlawFrame.navbar.fnEndDisplay != null)
		{
			westlawFrame.navbar.fnEndDisplay();
		}
	}
}

if(typeof(Sys) !== "undefined") {
	Sys.Application.notifyScriptLoaded();
}