Index: /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/css/spell_checker.css
===================================================================
--- /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/css/spell_checker.css	(revision 2485)
+++ /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/css/spell_checker.css	(revision 2510)
@@ -16,4 +16,6 @@
 	text-align: left;
         
+       
+        
 }
 .suggestion {
@@ -23,5 +25,24 @@
 	font-size: 11px;
 	color: #000000;
+        border: 0px;
+       
 }
+
+.focus{
+  outline: none; border: 0px; outline-style: none; -moz-outline-style:none; outline-style: 0px;
+  _moz_resizing: false; 
+
+}
+
+a:active
+{
+outline: none;
+}
+
+a:focus
+{
+-moz-outline-style: none;
+}
+
 
 .corrected_word
@@ -50,6 +71,4 @@
 .edit_box {
 	background-color: #FFFFFF;
-	padding-top: 2px;
-	padding-left: 2px;
 	overflow: auto;
        
Index: /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/spell_checker.php
===================================================================
--- /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/spell_checker.php	(revision 2488)
+++ /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/spell_checker.php	(revision 2510)
@@ -120,14 +120,14 @@
 		for($i=0; $i<$tmpNum; $i++)
 		{
-			$retVal .= "<div class=\"suggestion\" onclick=\"replaceWord('" . addslashes_custom($id) . "', '" . addslashes(utf8_encode($suggestions[$i])) . "'); return false;\">" . utf8_encode($suggestions[$i]) . "</div>";
+			$retVal .= "<span class=\"suggestion\" onclick=\"replaceWord('" . addslashes_custom($id) . "', '" . addslashes(utf8_encode($suggestions[$i])) . "'); return false;\">" . utf8_encode($suggestions[$i]) . " </span></br>";
 		}
 	
 		if($editablePersonalDict)
 		{
-			$retVal .= "<div class=\"addtoDictionary\" onclick=\"addWord('" . addslashes_custom($id) . "'); return false;\">Add To Dictionary</div>";
+			$retVal .= "<span class=\"addtoDictionary\" onclick=\"addWord('" . addslashes_custom($id) . "'); return false;\">Add To Dictionary</span>";
 		}
 
                 //Ignore the suggestion - Added by Nathalie
-                $retVal .= "<div class=\"ignore\" onclick=\"replaceWord('" .  addslashes_custom($id)  . "', '" .   addslashes($word)   . "'); return false;\"> Ignorar </div>";
+                $retVal .= "<span class=\"ignore\" onclick=\"replaceWord('" .  addslashes_custom($id)  . "', '" .   addslashes($word)   . "'); return false;\"> Ignorar </span>";
 
 
@@ -136,5 +136,5 @@
 	{
 		$retVal .= "Sem sugestÃ£o";
-                $retVal .= "<div class=\"ignore\" onclick=\"replaceWord('" .  addslashes_custom($id)  . "', '" .   addslashes($word)   . "'); return false;\"> Ignorar </div>";
+                $retVal .= "<span class=\"ignore\" onclick=\"replaceWord('" .  addslashes_custom($id)  . "', '" .   addslashes($word)   . "'); return false;\"> Ignorar </span>";
 	}
 	
Index: /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/js/spell_checker.js
===================================================================
--- /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/js/spell_checker.js	(revision 2508)
+++ /sandbox/expressoMail1_2/corretor_ortografico/spell_checker/js/spell_checker.js	(revision 2510)
@@ -151,6 +151,7 @@
 function setupSpellChecker(){
 
+
         currObj = this;
-
+       
         currObj.config               = new Array();
         
@@ -164,5 +165,5 @@
 	spellContainer.style.width = currObj.config['width'];
 
-	oldElement = document.getElementById(currObj.config['id']);
+	//oldElement = document.getElementById(currObj.config['id']);
 
 	//oldElement.parentNode.replaceChild(spellContainer, oldElement);
@@ -172,6 +173,13 @@
 	currObj.controlPanelDiv.className = 'control_panel';
         currObj.controlPanelDiv.id = 'control_panel_' + currentTab;
-	document.getElementById(currObj.config['divId']).appendChild(currObj.controlPanelDiv); 
-       
+        document.getElementById(currObj.config['divId']).appendChild(currObj.controlPanelDiv);
+
+        //if (document.getElementById(currObj.config['id']))
+        //    alert("OK");
+
+        //document.getElementById(currObj.config['divId']).insertBefore(currObj.controlPanelDiv, document.getElementById(currObj.config['id']));
+        //currObj.controlPanelDiv.parentNode.insertBefore(currObj.controlPanelDiv, document.getElementById(currObj.config["id"]));
+
+     
        
         
@@ -199,4 +207,7 @@
 	currObj.controlPanelDiv.appendChild(currObj.statusSpan);
 
+
+       //document.getElementById(currObj.config['divId']).insertBefore(currObj.controlPanelDiv, document.getElementById(currObj.config['id'])); //test
+
         //document.getElementById("body_position_" + currentTab).insertBefore(currObj.controlPanelDiv, document.getElementById("viewsource_rt_checkbox"));
 	//the textarea to be spell checked
@@ -204,4 +215,6 @@
 	//document.getElementById(currObj.config['divId']).appendChild(oldElement);
         currObj.controlPanelDiv.parentNode.insertBefore(currObj.controlPanelDiv, document.getElementById("viewsource_rt_checkbox_" + currentTab));
+        //currObj.controlPanelDiv.parentNode.insertBefore(currObj.controlPanelDiv, document.getElementById(currObj.config["id"]));
+      
 
  }
@@ -336,4 +349,24 @@
 
 
+
+
+function focusDiv(){
+    alert("focus");
+    var ifr= currObj.objToCheck;
+        if(ifr.contentWindow)
+            ifr=ifr.contentWindow.document;
+        else
+            ifr=ifr.contentDocument;
+
+    ifr.getElementById("suggestion_box").outline = 0;
+    ifr.getElementById(spellingSuggestionsDiv.id).style.display = 'none';
+    ifr.getElementById(spellingSuggestionsDiv.id)._moz_resizing = false;
+
+
+    return false;
+}
+
+
+
 /*************************************************************
  * showMenu
@@ -361,11 +394,27 @@
  *************************************************************/
 function replaceMenu(){
+     //adicionado nathalie
+        var ifr= currObj.objToCheck;
+        if(ifr.contentWindow)
+            ifr=ifr.contentWindow.document;
+        else
+            ifr=ifr.contentDocument;
+
+
+    
+
+
     var evento = this.onclick.toString();
-    if(spellingSuggestionsDiv)
-    {
-
-        spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv);
-	spellingSuggestionsDiv = null;
-    }
+    alert("Replace");
+
+   
+
+
+    
+
+
+
+
+
     evento = evento.replace("function onclick(event) {", "");
     evento = evento.replace("}", "");
@@ -425,4 +474,6 @@
 
 
+
+
         // Teste de iFrame - Nathalie
          var ifr= currObj.objToCheck;
@@ -432,10 +483,10 @@
             ifr=ifr.contentDocument;
          ifr.body.innerHTML =  "";
-         var cssLink = ifr.createElement("link")
+         var cssLink = ifr.createElement("link");
          cssLink.href = "spell_checker/css/spell_checker.css";
          cssLink .rel = "stylesheet";
          cssLink .type = "text/css";            
               //Testes nathalie - substituido
-        currObj.spellingResultsDiv =  ifr.createElement('DIV');
+        currObj.spellingResultsDiv =  ifr.createElement('span');
 	currObj.spellingResultsDiv.className = 'edit_box';
         currObj.spellingResultsDiv.id = 'edit_box'; //Added the id property - By Nathalie
@@ -450,6 +501,8 @@
 
 
+        
+         //ifr.body.appendChild(currObj.spellingResultsDiv);
+         ifr.body.innerHTML = new_data;
          ifr.body.appendChild(cssLink);
-         ifr.body.appendChild(currObj.spellingResultsDiv);
 
 
@@ -461,5 +514,8 @@
             var node = nodeArray[i];
             if (node.className == "highlight") {
-                ifr.getElementsByTagName("span")[i].addEventListener("click", showMenu , true);
+                if (document.addEventListener)
+                    ifr.getElementsByTagName("span")[i].addEventListener("click", showMenu , true);
+                else
+                    ifr.getElementsByTagName("span")[i].attachEvent("click", showMenu );
 
             }
@@ -660,6 +716,5 @@
 function addWord_cb(returnedData)
 {
-	
-        with(currObj);
+	with(currObj);
 	currObj.statusSpan.innerHTML = "";
 	resumeEditing();
@@ -818,10 +873,18 @@
             ifr=ifr.contentDocument;
 
-        var nodeArray = ifr.getElementsByTagName("div");
+        var nodeArray = ifr.getElementsByTagName("span");
         var totArray = nodeArray.length;
         for (var i = 0 ; i < totArray ; i++) {
             var node = nodeArray[i];
             if (node.className == "suggestion" || node.className == "ignore" ) {
-                ifr.getElementsByTagName("div")[i].addEventListener("click", replaceMenu , true);
+                 if (document.addEventListener)
+                    ifr.getElementsByTagName("span")[i].addEventListener("click", replaceMenu , true);
+                else
+                    ifr.getElementsByTagName("span")[i].attachEvent("click", replaceMenu);
+                    
+
+
+
+                
 
             }
@@ -879,6 +942,7 @@
 	{
 		
-                //scrollPos = currObj.spellingResultsDiv.scrollTop;
-                scrollPos = ifr.getElementById(currObj.spellingResultsDiv.id).scrollTop;
+                
+                //scrollPos = ifr.getElementById(currObj.spellingResultsDiv.id).scrollTop;
+                scrollPos = ifr.getElementsByTagName("body")[0].scrollTop;
                
 	}
@@ -888,5 +952,5 @@
 		spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv);
 	}
-	spellingSuggestionsDiv = document.createElement('DIV');
+	spellingSuggestionsDiv = document.createElement('span');
 	spellingSuggestionsDiv.style.display = "none";
 	spellingSuggestionsDiv.className = 'suggestion_box';
@@ -894,4 +958,9 @@
 	spellingSuggestionsDiv.style.left = x + 'px';
 	spellingSuggestionsDiv.style.top = (y+16-scrollPos) + 'px';
+        spellingSuggestionsDiv.id = 'suggestion_box'; //Adicionado Nathalie
+        
+        
+        spellingSuggestionsDiv.addEventListener("active", focusDiv , true); //Adicionado Nathalie
+
        
         
@@ -942,11 +1011,13 @@
 
     var valorNo = trim(ifr.getElementById(id).innerHTML);
-   
-
-    if(spellingSuggestionsDiv)
-    {
-    spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv);
-    spellingSuggestionsDiv = null;
-    }
+
+    //ifr.location.reload(true);
+
+    //alert(ifr.getElementById(currObj.spellingResultsDiv.id).getElementsByTagName("div").length);
+    //ifr.getElementById(currObj.spellingResultsDiv.id).style.display = 'none';
+ 
+
+    //ifr.getElementById(currObj.spellingResultsDiv.id).
+    
 
 
@@ -969,4 +1040,20 @@
         ifr.getElementById(nodeRemove[i]).className = "corrected_word";
     }
+
+
+    if(spellingSuggestionsDiv)
+    {
+        spellingSuggestionsDiv.parentNode.removeChild(spellingSuggestionsDiv);
+        spellingSuggestionsDiv = null;
+    }
+
+    /*var nodeArray = ifr.getElementsByTagName("img");
+
+        var totArray = nodeArray.length;
+        for (var i = 0 ; i < totArray ; i++) {
+            alert("Tem Imagem");
+            var node = nodeArray[i];
+                ifr.getElementsByTagName("img")[i].style = 'none';
+       }*/
 
 
