if ($this->tempcontent !== '') {
$this->content = new stdClass;
- $this->content->text = '<script type="text/javascript">' . "\n\n";
+ $this->content->text = '<script type="text/javascript">'."\n";
+ $this->content->text .= '<!--' . "\n";
$this->content->text .= 'var vh_numspans = ' . ($this->spancounter - 1) . ';' . "\n";
$this->content->text .= 'var vh_content = new Array();' . "\n";
$this->content->text .= 'function getspan(spanid) {' . "\n";
$this->content->text .= '}' . "\n";
$this->content->text .= 'function collapseall() {' . "\n";
- $this->content->text .= ' for (i = vh_numspans; i > 0; i--) {' . "\n";
+ $this->content->text .= ' for (i = vh_numspans; i > 0; i=i-1 ) {' . "\n";
$this->content->text .= ' collapse("vh_span" + String(i));' . "\n";
$this->content->text .= ' }' . "\n";
$this->content->text .= '}' . "\n";
+ $this->content->text .= '-->' . "\n";
$this->content->text .= '</script>' . "\n";
$this->content->text .= '<div align="left">' . "\n";
$this->content->text .= '</div>' . "\n";
$this->content->text .= '<script type="text/javascript">' . "\n";
+ $this->content->text .= '<!--' . "\n";
$this->content->text .= 'collapseall();' . "\n";
$this->content->text .= $this->expandjavascript;
+ $this->content->text .= '-->' . "\n";
$this->content->text .= '</script>' . "\n";
$searchcontent = isset($CFG->adminsearchquery) ? $CFG->adminsearchquery : '';