function resetWysiwygi(hDiv)
{
 //alert("resetWysiwygi()");
 if (document.htmlareas != undefined)
 {
   var counter = document.htmlareas.length;
   // alert(counter);

   for (i=0; i<counter; i++)
   {
    // alert("i="+i);
    var editor = document.htmlareas[i][1];
    if (editor == undefined)
    {
      // in a bad state, so we recreate wysiwyg
      // first look up the ith wysiwyg id
      var ta = document.htmlareas[i][0];
      // alert("ta = " + ta);

      // check if the textarea is in the division
      var tas = hDiv.getElementsByTagName("textarea");
      for (j=0; j<tas.length; j++)
      {
       var childId = tas[j].id;
       // alert("childId=" + childId);

       if (childId==ta)
       {
        // we make sure that the textarea is not set to "none"
        tas[j].style.display = "block";

        // finally, create a configuration and assign an HTMLArea to this textarea
        var config=new HTMLArea.Config();
        config.toolbar = [['fontname', 'space','fontsize', 'space','formatblock',
          'space','bold', 'italic', 'underline'],    ['separator','strikethrough',
          'subscript', 'superscript', 'separator', 'space', 'undo', 'redo',
          'separator', 'justifyleft', 'justifycenter', 'justifyright',
          'justifyfull', 'separator','outdent', 'indent'],        ['separator',
          'forecolor', 'hilitecolor', 'textindicator', 'separator',
          'inserthorizontalrule', 'createlink', 'insertimage', 'separator',
          'showhelp', 'about' ],];
        config.width='450px';
        config.height='140px';
        editor = HTMLArea.replace(ta,config);
        document.htmlareas[i][1] = editor;
        break;
       }
     }
    }
   }
 }
 else 
 {
    var tas = hDiv.getElementsByTagName("textarea");
    for (j=0; j<tas.length; j++)
    {
       var childId = tas[j].id;
       if (document.wysiwyg == "FCKeditor")
       {
           editor = FCKeditorAPI.GetInstance(childId);
           if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
              editor.SwitchEditMode()
              editor.SwitchEditMode()
           }
       }  

    }
    return;
 }


}
// for all wysiwygs in division; needed for Gecko based browsers
for all wysiwygs in division; needed for Gecko based browsers
for all wysiwygs in division ; needed for Gecko based browsers
function resetWysiwygi(hDiv)
{
 if (document.htmlareas != undefined)
 {
   var counter = document.htmlareas.length;
   for (i=0; i<counter; i++)
   {
    var editor = document.htmlareas[i][1];
    if (editor == undefined)
    {
      var ta = document.htmlareas[i][0];
      var tas = hDiv.getElementsByTagName("textarea");
      for (j=0; j<tas.length; j++)
      {
       var childId = tas[j].id;
       if (childId==ta)
       {
        tas[j].style.display = "block";
        var config=new HTMLArea.Config();
        config.toolbar = [['fontname', 'space','fontsize', 'space','formatblock',
          'space','bold', 'italic', 'underline'],    ['separator','strikethrough',
          'subscript', 'superscript', 'separator', 'space', 'undo', 'redo',
          'separator', 'justifyleft', 'justifycenter', 'justifyright',
          'justifyfull', 'separator','outdent', 'indent'],        ['separator',
          'forecolor', 'hilitecolor', 'textindicator', 'separator',
          'inserthorizontalrule', 'createlink', 'insertimage', 'separator',
          'showhelp', 'about' ],];
        config.width='450px';
        config.height='140px';
        editor = HTMLArea.replace(ta,config);
        document.htmlareas[i][1] = editor;
        break;
       }
     }
    }
   }
 }
 else 
 {
    var tas = hDiv.getElementsByTagName("textarea");
    for (j=0; j<tas.length; j++)
    {
       var childId = tas[j].id;
       if (document.wysiwyg == "FCKeditor")
       {
           editor = FCKeditorAPI.GetInstance(childId);
           if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
              editor.SwitchEditMode()
              editor.SwitchEditMode()
           }
       }  
    }
    return;
 }
}
function resetWysiwygi ( hDiv ) { if ( document . htmlareas != undefined ) { var counter = document . htmlareas . length ; for ( i = 0 ; i < counter ; i ++ ) { var editor = document . htmlareas [ i ] [ 1 ] ; if ( editor == undefined ) { var ta = document . htmlareas [ i ] [ 0 ] ; var tas = hDiv . getElementsByTagName ( "textarea" ) ; for ( j = 0 ; j < tas . length ; j ++ ) { var childId = tas [ j ] . id ; if ( childId == ta ) { tas [ j ] . style . display = "block" ; var config = new HTMLArea . Config ( ) ; config . toolbar = [ [ 'fontname' , 'space' , 'fontsize' , 'space' , 'formatblock' , 'space' , 'bold' , 'italic' , 'underline' ] , [ 'separator' , 'strikethrough' , 'subscript' , 'superscript' , 'separator' , 'space' , 'undo' , 'redo' , 'separator' , 'justifyleft' , 'justifycenter' , 'justifyright' , 'justifyfull' , 'separator' , 'outdent' , 'indent' ] , [ 'separator' , 'forecolor' , 'hilitecolor' , 'textindicator' , 'separator' , 'inserthorizontalrule' , 'createlink' , 'insertimage' , 'separator' , 'showhelp' , 'about' ] , ] ; config . width = '450px' ; config . height = '140px' ; editor = HTMLArea . replace ( ta , config ) ; document . htmlareas [ i ] [ 1 ] = editor ; break ; } } } } } else { var tas = hDiv . getElementsByTagName ( "textarea" ) ; for ( j = 0 ; j < tas . length ; j ++ ) { var childId = tas [ j ] . id ; if ( document . wysiwyg == "FCKeditor" ) { editor = FCKeditorAPI . GetInstance ( childId ) ; if ( editor && editor . EditorDocument && editor . EditMode == FCK_EDITMODE_WYSIWYG ) { editor . SwitchEditMode ( ) editor . SwitchEditMode ( ) } } } return ; } }
for all wysiwygs in division; needed for Gecko based browsers
for all wysiwygs in division ; needed for Gecko based browsers
//alert("resetWysiwygi()"); // alert(counter); // alert("i="+i); // in a bad state, so we recreate wysiwyg // first look up the ith wysiwyg id // alert("ta = " + ta); // check if the textarea is in the division // alert("childId=" + childId); // we make sure that the textarea is not set to "none" // finally, create a configuration and assign an HTMLArea to this textarea