Exemple #1
0
 function _includedJavascriptAsHTML()
 {
     global $c_commsy_url_path;
     global $c_use_new_lightbox;
     $new_private_room = $this->_environment->inConfigArray('c_use_new_private_room', $this->_environment->getCurrentContextID());
     $module = $this->_environment->getCurrentModule();
     $current_user = $this->_environment->getCurrentUserItem();
     $function = $this->_environment->getCurrentFunction();
     $url_addon = '';
     if (isset($_GET['mode']) and $_GET['mode'] == 'print') {
         $this->_is_print_page = true;
     }
     $views = array_merge($this->_views, $this->_views_left, $this->_views_right, $this->_views_overlay);
     if (isset($this->_form_view)) {
         $views[] = $this->_form_view;
     }
     $view = reset($views);
     $needed_javascript_array = array();
     while ($view) {
         $needed_javascript_array = $view->getJavaScriptInfoArrayForHeaderAsHTML($needed_javascript_array);
         $view = next($views);
     }
     unset($views);
     unset($view);
     $session = $this->_environment->getSession();
     $left_menue_status = $session->getValue('left_menue_status');
     $retour = '';
     /**/
     $retour .= '   <script type="text/javascript" src="javascript/jQuery/commsy/uploadify_7_5_0_fix.js"></script>' . LF;
     /**/
     // jQuery
     if (!($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6')) {
         #$retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery-1.3.2.min.js"></script>'.LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery-1.4.1.min.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery-ui-1.7.2.custom.min.js"></script>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/css/jQueryUI/smoothness/jquery-ui-1.7.2.custom.css"/>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/css/jQueryUI/additional_calendar/jquery-ui-1.7.2.custom.css"/>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery.scrollTo-1.4.2/jquery.scrollTo-min.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery.timers-1.2/jquery.timers.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jScrollPane/jScrollPane-1.2.1.js"></script>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/jScrollPane/css/jScrollPane.css"/>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/mousewheel/jquery.mousewheel.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/stickytooltip/stickytooltip.js"></script>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/stickytooltip/stickytooltip.css"/>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/dynatree/jquery.dynatree.js"></script>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/dynatree/skin/ui.dynatree.css"/>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/commsy_css/commsy.css"/>' . LF;
         $retour .= '   <script type="text/javascript">' . LF;
         $retour .= '      <!--' . LF;
         $retour .= '   var datepicker_language = \'' . $this->_translator->getSelectedLanguage() . '\';' . LF;
         $retour .= '   var datepicker_choose = \'' . $this->_translator->getMessage('COMMON_DATEPICKER_CHOOSE') . '\';' . LF;
         $retour .= '      -->' . LF;
         $retour .= '   </script>' . LF;
         #$retour .= '   <script type="text/javascript" src="javascript/jQuery/JSON/json2.js"></script>'.LF;
         #$retour .= '   <script type="text/javascript" src="javascript/jQuery/commsy/commsy_functions_7_1_0_2.js"></script>'.LF;
         include_once 'functions/misc_functions.php';
         $commsy_functions = getCurrentCommSyFunctions();
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/' . $commsy_functions . '"></script>' . LF;
     } else {
         $retour .= '   <script type="text/javascript" src="javascript/CommSyFunctions.js"></script>' . LF;
         $retour .= '   <script src="javascript/mootools-release-1.11.js" type="text/javascript"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/CommSyPanels7.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/CommSyTemplateInformation.js"></script>' . LF;
         $retour .= '   <script src="javascript/slimbox/js/slimbox.js" type="text/javascript"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/CommSyNetnavigation.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/CommSyCreatorInformation.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/CommSyTextFormatingInformation.js"></script>' . LF;
         $retour .= '   <link rel="stylesheet" media="screen" type="text/css" href="javascript/slimbox/css/slimbox.css"/>' . LF;
     }
     //global $c_new_upload;
     $use_new_upload = false;
     $session = $this->_environment->getSession();
     if ($session->issetValue('javascript') and $session->issetValue('flash')) {
         if ($session->getValue('javascript') == '1' and $session->getValue('flash') == '1') {
             $use_new_upload = true;
         }
     }
     if ($use_new_upload) {
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery.uploadify-v2.1.4/jquery.uploadify.v2.1.4.min.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery.uploadify-v2.1.4/swfobject.js"></script>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/jquery.uploadify-v2.1.4/uploadify_commsy.css"/>' . LF;
     }
     if ($new_private_room) {
         /**********/
         /*PORTLETS*/
         if ($this->_environment->inPrivateRoom()) {
             $retour .= '   <link rel="stylesheet" media="screen" type="text/css" href="css/commsy_portlets_css.php?cid=' . $this->_environment->getCurrentContextID() . $url_addon . '"/>' . LF;
             $retour .= '   <script type="text/javascript" src="javascript/jQuery/weather/js/weather.js"></script>' . LF;
             $retour .= '   <script type="text/javascript" src="javascript/jQuery/weather/js/jquery.cookie.js"></script>' . LF;
             $retour .= '   <link rel="stylesheet" media="screen" type="text/css" href="javascript/jQuery/weather/css/styles.css"/>' . LF;
             $retour .= '   <script type="text/javascript" src="javascript/jQuery/CSS3Clock/css3clock.js"></script>' . LF;
             $retour .= '   <link rel="stylesheet" media="screen" type="text/css" href="javascript/jQuery/CSS3Clock/style.css"/>' . LF;
             $retour .= '   <script type="text/javascript" src="javascript/jQuery/rsstickerajax/rssticker.js"></script>' . LF;
             $retour .= '   <link rel="stylesheet" media="screen" type="text/css" href="javascript/jQuery/rsstickerajax/rssticker-style.css"/>' . LF;
             $retour .= '<script type="text/javascript" src="javascript/jQuery/twitter/jquery.twitter-friends-1.0.min.js"></script>' . LF;
             $retour .= '<script type="text/javascript" src="javascript/jQuery/youtube/jquery.youtube.js"></script>' . LF;
             $retour .= '<link rel="stylesheet" href="javascript/jQuery/src/ajaxrotator/jquery.ctrotator.css" type="text/css" media="all" />' . LF;
             $retour .= '<script type="text/javascript" src="javascript/jQuery/ajaxrotator/src/jquery.ctrotator.bridge.flickr.js"></script>' . LF;
             #         $retour .= '<script type="text/javascript" src="javascript/jQuery/ajaxrotator/src/jquery.ctrotator.bridge.rss20.js"></script>'.LF;
             $retour .= '<script type="text/javascript" src="javascript/jQuery/ajaxrotator/src/jquery.ctrotator.js"></script>' . LF;
             $retour .= '<script type="text/javascript" src="javascript/jQuery/jquery.flip.0-9-9/jquery.flip.min.js"></script>' . LF;
         }
         /*********/
     }
     // jQuery
     if (!$this->_environment->inServer()) {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyFunctions.js"></script>'.LF;
         //$retour .= '   <script src="javascript/mootools-release-1.11.js" type="text/javascript"></script>'.LF;
         // jQuery
     } else {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyFunctions.js"></script>'.LF;
         // jQuery
     }
     if (!$this->_environment->inServer() and (!$this->_environment->inPortal() or $this->_environment->getCurrentModule() == 'account')) {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyPanels7.js"></script>'.LF;
         // jQuery
     }
     if ($this->_environment->inPortal() or $this->_environment->getCurrentModule() == CS_PROJECT_TYPE and $this->_environment->getCurrentFunction() == 'edit' or $this->_environment->getCurrentModule() == 'configuration' and $this->_environment->getCurrentFunction() == 'room_options' and $this->_environment->inPrivateRoom()) {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyTemplateInformation.js"></script>'.LF;
         // jQuery
     }
     if (!$this->_environment->inServer() and !$this->_environment->inPortal() and $this->_environment->getCurrentModule() == 'home') {
         $retour .= '   <script type="text/javascript">' . LF;
         $retour .= '      <!--' . LF;
         $retour .= '   var message = \'' . $this->_translator->getMessage('COMMON_PICTURE_DOWNLOADFILE') . '\';' . LF;
         $retour .= '      -->' . LF;
         $retour .= '   </script>' . LF;
         // jQuery
         //$retour .= '   <script src="javascript/slimbox/js/slimbox.js" type="text/javascript"></script>'.LF;
         $with_slimbox = true;
         if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
             $with_slimbox = false;
         }
         if ($with_slimbox) {
             #if (isset($c_use_new_lightbox) and $c_use_new_lightbox){
             $retour .= '   <script src="javascript/jQuery/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.js" type="text/javascript"></script>' . LF;
             #} else {
             #   $retour .= '   <script src="javascript/jQuery/Slimbox2/js/slimbox2.js" type="text/javascript"></script>'.LF;
             #}
         }
         // jQuery
         // jQuery
         $retour .= '   <script type="text/javascript" src="javascript/swfobject.js"></script>' . LF;
         // Vorbereitet: swjobject-Plugin:
         //$retour .= '   <script type="text/javascript" src="javascript/jQuery/swfobject/jquery.swfobject.1-0-7.min.js"></script>'.LF;
         // jQuery
     } elseif ($this->_environment->getCurrentFunction() == 'detail') {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyNetnavigation.js"></script>'.LF;
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyCreatorInformation.js"></script>'.LF;
         // jQuery$retour .= '   <script src="javascript/mootools-release-1.11.js" type="text/javascript"></script>'.LF;
         $retour .= '   <script type="text/javascript">' . LF;
         $retour .= '      <!--' . LF;
         $retour .= '   var message = \'' . $this->_translator->getMessage('COMMON_PICTURE_DOWNLOADFILE') . '\';' . LF;
         $retour .= '      -->' . LF;
         $retour .= '   </script>' . LF;
         // jQuery
         //$retour .= '   <script src="javascript/slimbox/js/slimbox.js" type="text/javascript"></script>'.LF;
         $with_slimbox = true;
         if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
             $with_slimbox = false;
         }
         if ($with_slimbox) {
             #if (isset($c_use_new_lightbox) and $c_use_new_lightbox){
             $retour .= '   <script src="javascript/jQuery/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.js" type="text/javascript"></script>' . LF;
             #} else {
             #   $retour .= '   <script src="javascript/jQuery/Slimbox2/js/slimbox2.js" type="text/javascript"></script>'.LF;
             #}
         }
         // jQuery
         // jQuery
         $retour .= '   <script type="text/javascript" src="javascript/swfobject.js"></script>' . LF;
         // Vorbereitet: swjobject-Plugin:
         //$retour .= '   <script type="text/javascript" src="javascript/jQuery/swfobject/jquery.swfobject.1-0-7.min.js"></script>'.LF;
         // jQuery
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyTextFormatingInformation.js"></script>'.LF;
         // jQuery
         // for tex in commsy
         // see http://www.math.union.edu/~dpvc/jsMath/
         global $c_jsmath_enable;
         if (isset($c_jsmath_enable) and $c_jsmath_enable) {
             $retour .= '   <script type="text/javascript"> jsMath = {Controls: {cookie: {scale: 120}}} </script>' . LF;
             global $c_jsmath_url;
             $retour .= '   <script type="text/javascript" src="' . $c_jsmath_url . '/jsMath.js"></script>' . LF;
         }
         if ($current_user->isAutoSaveOn() and $this->_environment->getCurrentModule() == CS_DISCUSSION_TYPE) {
             $current_context = $this->_environment->getCurrentContextItem();
             if ($current_context->withOnlySimpleDiscussionType() or $current_context->withBothDiscussionTypes()) {
                 // and discussion_item->is_linear()
                 $retour .= '   <script type="text/javascript" src="javascript/CommSyAutoSave.js"></script>' . LF;
                 $retour .= '   <script type="text/javascript">' . LF;
                 $retour .= '      <!--' . LF;
                 $retour .= '         var timerID = null;' . LF;
                 $retour .= '         var timerRunning = false;' . LF;
                 $retour .= '         var startDate;' . LF;
                 $retour .= '         var startSecs;' . LF;
                 global $c_autosave_mode;
                 $retour .= '         var dispMode = ' . $c_autosave_mode . ';' . LF;
                 global $c_autosave_limit;
                 $retour .= '         var sessLimit = ' . $c_autosave_limit * 60 . ';' . LF;
                 $retour .= '      -->' . LF;
                 $retour .= '   </script>' . LF;
             }
         }
     } elseif ($this->_environment->getCurrentFunction() == 'index') {
         $retour .= '   <script type="text/javascript">' . LF;
         $retour .= '      <!--' . LF;
         $retour .= '   var message = \'' . $this->_translator->getMessage('COMMON_PICTURE_DOWNLOADFILE') . '\';' . LF;
         $retour .= '      -->' . LF;
         $retour .= '   </script>' . LF;
         if ($this->_environment->getCurrentModule() != 'configuration') {
             // jQuery
             //$retour .= '   <script src="javascript/slimbox/js/slimbox.js" type="text/javascript"></script>'.LF;
             $with_slimbox = true;
             if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
                 $with_slimbox = false;
             }
             if ($with_slimbox) {
                 #if (isset($c_use_new_lightbox) and $c_use_new_lightbox){
                 $retour .= '   <script src="javascript/jQuery/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.js" type="text/javascript"></script>' . LF;
                 #} else {
                 #   $retour .= '   <script src="javascript/jQuery/Slimbox2/js/slimbox2.js" type="text/javascript"></script>'.LF;
                 #}
             }
             // jQuery
         }
     } elseif ($this->_environment->getCurrentFunction() == 'edit' or $this->_environment->getCurrentModule() == 'mail' or $this->_environment->getCurrentFunction() == 'mail' or $this->_environment->getCurrentFunction() == 'info_text_edit' or $this->_environment->getCurrentFunction() == 'info_text_form_edit' or $this->_environment->getCurrentFunction() == 'close' or $this->_environment->getCurrentFunction() == 'import' or $this->_environment->getCurrentFunction() == 'preferences' or $this->_environment->getCurrentModule() == 'user' and $this->_environment->getCurrentFunction() == 'preferences' or $this->_environment->getCurrentModule() == 'user' and $this->_environment->getCurrentFunction() == 'action' or $this->_environment->getCurrentModule() == 'configuration' or $this->_environment->getCurrentModule() == 'account' or $this->_environment->getCurrentModule() == 'material_admin') {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyNetnavigation.js"></script>'.LF;
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyTextFormatingInformation.js"></script>'.LF;
         // jQuery
         if (!$this->_environment->inServer()) {
             $retour .= '   <script type="text/javascript">' . LF;
             $retour .= '      <!--' . LF;
             $retour .= '   var message = \'' . $this->_translator->getMessage('COMMON_PICTURE_DOWNLOADFILE') . '\';' . LF;
             $retour .= '      -->' . LF;
             $retour .= '   </script>' . LF;
             // jQuery
             //$retour .= '   <script src="javascript/slimbox/js/slimbox.js" type="text/javascript"></script>'.LF;
             $with_slimbox = true;
             if ($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6') {
                 $with_slimbox = false;
             }
             if ($with_slimbox) {
                 #if (isset($c_use_new_lightbox) and $c_use_new_lightbox){
                 $retour .= '   <script src="javascript/jQuery/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.js" type="text/javascript"></script>' . LF;
                 #} else {
                 #   $retour .= '   <script src="javascript/jQuery/Slimbox2/js/slimbox2.js" type="text/javascript"></script>'.LF;
                 #}
             }
             // jQuery
             $retour .= '   <script type="text/javascript" src="javascript/colorpicker/script.js"></script>' . LF;
         }
         //autosave: BEGIN
         $current_user = $this->_environment->getCurrentUser();
         if ($current_user->isAutoSaveOn() and $this->_environment->getCurrentFunction() == 'edit' and ($this->_environment->getCurrentModule() == CS_ANNOUNCEMENT_TYPE or $this->_environment->getCurrentModule() == CS_DATE_TYPE or $this->_environment->getCurrentModule() == CS_TODO_TYPE or $this->_environment->getCurrentModule() == CS_MATERIAL_TYPE or $this->_environment->getCurrentModule() == CS_SECTION_TYPE or $this->_environment->getCurrentModule() == CS_DISCUSSION_TYPE or $this->_environment->getCurrentModule() == CS_DISCARTICLE_TYPE or $this->_environment->getCurrentModule() == CS_TOPIC_TYPE or $this->_environment->getCurrentModule() == CS_INSTITUTION_TYPE or $this->_environment->getCurrentModule() == CS_GROUP_TYPE or $this->_environment->getCurrentModule() == CS_ANNOTATION_TYPE)) {
             $retour .= '   <script type="text/javascript" src="javascript/CommSyAutoSave.js"></script>' . LF;
         }
     }
     if ($this->_environment->getCurrentModule() == 'material_admin' or $this->_environment->getCurrentModule() == 'account') {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyNetnavigation.js"></script>'.LF;
         // jQuery
     }
     return $retour;
 }
Exemple #2
0
 function _includedJavascriptAsHTML()
 {
     global $c_commsy_url_path;
     $module = $this->_environment->getCurrentModule();
     $current_user = $this->_environment->getCurrentUserItem();
     $function = $this->_environment->getCurrentFunction();
     $url_addon = '';
     if (isset($_GET['mode']) and $_GET['mode'] == 'print') {
         $this->_is_print_page = true;
     }
     $views = array_merge($this->_views, $this->_views_left, $this->_views_right, $this->_views_overlay);
     if (isset($this->_form_view)) {
         $views[] = $this->_form_view;
     }
     $view = reset($views);
     $needed_javascript_array = array();
     while ($view) {
         $needed_javascript_array = $view->getJavaScriptInfoArrayForHeaderAsHTML($needed_javascript_array);
         $view = next($views);
     }
     unset($views);
     unset($view);
     $session = $this->_environment->getSession();
     $left_menue_status = $session->getValue('left_menue_status');
     $retour = '';
     if (!$this->_environment->inServer()) {
         $retour .= '   <script type="text/javascript" src="javascript/CommSyFunctions.js"></script>' . LF;
         $retour .= '   <script src="javascript/mootools-release-1.11.js" type="text/javascript"></script>' . LF;
     } else {
         $retour .= '   <script type="text/javascript" src="javascript/CommSyFunctions.js"></script>' . LF;
     }
     if (!$this->_environment->inServer() and (!$this->_environment->inPortal() or $this->_environment->getCurrentModule() == 'account')) {
         $retour .= '   <script type="text/javascript" src="javascript/CommSyPanels.js"></script>' . LF;
     }
     if ($this->_environment->inPortal() or $this->_environment->getCurrentModule() == CS_PROJECT_TYPE and $this->_environment->getCurrentFunction() == 'edit') {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyTemplateInformation.js"></script>'.LF;
         // jQuery
     }
     if (!$this->_environment->inServer() and !$this->_environment->inPortal() and $this->_environment->getCurrentModule() == 'home') {
         $retour .= '   <script type="text/javascript">' . LF;
         $retour .= '      <!--' . LF;
         $retour .= '   var message = \'' . $this->_translator->getMessage('COMMON_PICTURE_DOWNLOADFILE') . '\';' . LF;
         $retour .= '      -->' . LF;
         $retour .= '   </script>' . LF;
         #$retour .= '   <script src="javascript/slimbox/js/slimbox.js" type="text/javascript"></script>'.LF;
         $retour .= '   <script type="text/javascript" src="javascript/swfobject.js"></script>' . LF;
     } elseif ($this->_environment->getCurrentFunction() == 'detail') {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyNetnavigation.js"></script>'.LF;
         // jQuery
         $retour .= '   <script type="text/javascript" src="javascript/CommSyCreatorInformation.js"></script>' . LF;
         $retour .= '   <script src="javascript/mootools-release-1.11.js" type="text/javascript"></script>' . LF;
         $retour .= '   <script type="text/javascript">' . LF;
         $retour .= '      <!--' . LF;
         $retour .= '   var message = \'' . $this->_translator->getMessage('COMMON_PICTURE_DOWNLOADFILE') . '\';' . LF;
         $retour .= '      -->' . LF;
         $retour .= '   </script>' . LF;
         #$retour .= '   <script src="javascript/slimbox/js/slimbox.js" type="text/javascript"></script>'.LF;
         $retour .= '   <script type="text/javascript" src="javascript/swfobject.js"></script>' . LF;
         if ($this->_environment->getCurrentModule() == CS_DISCUSSION_TYPE) {
             $retour .= '   <script type="text/javascript" src="javascript/CommSyTextFormatingInformation.js"></script>' . LF;
         }
         // for tex in commsy
         // see http://www.math.union.edu/~dpvc/jsMath/
         global $c_jsmath_enable;
         if (isset($c_jsmath_enable) and $c_jsmath_enable) {
             $retour .= '   <script type="text/javascript"> jsMath = {Controls: {cookie: {scale: 120}}} </script>' . LF;
             global $c_jsmath_url;
             $retour .= '   <script type="text/javascript" src="' . $c_jsmath_url . '/plugins/autoload.js"></script>' . LF;
             $retour .= '   <script type="text/javascript">' . LF;
             $retour .= '      window.addEvent(\'domready\', function () {' . LF;
             $retour .= '         if (jsMath.Autoload) {' . LF;
             $retour .= '            jsMath.Autoload.Check();' . LF;
             $retour .= '            jsMath.Process(document);' . LF;
             $retour .= '         }' . LF;
             $retour .= '      });' . LF;
             $retour .= '   </script>' . LF;
         }
         if ($current_user->isAutoSaveOn() and $this->_environment->getCurrentModule() == CS_DISCUSSION_TYPE) {
             $current_context = $this->_environment->getCurrentContextItem();
             if ($current_context->withOnlySimpleDiscussionType() or $current_context->withBothDiscussionTypes()) {
                 // and discussion_item->is_linear()
                 $retour .= '   <script type="text/javascript" src="javascript/CommSyAutoSave.js"></script>' . LF;
                 $retour .= '   <script type="text/javascript">' . LF;
                 $retour .= '      <!--' . LF;
                 $retour .= '         var timerID = null;' . LF;
                 $retour .= '         var timerRunning = false;' . LF;
                 $retour .= '         var startDate;' . LF;
                 $retour .= '         var startSecs;' . LF;
                 global $c_autosave_mode;
                 $retour .= '         var dispMode = ' . $c_autosave_mode . ';' . LF;
                 global $c_autosave_limit;
                 $retour .= '         var sessLimit = ' . $c_autosave_limit * 60 . ';' . LF;
                 $retour .= '      -->' . LF;
                 $retour .= '   </script>' . LF;
             }
         }
     } elseif ($this->_environment->getCurrentFunction() == 'index') {
         $retour .= '   <script type="text/javascript">' . LF;
         $retour .= '      <!--' . LF;
         $retour .= '   var message = \'' . $this->_translator->getMessage('COMMON_PICTURE_DOWNLOADFILE') . '\';' . LF;
         $retour .= '      -->' . LF;
         $retour .= '   </script>' . LF;
         if (!$this->_environment->getCurrentModule() == 'configuration') {
             #$retour .= '   <script src="javascript/slimbox/js/slimbox.js" type="text/javascript"></script>'.LF;
         }
     } elseif ($this->_environment->getCurrentFunction() == 'edit' or $this->_environment->getCurrentModule() == 'mail' or $this->_environment->getCurrentFunction() == 'mail' or $this->_environment->getCurrentFunction() == 'info_text_edit' or $this->_environment->getCurrentFunction() == 'info_text_form_edit' or $this->_environment->getCurrentFunction() == 'close' or $this->_environment->getCurrentFunction() == 'import' or $this->_environment->getCurrentFunction() == 'preferences' or $this->_environment->getCurrentModule() == 'user' and $this->_environment->getCurrentFunction() == 'preferences' or $this->_environment->getCurrentModule() == 'user' and $this->_environment->getCurrentFunction() == 'action' or $this->_environment->getCurrentModule() == 'configuration' or $this->_environment->getCurrentModule() == 'account' or $this->_environment->getCurrentModule() == 'material_admin') {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyNetnavigation.js"></script>'.LF;
         // jQuery
         $retour .= '   <script type="text/javascript" src="javascript/CommSyTextFormatingInformation.js"></script>' . LF;
         if (!$this->_environment->inServer()) {
             $retour .= '   <script type="text/javascript">' . LF;
             $retour .= '      <!--' . LF;
             $retour .= '   var message = \'' . $this->_translator->getMessage('COMMON_PICTURE_DOWNLOADFILE') . '\';' . LF;
             $retour .= '      -->' . LF;
             $retour .= '   </script>' . LF;
             #$retour .= '   <script src="javascript/slimbox/js/slimbox.js" type="text/javascript"></script>'.LF;
         }
         //autosave: BEGIN
         $current_user = $this->_environment->getCurrentUser();
         if ($current_user->isAutoSaveOn() and $this->_environment->getCurrentFunction() == 'edit' and ($this->_environment->getCurrentModule() == CS_ANNOUNCEMENT_TYPE or $this->_environment->getCurrentModule() == CS_DATE_TYPE or $this->_environment->getCurrentModule() == CS_TODO_TYPE or $this->_environment->getCurrentModule() == CS_MATERIAL_TYPE or $this->_environment->getCurrentModule() == CS_SECTION_TYPE or $this->_environment->getCurrentModule() == CS_DISCUSSION_TYPE or $this->_environment->getCurrentModule() == CS_DISCARTICLE_TYPE or $this->_environment->getCurrentModule() == CS_TOPIC_TYPE or $this->_environment->getCurrentModule() == CS_INSTITUTION_TYPE or $this->_environment->getCurrentModule() == CS_GROUP_TYPE or $this->_environment->getCurrentModule() == CS_ANNOTATION_TYPE)) {
             $retour .= '   <script type="text/javascript" src="javascript/CommSyAutoSave.js"></script>' . LF;
         }
     }
     if ($this->_environment->getCurrentModule() == 'material_admin' or $this->_environment->getCurrentModule() == 'account') {
         // jQuery
         //$retour .= '   <script type="text/javascript" src="javascript/CommSyNetnavigation.js"></script>'.LF;
         // jQuery
     }
     // jQuery
     if (!($this->_environment->getCurrentBrowser() == 'MSIE' && mb_substr($this->_environment->getCurrentBrowserVersion(), 0, 1) == '6')) {
         #$retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery-1.3.2.min.js"></script>'.LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery-1.4.1.min.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery-ui-1.7.2.custom.min.js"></script>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/css/jQueryUI/smoothness/jquery-ui-1.7.2.custom.css"/>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/css/jQueryUI/additional_calendar/jquery-ui-1.7.2.custom.css"/>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery.scrollTo-1.4.2/jquery.scrollTo-min.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jquery.timers-1.2/jquery.timers.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/jScrollPane/jScrollPane-1.2.1.js"></script>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/jScrollPane/css/jScrollPane.css"/>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/mousewheel/jquery.mousewheel.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/stickytooltip/stickytooltip.js"></script>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/stickytooltip/stickytooltip.css"/>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/dynatree/jquery.dynatree.js"></script>' . LF;
         $retour .= '   <link rel="stylesheet" type="text/css" href="javascript/jQuery/dynatree/skin/ui.dynatree.css"/>' . LF;
         $retour .= '   <script type="text/javascript">' . LF;
         $retour .= '      <!--' . LF;
         $retour .= '   var datepicker_language = \'' . $this->_translator->getSelectedLanguage() . '\';' . LF;
         $retour .= '   var datepicker_choose = \'' . $this->_translator->getMessage('COMMON_DATEPICKER_CHOOSE') . '\';' . LF;
         $retour .= '      -->' . LF;
         $retour .= '   </script>' . LF;
         #$retour .= '   <script type="text/javascript" src="javascript/jQuery/commsy/commsy_functions_7_1_0_2.js"></script>'.LF;
         include_once 'functions/misc_functions.php';
         $commsy_functions = getCurrentCommSyFunctions();
         $retour .= '   <script type="text/javascript" src="javascript/jQuery/' . $commsy_functions . '"></script>' . LF;
         $retour .= '   <script src="javascript/jQuery/jquery.fancybox-1.3.1/fancybox/jquery.fancybox-1.3.1.js" type="text/javascript"></script>' . LF;
     } else {
         $retour .= '   <script type="text/javascript" src="javascript/CommSyFunctions.js"></script>' . LF;
         $retour .= '   <script src="javascript/mootools-release-1.11.js" type="text/javascript"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/CommSyPanels7.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/CommSyTemplateInformation.js"></script>' . LF;
         #$retour .= '   <script src="javascript/slimbox/js/slimbox.js" type="text/javascript"></script>'.LF;
         $retour .= '   <script type="text/javascript" src="javascript/CommSyNetnavigation.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/CommSyCreatorInformation.js"></script>' . LF;
         $retour .= '   <script type="text/javascript" src="javascript/CommSyTextFormatingInformation.js"></script>' . LF;
         #$retour .= '   <link rel="stylesheet" media="screen" type="text/css" href="javascript/slimbox/css/slimbox.css"/>'.LF;
     }
     // jQuery
     global $c_jsmath_enable;
     if (isset($c_jsmath_enable) and $c_jsmath_enable) {
         $retour .= '   <script type="text/javascript"> jsMath = {Controls: {cookie: {scale: 120}}} </script>' . LF;
         global $c_jsmath_url;
         $retour .= '   <script type="text/javascript" src="' . $c_jsmath_url . '/jsMath.js"></script>' . LF;
     }
     return $retour;
 }