<?php
/**
 * @version		$Id: default.php 144 2009-06-27 02:19:12Z eddieajau $
 * @package		TAOJ.Quanta
 * @subpackage	com_quanta
 * @copyright	Copyright (C) 2009 New Life in IT Pty Ltd. All rights reserved.
 * @license		GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
 * @link		http://www.theartofjoomla.com
 */

// no direct access
defined('_JEXEC') or die;

JHtml::script('swfobject.js', 'components/com_quanta/media/js/');

if ($this->state->params->get('debug'))
{
	JHtml::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_quanta/helpers/html');
	echo '<pre style="overflow:auto;height:100px;">'.JHtml::_('json.format', (string) $this->chart).'</pre>';
}
?>
<script type="text/javascript">
function ofc_ready() {}
function com_quanta_cpie_data()
{
	return '<?php echo (string) $this->chart;?>';
}
swfobject.embedSWF('<?php echo $this->baseurl;?>/components/com_quanta/media/flash/open_flash_chart_2.swf',
	'com_quanta_cpie',
	'<?php echo (int) $this->state->params->get('chart-width');?>',
	'<?php echo (int) $this->state->params->get('chart-height');?>',
	'9.0.0',
	'expressInstall.swf',
	{'get-data':'com_quanta_cpie_data',
	 'id':'com_quanta_cpie'}
	);
</script>

<div id="com_quanta_cpie">
<?php echo JText::_('Quanta_Error_chart_cannot_display');?>
</div>
