<?php
/**
* @version		$Id: mod_easyflash.php v 1.0.1 2008/10/24 $
* @author		Joomlets.net
* @package		EasyFlash
* @copyright	(C) 2005-2008 Joomlets.net (www.joomlets.net)
* @license		http://www.gnu.org/copyleft/gpl.html GNU/GPL
* Notice:		The EasyFlash module uses swfobject 
*			(http://code.google.com/p/swfobject/) to embed
*			flash movies into Joomla module positions.
*/

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

// Include the syndicate functions only once
require_once (dirname(__FILE__).DS.'helper.php');

// include swfobject.js script into the HTML header if not exists
EasyFlashHelper::addJsFile();

$missing_param = EasyFlashHelper::chkMissingParam($params);

// check out missing parameters
if (!$missing_param) {
	$flashvars = EasyFlashHelper::prepareFlashvars();
	$swf_params = EasyFlashHelper::prepareParams();
	$debug_params = ($params->get('debugmode'))?EasyFlashHelper::debugParams($params):"";

	require(JModuleHelper::getLayoutPath('mod_easyflash'));
} else {
	echo 'Cannot load specified movie. Missing parameter is: <b>' . $missing_param . '</b>';
}


?>
