function loadScripts(&$params) { JHTML::_('behavior.mootools'); $doc = &JFactory::getDocument(); $doc->addScript(JURI::Root(true).'/modules/mod_roknewsflash/tmpl/js/roknewsflash'.modRokNewsflashHelper::_getJSVersion().'.js'); $jsinit = "window.addEvent('domready', function() { var x = new RokNewsFlash('newsflash', { controls: ".(($params->get('controls') == 1) ? "1" : "0").", delay: ".$params->get('delay').", duration: ".$params->get('duration')." }); });"; $doc->addScriptDeclaration($jsinit); }