Index: lang/en_utf8/moodle.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lang/en_utf8/moodle.php,v
retrieving revision 1.149
diff -u -r1.149 moodle.php
--- lang/en_utf8/moodle.php	13 Nov 2007 08:43:27 -0000	1.149
+++ lang/en_utf8/moodle.php	19 Nov 2007 15:02:11 -0000
@@ -749,6 +749,7 @@
 $string['hide'] = 'Hide';
 $string['hideadvancedsettings'] = 'Hide advanced settings';
 $string['hidepicture'] = 'Hide picture';
+$string['hidesection'] = 'Hide section $a';
 $string['hidesettings'] = 'Hide settings';
 $string['hits'] = 'Hits';
 $string['hitsoncourse'] = 'Hits on $a->coursename by $a->username';
@@ -951,6 +952,7 @@
 $string['movehere'] = 'Move to here';
 $string['moveleft'] = 'Move left';
 $string['moveright'] = 'Move right';
+$string['movesection'] = 'Move section $a';
 $string['moveselectedcoursesto'] = 'Move selected courses to...';
 $string['movetoanotherfolder'] = 'Move to another folder';
 $string['moveup'] = 'Move up';
Index: lib/ajax/section_classes.js
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/ajax/section_classes.js,v
retrieving revision 1.35
diff -u -r1.35 section_classes.js
--- lib/ajax/section_classes.js	27 Aug 2007 16:59:05 -0000	1.35
+++ lib/ajax/section_classes.js	19 Nov 2007 15:02:12 -0000
@@ -88,13 +88,14 @@
         commandContainer.removeChild(commandContainer.childNodes[i])
     }
 
-    if (!this.isWeekFormat) {        
-        var highlightbutton = main.mk_button('div', '/i/marker.gif');
+    if (!this.isWeekFormat) {
+        var highlightbutton = main.mk_button('div', '/i/marker.gif', main.getString('marker', this.sectionId));
         YAHOO.util.Event.addListener(highlightbutton, 'click', this.mk_marker, this, true);
         commandContainer.appendChild(highlightbutton); 
-        this.highlightButton = highlightbutton;            
+        this.highlightButton = highlightbutton;
     }
-    var viewbutton = main.mk_button('div', '/i/hide.gif');
+    var viewbutton = main.mk_button('div', '/i/hide.gif', main.getString('hidesection', this.sectionId),
+            [['title', main.portal.strings['hide'] ]]);
     YAHOO.util.Event.addListener(viewbutton, 'click', this.toggle_hide, this,true);
     commandContainer.appendChild(viewbutton);
     this.viewButton = viewbutton;
@@ -102,8 +103,8 @@
 
 
 section_class.prototype.add_handle = function() {
-    var handleRef = main.mk_button('a', '/i/move_2d.gif',
-            [['style','cursor:move'], ['title', main.portal.strings['move']]]);
+    var handleRef = main.mk_button('a', '/i/move_2d.gif', main.getString('movesection', this.sectionId),
+            [['title', main.portal.strings['move'] ], ['style','cursor:move']]);
 
     YAHOO.util.Dom.generateId(handleRef, 'sectionHandle');
 
@@ -284,9 +285,13 @@
 
 
 section_class.prototype.toggle_hide = function(e,target,superficial) {
-    if (this.hidden) {  
+    var strhide = main.portal.strings['hide'];
+    var strshow = main.portal.strings['show'];
+    if (this.hidden) {
         YAHOO.util.Dom.removeClass(this.getEl(), 'hidden');
-        this.viewButton.childNodes[0].src = this.viewButton.childNodes[0].src.replace(/show.gif/i, 'hide.gif');          
+        this.viewButton.childNodes[0].src = this.viewButton.childNodes[0].src.replace(/show.gif/i, 'hide.gif');
+        this.viewButton.childNodes[0].alt = this.viewButton.childNodes[0].alt.replace(strshow, strhide);
+        this.viewButton.title = this.viewButton.title.replace(strshow, strhide);
         this.hidden = false;
 
         if (!superficial) {
@@ -299,7 +304,9 @@
 
     } else {
         YAHOO.util.Dom.addClass(this.getEl(), 'hidden');
-        this.viewButton.childNodes[0].src = this.viewButton.childNodes[0].src.replace(/hide.gif/i, 'show.gif');           
+        this.viewButton.childNodes[0].src = this.viewButton.childNodes[0].src.replace(/hide.gif/i, 'show.gif');
+        this.viewButton.childNodes[0].alt = this.viewButton.childNodes[0].alt.replace(strhide, strshow);
+        this.viewButton.title = this.viewButton.title.replace(strhide, strshow);
         this.hidden = true;
 
         if (!superficial) {
@@ -606,8 +613,8 @@
     commandContainer.innerHTML = '';
 
     // Add move-handle for drag and drop.
-    var handleRef = main.mk_button('a', '/i/move_2d.gif',
-            [['style', 'cursor:move'], ['title', main.portal.strings['move']]],
+    var handleRef = main.mk_button('a', '/i/move_2d.gif', main.portal.strings['move'],
+            [['style', 'cursor:move']],
             [['height', '11'], ['width', '11'], ['style', 'margin-right:3px; border:0;']]);
 
     YAHOO.util.Dom.generateId(handleRef, 'sectionHandle');
@@ -617,16 +624,16 @@
 
     // Add indentation buttons if needed (move left, move right).
     if (moveLeft) {
-        var button = main.mk_button('a', '/t/left.gif', [['title', main.portal.strings['moveleft']],
-                ['class', 'editing_moveleft']]);
+        var button = main.mk_button('a', '/t/left.gif', main.portal.strings['moveleft'],
+                [['class', 'editing_moveleft']]);
         YAHOO.util.Event.addListener(button, 'click', this.indent_left, this, true);
         commandContainer.appendChild(button);
         this.indentLeftButton = button;
     }
 
     if (moveRight) {
-        var button = main.mk_button('a', '/t/right.gif', [['title', main.portal.strings['moveright']],
-                ['class', 'editing_moveright']]);
+        var button = main.mk_button('a', '/t/right.gif', main.portal.strings['moveright'],
+                [['class', 'editing_moveright']]);
         YAHOO.util.Event.addListener(button, 'click', this.indent_right, this, true);
         commandContainer.appendChild(button);
         this.indentRightButton = button;
@@ -636,15 +643,15 @@
     commandContainer.appendChild(updateButton);
 
     // Add the delete button.
-    var button = main.mk_button('a', '/t/delete.gif');
+    var button = main.mk_button('a', '/t/delete.gif', main.portal.strings['delete']);
     YAHOO.util.Event.addListener(button, 'click', this.delete_button, this, true);
     commandContainer.appendChild(button);
 
     // Add the hide or show button.
     if (this.hidden) {
-        var button = main.mk_button('a', '/t/show.gif');
+        var button = main.mk_button('a', '/t/show.gif', main.portal.strings['show']);
     } else {
-        var button = main.mk_button('a', '/t/hide.gif');
+        var button = main.mk_button('a', '/t/hide.gif', main.portal.strings['hide']);
     }
     YAHOO.util.Event.addListener(button, 'click', this.toggle_hide, this, true);
     commandContainer.appendChild(button);
@@ -653,11 +660,11 @@
     // Add the groupmode button if needed.
     if (this.groupmode != null) {
         if (this.groupmode == this.NOGROUPS) {
-            var button = main.mk_button('a', '/t/groupn.gif', [['title', strgroupsnone]]);
+            var button = main.mk_button('a', '/t/groupn.gif', strgroupsnone);
         } else if (this.groupmode == this.SEPARATEGROUPS) {
-            var button = main.mk_button('a', '/t/groups.gif', [['title', strgroupsseparate]]);
+            var button = main.mk_button('a', '/t/groups.gif', strgroupsseparate);
         } else {
-            var button = main.mk_button('a', '/t/groupv.gif', [['title', strgroupsvisible]]);
+            var button = main.mk_button('a', '/t/groupv.gif', strgroupsvisible);
         }
         YAHOO.util.Event.addListener(button, 'click', this.toggle_groupmode, this, true);
         commandContainer.appendChild(button);
@@ -704,6 +711,7 @@
 
         spacer.setAttribute('src', main.portal.strings['pixpath']+'/spacer.gif');
         spacer.className = 'spacer';
+        spacer.setAttribute('alt', '');
         spacer.setAttribute('width', '20');
         spacer.setAttribute('height', '12');
 
@@ -717,8 +725,8 @@
             'span', this.getEl())[0];
 
     if (!this.indentLeftButton) {
-        var button = main.mk_button('a', '/t/left.gif', [['title', main.portal.strings['moveleft']],
-                ['class', 'editing_moveleft']]);
+        var button = main.mk_button('a', '/t/left.gif', main.portal.strings['moveleft'],
+                [['class', 'editing_moveleft']]);
         YAHOO.util.Event.addListener(button, 'click', this.indent_left, this, true);
         commandContainer.insertBefore(button, this.indentRightButton);
         this.indentLeftButton = button;
@@ -729,6 +737,8 @@
 
 
 resource_class.prototype.toggle_hide = function(target, e, superficial, force) {
+    var strhide = main.portal.strings['hide'];
+    var strshow = main.portal.strings['show'];
     if (force != null) {
         if (this.debug) {
             YAHOO.log("Resource "+this.getEl().id+" forced to "+force);
@@ -738,6 +748,8 @@
     if (this.hidden) {
         YAHOO.util.Dom.removeClass(this.linkContainer, 'dimmed');
         this.viewButton.childNodes[0].src = this.viewButton.childNodes[0].src.replace(/show.gif/i, 'hide.gif');
+        this.viewButton.childNodes[0].alt = this.viewButton.childNodes[0].alt.replace(strshow, strhide);
+        this.viewButton.title = this.viewButton.title.replace(strshow, strhide);
         this.hidden = false;  
 
         if (!superficial) {
@@ -746,6 +758,8 @@
     } else {
         YAHOO.util.Dom.addClass(this.linkContainer, 'dimmed');
         this.viewButton.childNodes[0].src = this.viewButton.childNodes[0].src.replace(/hide.gif/i, 'show.gif');
+        this.viewButton.childNodes[0].alt = this.viewButton.childNodes[0].alt.replace(strhide, strshow);
+        this.viewButton.title = this.viewButton.title.replace(strhide, strshow);
         this.hidden = true;
 
         if (!superficial) {
@@ -764,7 +778,7 @@
         this.groupmode = 0;
     }
 
-    var newtitle = this.groupButton.getElementsByTagName('img')[0].title;
+    var newtitle = this.groupButton.title;
 
     switch (this.groupmode) {
         case 0:
@@ -777,8 +791,9 @@
             newtitle = main.portal.strings['groupsvisible']+' ('+main.portal.strings['clicktochange']+')';
             break;
     }
-    
-    this.groupButton.getElementsByTagName('img')[0].title = newtitle;         
+
+    this.groupButton.getElementsByTagName('img')[0].alt = newtitle;
+    this.groupButton.title = newtitle;
 
     this.groupButton.getElementsByTagName('img')[0].src = main.portal.strings['pixpath']+this.groupImages[this.groupmode];
     main.connect('POST', 'class=resource&field=groupmode', null, 'value='+this.groupmode+'&id='+this.id);
Index: lib/ajax/ajaxcourse.js
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/ajax/ajaxcourse.js,v
retrieving revision 1.9
diff -u -r1.9 ajaxcourse.js
--- lib/ajax/ajaxcourse.js	9 May 2007 01:11:45 -0000	1.9
+++ lib/ajax/ajaxcourse.js	19 Nov 2007 15:02:12 -0000
@@ -144,14 +144,18 @@
     }
 }
 
-
-main_class.prototype.mk_button = function(tag, imgSrc, attributes, imgAttributes) {
-    //create button and return object   
+//As a minimum set the text parameter - the container TITLE or image ALT attributes can be overridden, eg.
+//  main.mk_button('a', '/i/move_2d.gif', strmove, [['title', strmoveshort]]);
+main_class.prototype.mk_button = function(tag, imgSrc, text, attributes, imgAttributes) {
+    //create button and return object
     var container = document.createElement(tag);
-    container.style.cursor = 'pointer';       
+    container.style.cursor = 'pointer';
+    container.setAttribute('title', text);
     var image = document.createElement('img');
 
     image.setAttribute('src', main.portal.strings['pixpath']+imgSrc);
+    image.setAttribute('alt', text);
+    //image.setAttribute('title', '');
     container.appendChild(image);
 
     if (attributes != null) {
@@ -160,8 +164,8 @@
         }
     }
     if (imgAttributes != null) {
-        for (var c=0; c<attributes.length; c++) {
-            image.setAttribute(imgAttributes[c][0], imgAttributes[c][1]);                
+        for (var c=0; c<imgAttributes.length; c++) {
+            image.setAttribute(imgAttributes[c][0], imgAttributes[c][1]);
         }
     }
     image.setAttribute('hspace', '3');
@@ -222,9 +226,9 @@
 }
 
 
-main_class.prototype.getString = function(title, variable) {
-    if (this.portal.strings[title]) {
-        return this.portal.strings[title].replace(/_var_/, variable);
+main_class.prototype.getString = function(identifier, variable) {
+    if (this.portal.strings[identifier]) {
+        return this.portal.strings[identifier].replace(/_var_/, variable);
     }
 }
 
Index: lib/ajax/ajaxlib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/ajax/ajaxlib.php,v
retrieving revision 1.40
diff -u -r1.40 ajaxlib.php
--- lib/ajax/ajaxlib.php	9 May 2007 01:11:49 -0000	1.40
+++ lib/ajax/ajaxlib.php	19 Nov 2007 15:02:12 -0000
@@ -195,7 +195,14 @@
         $output .= "    main.portal.blocks = new Array(".$blocksoutput.");\n";
         $output .= "    main.portal.strings['wwwroot']='".$CFG->wwwroot."';\n";
         $output .= "    main.portal.strings['pixpath']='".$CFG->pixpath."';\n";
+        $output .= "    main.portal.strings['marker']='".get_string('markthistopic', '', '_var_')."';\n";
+        $output .= "    main.portal.strings['marked']='".get_string('markedthistopic', '', '_var_')."';\n";
+        $output .= "    main.portal.strings['hide']='".get_string('hide')."';\n";
+        $output .= "    main.portal.strings['hidesection']='".get_string('hidesection', '', '_var_')."';\n";
+        $output .= "    main.portal.strings['show']='".get_string('show')."';\n";
+        $output .= "    main.portal.strings['delete']='".get_string('delete')."';\n";
         $output .= "    main.portal.strings['move']='".get_string('move')."';\n";
+        $output .= "    main.portal.strings['movesection']='".get_string('movesection', '', '_var_')."';\n";
         $output .= "    main.portal.strings['moveleft']='".get_string('moveleft')."';\n";
         $output .= "    main.portal.strings['moveright']='".get_string('moveright')."';\n";
         $output .= "    main.portal.strings['update']='".get_string('update')."';\n";
Index: lib/ajax/block_classes.js
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/ajax/block_classes.js,v
retrieving revision 1.17
diff -u -r1.17 block_classes.js
--- lib/ajax/block_classes.js	9 May 2007 01:11:49 -0000	1.17
+++ lib/ajax/block_classes.js	19 Nov 2007 15:02:12 -0000
@@ -202,10 +202,10 @@
 
 
 block_class.prototype.init_buttons = function() {
-    var viewbutton = main.mk_button('a', '/t/hide.gif', [['class', 'icon hide']]);
+    var viewbutton = main.mk_button('a', '/t/hide.gif', main.portal.strings['hide'], [['class', 'icon hide']]);
     YAHOO.util.Event.addListener(viewbutton, 'click', this.toggle_hide, this, true);
 
-    var deletebutton = main.mk_button('a', '/t/delete.gif', [['class', 'icon delete']]);
+    var deletebutton = main.mk_button('a', '/t/delete.gif', main.portal.strings['delete'], [['class', 'icon delete']]);
     YAHOO.util.Event.addListener(deletebutton, 'click', this.delete_button, this, true);
 
     this.viewbutton = viewbutton;
@@ -220,10 +220,13 @@
 
 
 block_class.prototype.toggle_hide = function(e, target, isCosmetic) {
-
+    var strhide = main.portal.strings['hide'];
+    var strshow = main.portal.strings['show'];
     if (YAHOO.util.Dom.hasClass(this.getEl(), 'hidden')) {
         this.getEl().className = this.originalClass;
         this.viewbutton.childNodes[0].src = this.viewbutton.childNodes[0].src.replace(/show.gif/i, 'hide.gif');
+        this.viewbutton.childNodes[0].alt = this.viewbutton.childNodes[0].alt.replace(strshow, strhide);
+        this.viewbutton.title = this.viewbutton.title.replace(strshow, strhide);
 
         if (!isCosmetic) {
             main.connect('POST', 'class=block&field=visible', null,
@@ -233,6 +236,8 @@
         this.originalClass = this.getEl().className;
         this.getEl().className = "hidden sideblock";
         this.viewbutton.childNodes[0].src = this.viewbutton.childNodes[0].src.replace(/hide.gif/i,'show.gif');
+        this.viewbutton.childNodes[0].alt = this.viewbutton.childNodes[0].alt.replace(strhide, strshow);
+        this.viewbutton.title = this.viewbutton.title.replace(strhide, strshow);
 
         if (!isCosmetic) {
             main.connect('POST', 'class=block&field=visible', null,
