Smarty for Javascript