function showPlugin(sourceId, plugin)
{
	var page = "/o3portal/jsp/gis/gisPlugin.jsp?sourceId=" + sourceId + "&parentWindow=" + window.name;
	top.pluginWnd = top.open(page, "Plugin", "menubar=no,resizable=yes,width=800,height=600,locationbar=no,statusbar=no,dependent=yes");
}

function reloadPlugin(fullReload, extent, layerName, layerAttributeName, gradientsJson)
{
	var pluginWnd = top.open("", "Plugin");

	if (pluginWnd != null && ! pluginWnd.closed) {
		if (fullReload) {
			pluginWnd.document.location.reload();
		} else { 
			pluginWnd.refreshMap(extent, layerName, layerAttributeName, gradientsJson);
		}
		pluginWnd.focus();
	}
}

function closeAppletWindow()
{
	var pluginWnd = top.open("", "Plugin");

	if (pluginWnd != null && ! pluginWnd.closed) {
		pluginWnd.close()
		pluginWnd = null
	}
}


