Index: /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/css/spell_checker.css
===================================================================
--- /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/css/spell_checker.css	(revision 2375)
+++ /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/css/spell_checker.css	(revision 2430)
@@ -26,4 +26,13 @@
 .corrected_word
 {
+	color: #005500;
+}
+
+
+.ignore {
+	cursor: pointer;
+	text-decoration: underline;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 11px;
 	color: #005500;
 }
Index: /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/spell_checker.php
===================================================================
--- /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/spell_checker.php	(revision 2405)
+++ /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/spell_checker.php	(revision 2430)
@@ -126,8 +126,13 @@
 			$retVal .= "<div class=\"addtoDictionary\" onclick=\"addWord('" . addslashes_custom($id) . "'); return false;\">Add To Dictionary</div>";
 		}
+
+                //Ignore the suggestion - Added by Nathalie
+                $retVal .= "<div class=\"ignore\" onclick=\"replaceWord('" .  addslashes_custom($id)  . "', '" .   addslashes($word)   . "'); return false;\"> Ignorar </div>";
+
+
 	}
 	else
 	{
-		$retVal .= "No Suggestions";
+		$retVal .= "Sem sugestÃ£o";
 	}
 	
Index: /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/js/spell_checker.js
===================================================================
--- /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/js/spell_checker.js	(revision 2407)
+++ /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/js/spell_checker.js	(revision 2430)
@@ -40,12 +40,16 @@
 var currObj; //the current spell checker being used
 var spellingSuggestionsDiv;
-var old_onclick
+var old_onclick;
+var positionEditor;
+var areaEditor;
+var abaEditor; 
 cp = new cpaint();
 cp.set_transfer_mode('post');
 cp.set_response_type('text');
-function beginSpellCheck(){
-
+function beginSpellCheck(position, area, aba){
+
+    
     //var cp = new cpaint();
-   // alert("Seta globals");
+    // alert("Seta globals");
     //cp = new cpaint();
     //cp.set_transfer_mode('post');
@@ -56,6 +60,9 @@
     //var spellingSuggestionsDiv = null;  // Auto-generated suggestions div
 
+    spellingSuggestionsDiv = null;
+    positionEditor = position;
+    areaEditor = area;
+    abaEditor = aba; 
     
-    spellingSuggestionsDiv = null;
 
     //alert("Seta globals");
@@ -118,44 +125,17 @@
 function setupSpellCheckers()
 {
-	var ifr = document.getElementsByTagName('iframe')[0];
-	var numSpellCheckers = 0;
-	//var tempSpellCheckers = Array();
-                
-        if(ifr.contentWindow)
-           ifr=ifr.contentWindow.document;
-        else
-           ifr=ifr.contentDocument;
-        var texto = ifr.body.innerHTML;
-
-       //  alert("valor textarea");
-       //  alert(texto);
-        // //tempSpellCheckers[numSpellCheckers] = textareas;
-         var tempWidth = "300";
-         var tempHeight = "300";
-         
-        // alert("Antes AjaxSpell");
-         eval('spellCheckers' + numSpellCheckers + '= new ajaxSpell("spellCheckers' + numSpellCheckers + '", tempWidth, tempHeight, "spell_checker/spell_checker.php", "body_position_1", "Nome", "body_1", "Titulo", texto);');
-
-        
-         //new  ajaxSpell('spellTexto', tempWidth, tempHeight, 'spell_checker.php' ,'body_position_1', 'Nome','body_1', 'Titulo', texto);
-         
-         //ajaxSpell("", "", "", "" ,"", "","", "", "");
-
-        //}
-
-	/*for(var i=0; i < textareas.length; i++)
-	{
-		alert("ok iframe");
-                if(textareas[i].getAttribute("title") == "spellcheck" || textareas[i].getAttribute("title") == "spellcheck_icons")
-		{
-			tempSpellCheckers[numSpellCheckers] = textareas[i];
-			
-			//create a new spellchecker for this textarea
-			var tempWidth = tempSpellCheckers[numSpellCheckers].offsetWidth + 'px';
-			var tempHeight = tempSpellCheckers[numSpellCheckers].offsetHeight + 'px';
-			eval('spellCheckers' + numSpellCheckers + '= new ajaxSpell("spellCheckers' + numSpellCheckers + '", tempWidth, tempHeight, tempSpellCheckers[' + numSpellCheckers + '].getAttribute("accesskey"), "spellCheckDiv' + numSpellCheckers + '", tempSpellCheckers[' + numSpellCheckers + '].getAttribute("name"), tempSpellCheckers[' + numSpellCheckers + '].id, tempSpellCheckers[' + numSpellCheckers + '].title, tempSpellCheckers[' + numSpellCheckers + '].value);');
-			numSpellCheckers++;
-		}
-	}*/
+    var ifr = document.getElementsByTagName('iframe')[0];
+    var numSpellCheckers = abaEditor;
+
+    if(ifr.contentWindow)
+    ifr=ifr.contentWindow.document;
+    else
+    ifr=ifr.contentDocument;
+    var texto = ifr.body.innerHTML;
+
+    var tempWidth = "99%";
+    var tempHeight = "300";
+
+    eval('spellCheckers' + numSpellCheckers + '= new ajaxSpell("spellCheckers' + numSpellCheckers + '", tempWidth, tempHeight, "spell_checker/spell_checker.php", positionEditor, "Nome", areaEditor, "Titulo", texto);');
 	
 }; // end setInit
@@ -181,6 +161,5 @@
 function ajaxSpell(varName, width, height, spellUrl, divId, name, id, title, value)
 {
-	//alert("ajaxSpell");
-
+	
         currObj = this;
 
@@ -195,6 +174,7 @@
 	currObj.config['title']      = title;               //the title (specifies whether to use icons or not);
 	currObj.config['value']      = value;               //the value of the text box when the page was loaded
-
-	currObj.config['value']      = currObj.config['value'].replace(/<br *\/?>/gi, "\n");
+        currObj.config['aba']      = abaEditor;
+
+	//currObj.config['value']      = currObj.config['value'].replace(/<br *\/?>/gi, "\n"); // Comment from the original by Nathalie
 	
 	currObj.config['useIcons'] = false;
@@ -243,4 +223,5 @@
 	oldElement.value = currObj.config['value'];
 	document.getElementById(currObj.config['divId']).appendChild(oldElement);
+
 	
 	currObj.objToCheck              = document.getElementById(currObj.config['id']);      //the actual object we're spell checking
@@ -258,4 +239,7 @@
 	ajaxSpell.prototype.resetSpellChecker    = resetSpellChecker;
 	ajaxSpell.prototype.resetAction          = resetAction;
+
+      
+        
 }; // end ajaxSpell
 
@@ -271,5 +255,6 @@
 function setCurrentObject(obj)
 {
-	currObj = obj;
+	currObj  = obj;
+        
         
 }; // end setCurrentObject
@@ -295,20 +280,23 @@
 	var isThereAMisspelling = new_data.charAt(0);
 	new_data = new_data.substring(1);
-		
+
 	if(currObj.spellingResultsDiv)
 	{
+            
 		currObj.spellingResultsDiv.parentNode.removeChild(spellingResultsDiv);
 	}
-	
-	currObj.spellingResultsDiv = document.createElement('DIV');
+
+        currObj.spellingResultsDiv =  document.createElement('DIV');
 	currObj.spellingResultsDiv.className = 'edit_box';
-	currObj.spellingResultsDiv.style.width = currObj.objToCheck.style.width;
-	currObj.spellingResultsDiv.style.height = currObj.objToCheck.style.height;
+        currObj.spellingResultsDiv.id = 'edit_box'; //Added the id property - By Nathalie
+	currObj.spellingResultsDiv.style.width =  "99%";//the width of the textarea
+	currObj.spellingResultsDiv.style.height = 300;  //   = height; //currObj.objToCheck.style.height;
 	currObj.spellingResultsDiv.innerHTML = new_data;
-	
-	currObj.objToCheck.style.display = "none";
+
+       	currObj.objToCheck.style.display = "none";
 	currObj.objToCheck.parentNode.insertBefore(currObj.spellingResultsDiv,currObj.objToCheck);
-	currObj.statusSpan.innerHTML = "";
-	
+	currObj.statusSpan.innerHTML = "";    
+        
+     
 	if(currObj.config['useIcons'])
 	{
@@ -346,5 +334,5 @@
        	with(currObj);
 	var query;
-	
+
 	if(currObj.spellingResultsDiv)
 	{
@@ -382,7 +370,9 @@
         
         query = texto;
-        //query = currObj.objToCheck.value;
-        
-	query = query.replace(/\r?\n/gi, "<br />");
+        //query = currObj.objToCheck.value;        
+        
+	//query = query.replace(/\r?\n/gi, "<br />"); //  Commented from the original by Nathalie
+        query = query.replace(/\r?\n/gi, " ");  // replace \n with " " - By Nathalie
+       
 	
 	cp.call(currObj.config['spellUrl'], 'spellCheck', spellCheck_cb, query, currObj.config['varName']);
@@ -436,5 +426,4 @@
 function addWord_cb(returnedData)
 {
-	//alert(returnedData);
 	with(currObj);
 	currObj.statusSpan.innerHTML = "";
@@ -459,6 +448,5 @@
 function checkClickLocation(e)
 {
-
-   // alert("checkClickLocation");
+   
     if(spellingSuggestionsDiv)
 	{
@@ -523,4 +511,5 @@
 function checkBrowser()
 {
+      
 	var theAgent = navigator.userAgent.toLowerCase();
 	if(theAgent.indexOf("msie") != -1)
@@ -581,5 +570,6 @@
 function showSuggestions_cb(new_data)
 {
-	with(currObj);
+	
+        with(currObj);
 	spellingSuggestionsDiv.innerHTML = new_data;
 	spellingSuggestionsDiv.style.display = 'block';
@@ -605,5 +595,6 @@
 function showSuggestions(word, id)
 {
-	with(currObj);
+
+        with(currObj);
 	if(currObj.config['useIcons'])
 	{
@@ -663,4 +654,5 @@
 function replaceWord(id, newWord)
 {
+     
 	document.getElementById(id).innerHTML = trim(newWord);
 	if(spellingSuggestionsDiv)
@@ -688,6 +680,9 @@
 function switchText()
 {
-	with(currObj);
-        var parentElement = currObj.spellingResultsDiv;
+
+        with(currObj);
+
+        //By Nathalie - The Element means that this div belongs to the current tab
+        var parentElement = Element(currObj.spellingResultsDiv.id); 
 
         // Obtain all span tags which have highlight className or corrected_word className
@@ -735,6 +730,7 @@
 function switchText_cb(new_string)
 {
-	with(currObj);
-        
+
+        with(currObj);
+
         new_string = new_string.replace(/ %u2026/gi, "&nbsp;"); // Replace the code %u2026 with &nbsp;
              
@@ -745,5 +741,5 @@
 
 
-	currObj.objToCheck.style.display = "none";
+	 currObj.objToCheck.style.display = "none";
 	 var ifr= currObj.objToCheck;
          if(ifr.contentWindow)
@@ -755,4 +751,5 @@
          ifr.body.innerHTML = new_string;
 	currObj.objToCheck.disabled = false;
+        
 	if(currObj.spellingResultsDiv)
 	{
@@ -776,45 +773,47 @@
 function resumeEditing()
 {
+	
+        with(currObj);
+	if(currObj.config['useIcons'])
+	{
+		currObj.actionSpan.innerHTML = "<a class=\"resume_editing\"><img src=\"images/page_white_edit.png\" width=\"16\" height=\"16\" title=\"Continuar Editando\" alt=\"Continuar Editando\" border=\"0\" /></a>";
+	}
+	else
+	{
+		currObj.actionSpan.innerHTML = "<a class=\"resume_editing\">Continuar Editando</a>";
+	}
+	if(currObj.config['useIcons'])
+	{
+		currObj.statusSpan.innerHTML = "<img src=\"images/working.gif\" width=\"16\" height=\"16\" title=\"Carregando...\" alt=\"Carregando...\" border=\"0\" />";
+	}
+	else
+	{
+		currObj.statusSpan.innerHTML = "Carregando...";
+	}
+       
+	
+	if(spellingSuggestionsDiv)
+	{
+		
+                spellingSuggestionsDiv.id.parentNode.removeChild(spellingSuggestionsDiv); 
+		spellingSuggestionsDiv = null;
+	}
+	
+	currObj.switchText();
+}; // end resumeEditing
+
+
+/*************************************************************
+ * resetAction
+ *
+ * The resetAction function just resets the status message to
+ * the default action of "Check Spelling".
+ *************************************************************/
+function resetAction()
+{
+       
 	with(currObj);
 	if(currObj.config['useIcons'])
 	{
-		currObj.actionSpan.innerHTML = "<a class=\"resume_editing\"><img src=\"images/page_white_edit.png\" width=\"16\" height=\"16\" title=\"Continuar Editando\" alt=\"Continuar Editando\" border=\"0\" /></a>";
-	}
-	else
-	{
-		currObj.actionSpan.innerHTML = "<a class=\"resume_editing\">Continuar Editando</a>";
-	}
-	if(currObj.config['useIcons'])
-	{
-		currObj.statusSpan.innerHTML = "<img src=\"images/working.gif\" width=\"16\" height=\"16\" title=\"Carregando...\" alt=\"Carregando...\" border=\"0\" />";
-	}
-	else
-	{
-		currObj.statusSpan.innerHTML = "Carregando...";
-	}
-       
-	
-	if(spellingSuggestionsDiv)
-	{
-		
-                spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv);
-		spellingSuggestionsDiv = null;
-	}
-	
-	currObj.switchText();
-}; // end resumeEditing
-
-
-/*************************************************************
- * resetAction
- *
- * The resetAction function just resets the status message to
- * the default action of "Check Spelling".
- *************************************************************/
-function resetAction()
-{
-	with(currObj);
-	if(currObj.config['useIcons'])
-	{
 		currObj.actionSpan.innerHTML = "<a class=\"check_spelling\" onclick=\"setCurrentObject(" + currObj.config['varName'] + "); " + currObj.config['varName'] + ".spellCheck();\"><img src=\"images/spellcheck.png\" width=\"16\" height=\"16\" title=\"Verificar Ortografia\" alt=\"Verificar Ortografia\" border=\"0\" /></a>";
 	}
@@ -836,4 +835,5 @@
 function resetSpellChecker()
 {
+   
 	with(currObj);
 	currObj.resetAction();
@@ -870,5 +870,6 @@
 function findPosXById(object)
 {
-	var curleft = 0;
+	
+        var curleft = 0;
 	var obj = document.getElementById(object);
 	if(obj.offsetParent)
@@ -900,4 +901,5 @@
 function findPosYById(object)
 {
+    
 	var curtop = 0;var curtop = 0;
 	var obj = document.getElementById(object);
@@ -928,4 +930,5 @@
 function trim(s)
 {
+        
 	while(s.substring(0,1) == ' ')
 	{
