adjusted for Joomla 3 and JavaScript improved

DS, ...Legacy
JavaScript url in Controller instead of helper file