// launchGenericTool works as a "listener" i.e. flash does the external callback launchGenericTool and this function then gets called by magic
var launchGenericTool = function (toolID, data) 
{	
	//do not open html delivery internal tools
	if (data.indexOf("<htmlOnlyDelivery>True</htmlOnlyDelivery>") !== -1)
	{
		return;
	}
	
	// NOTE: We put the data in sessionStorage and the new tab will inherit this session and so will have access to this
	sessionStorage.setItem("toolData", data);

	window.open("./tools/shared/toolWebPageContainer.html", "_blank");
}