Index: /trunk/expressoMail1_2/js/connector.js
===================================================================
--- /trunk/expressoMail1_2/js/connector.js	(revision 7915)
+++ /trunk/expressoMail1_2/js/connector.js	(revision 7971)
@@ -171,8 +171,111 @@
 	}
 
+    cConnector.prototype.unserializeArchiver = function(str)
+    {   
+        _thisObject = this;
+        var matchB = function (str, iniPos)
+        {
+            var nOpen, nClose = iniPos;
+            do
+            {
+                nOpen = str.substr(nClose+1).search(/[0-9]\:\{/ );
+
+                if (nOpen > 0)
+                    nOpen = nOpen + nClose+3;
+
+                nClose = str.indexOf('}', nClose+1);
+
+                if (nOpen < 0)
+                {
+                    return nClose;
+                }
+                if (nOpen < nClose )
+                {
+                    nClose = matchB(str, nOpen);
+                }
+            } while (nOpen < nClose);
+
+            return nClose;
+        }
+        
+        var f = function (str)
+        {
+            switch (str.charAt(0))
+            {
+                case 'a':
+                    
+                    var data = new Array();
+                    var n = parseInt( str.substring( str.indexOf(':')+1, str.indexOf(':',2) ) );
+                    var arrayContent = str.substring(str.indexOf('{')+1, str.lastIndexOf('}'));
+                
+                    for (var i = 0; i < n; i++)
+                    {
+                        var pos = 0;
+    
+                        /* Process Index */
+                        var indexStr = arrayContent.substr(pos, arrayContent.indexOf(';')+1);
+                        var index = f(indexStr);
+                        pos = arrayContent.indexOf(';', pos)+1;
+                        
+                        /* Process Content */
+                        var part = null;
+                        switch (arrayContent.charAt(pos))
+                        {
+                            case 'a':
+                                var pos_ = matchB(arrayContent, arrayContent.indexOf('{', pos))+1;
+                                part = arrayContent.substring(pos, pos_);
+                                pos = pos_;
+                                data[index] = f(part);
+                                break;
+                        
+                            case 's':
+                                var pval = arrayContent.indexOf(':', pos+2);
+                                var val  = parseInt(arrayContent.substring(pos+2, pval));
+                                pos = pval + val + 4;
+                                data[index] = arrayContent.substr(pval+2, val);
+                                break;
+    
+                            default:
+                                part = arrayContent.substring(pos, arrayContent.indexOf(';', pos)+1);
+                                pos = arrayContent.indexOf(';', pos)+1;
+                                data[index] = f(part);
+                                break;
+                        }
+                        arrayContent = arrayContent.substr(pos);
+                    }
+                    break;
+                    
+                case 's':
+                    var pos = str.indexOf(':', 2);
+                    var val = parseInt(str.substring(2,pos));
+                    var data = str.substr(pos+2, val);
+                    str = str.substr(pos + 4 + val);
+                    break;
+    
+                case 'i':
+                case 'd':
+                    var pos = str.indexOf(';');
+                    var data = parseInt(str.substring(2,pos));
+                    str = str.substr(pos + 1);
+                    break;
+                
+                case 'N':
+                    var data = null;
+                    str = str.substr(str.indexOf(';') + 1);
+                    break;
+    
+                case 'b':
+                    var data = str.charAt(2) == '1' ? true : false;
+                    break;
+            }
+            return data;
+        }
+    
+        return f(str);
+    }
+
 	//Unserialize Data Method
 	cConnector.prototype.unserialize = function(str)
 	{
-		
 		_thisObject = this;
 		var matchB = function (str, iniPos)
@@ -187,5 +290,5 @@
 
                 nClose = (str.substr(nClose+1) == '}' || str.substr(nClose+1,1) == '}') ? nClose +1 : str.substr(nClose+1).search(/[0-9\"]\;\}/ ) + nClose + 3;
-
+                
                 if (nOpen < 0)
                 {
Index: /trunk/expressoMail1_2/js/MAExpressoPattern.js
===================================================================
--- /trunk/expressoMail1_2/js/MAExpressoPattern.js	(revision 7715)
+++ /trunk/expressoMail1_2/js/MAExpressoPattern.js	(revision 7971)
@@ -1241,5 +1241,5 @@
 +   '}';
 
-    var strMailMessage = connector.unserialize(tplMessage);
+    var strMailMessage = connector.unserializeArchiver(tplMessage);
 //    strMessage['from'] = mheader["from"];
     //strMessage['from'] = expresso_mail_archive.toExpressoBody(mheader, mbody);
