﻿function z2z_superChartLitePopup_show(targetPath)
{
	var superChartTitle = "superChart";
	var minWidth = 800;
	var minHeight = 500;

	var superChartPopupContainerId = "z2z_superChartLitePopupContainer";

	var win = new Window({title: superChartTitle, wiredDrag:true, minWidth:minWidth, minHeight:minHeight});
	var so = new SWFObject(targetPath, "z2z_superChartLitePopup", "100%", "100%", "7.0.14.0");
	if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length)
	{	// netscape plugin architecture
		//do nothing
	}
	else
	{
		so.addParam("wmode", "opaque");
	}
	var winContent = "<div id='"+superChartPopupContainerId+"'>"+so.getSWFHTML()+"</div>";
	win.setHTMLContent(winContent); 

	win.setDestroyOnClose();
	win.showCenter();
	win.toFront();
}

function z2z_superChart_GenericFSCommand(command, str)
{
	//support for old version of safari
	var prefixIndex = command.indexOf("FSCommand:");
	if (prefixIndex != -1)
	{
		command = command.substr(10);
	}
	var args=str.split(",");
    switch (command)
	{
        case "z2z_superChartLiteWinPopBrowser":
        	var targetPath = str;
			var z2z_superChartLiteWin = window.open(targetPath,'','width='+(screen.width-10)+',height='+(screen.height-60)+',top=0,left=0,resizable=1');
			if(z2z_superChartLiteWin)
			{
				z2z_superChartLiteWin.focus();
			}
			else
			{
				alert('The popup is blocked! Please configure your popup blocker to allow popup windows from our site!');
			}
            break;
    }
}
