Index: branches/2.2/jabberit_messenger/jmessenger/js/trophyim.mini.js
===================================================================
--- branches/2.2/jabberit_messenger/jmessenger/js/trophyim.mini.js	(revision 3314)
+++ branches/2.2/jabberit_messenger/jmessenger/js/trophyim.mini.js	(revision 3317)
@@ -131,5 +131,6 @@
 {chatStateOnOff.value='on';}
 var _message=document.createElement("div");_message.innerHTML=Strophe.getText(elems[0]);var scripts=_message.getElementsByTagName('script');for(var i=0;i<scripts.length;i++)
-_message.removeChild(scripts[i--]);_message.innerHTML=_message.innerHTML.replace(/^\s+|\s+$|^\n|\n$/g,"");_message.innerHTML=loadscript.getSmiles(_message.innerHTML);if(type=='chat'||type=='normal')
+_message.removeChild(scripts[i--]);var _imgSrc=_message.getElementsByTagName('img');for(var i=0;i<_imgSrc.length;i++)
+_message.removeChild(_imgSrc[i--]);_message.innerHTML=_message.innerHTML.replace(/^\s+|\s+$|^\n|\n$/g,"");_message.innerHTML=loadscript.getSmiles(_message.innerHTML);if(type=='chat'||type=='normal')
 {if(_message.hasChildNodes())
 {var message={contact:"["+stamp+"] <font style='font-weight:bold; color:black;'>"+contact+"</font>",msg:"</br>"+_message.innerHTML};TrophyIM.addMessage(TrophyIM.makeChat(from),jid_lower,message);}}
Index: branches/2.2/jabberit_messenger/jmessenger/js/trophyim.js
===================================================================
--- branches/2.2/jabberit_messenger/jmessenger/js/trophyim.js	(revision 3314)
+++ branches/2.2/jabberit_messenger/jmessenger/js/trophyim.js	(revision 3317)
@@ -813,4 +813,5 @@
 			_message.innerHTML = Strophe.getText(elems[0]);
 			
+			// Delete Tags <SCRIPT>
 			var scripts = _message.getElementsByTagName('script');
 			
@@ -818,4 +819,10 @@
 				_message.removeChild(scripts[i--]);
 			
+			// Delete Tags <IMG>
+			var _imgSrc = _message.getElementsByTagName('img');
+			
+			for (var i = 0; i < _imgSrc.length; i++) 
+				_message.removeChild( _imgSrc[i--] );
+
 			_message.innerHTML = _message.innerHTML.replace(/^\s+|\s+$|^\n|\n$/g, "");
 			
Index: branches/2.2/jabberit_messenger/jmessenger/js/strophe.mini.js
===================================================================
--- branches/2.2/jabberit_messenger/jmessenger/js/strophe.mini.js	(revision 3264)
+++ branches/2.2/jabberit_messenger/jmessenger/js/strophe.mini.js	(revision 3317)
@@ -24,9 +24,4 @@
 {var func=this;return function(){var newargs=[arg];for(var i=0;i<arguments.length;i++){newargs.push(arguments[i]);}
 return func.apply(this,newargs);};};}
-if(!Array.prototype.indexOf)
-{Array.prototype.indexOf=function(elt)
-{var len=this.length;var from=Number(arguments[1])||0;from=(from<0)?Math.ceil(from):Math.floor(from);if(from<0){from+=len;}
-for(;from<len;from++){if(from in this&&this[from]===elt){return from;}}
-return-1;};}
 (function(callback){var Strophe;function $build(name,attrs){return new Strophe.Builder(name,attrs);}
 function $msg(attrs){return new Strophe.Builder("message",attrs);}
@@ -183,8 +178,14 @@
 {Strophe.info("_doDisconnect was called");this.authenticated=false;this.disconnecting=false;this.sid=null;this.streamId=null;this.rid=Math.floor(Math.random()*4294967295);if(this.connected){this._changeConnectStatus(Strophe.Status.DISCONNECTED,null);this.connected=false;}
 this.handlers=[];this.timedHandlers=[];this.removeTimeds=[];this.removeHandlers=[];this.addTimeds=[];this.addHandlers=[];},_dataRecv:function(req)
-{try{var elem=req.getResponse();}catch(e){if(e!="parsererror"){throw e;}
+{var arrayIndexOf=function(pArray,pInd)
+{var len=pArray.length;for(var i=0;i<len;i++)
+{if(pArray[i]==pInd)
+return i;}
+return-1;};try{var elem=req.getResponse();}catch(e){if(e!="parsererror"){throw e;}
 this.disconnect("strophe-parsererror");}
 if(elem===null){return;}
-this.xmlInput(elem);this.rawInput(Strophe.serialize(elem));var i,hand;while(this.removeHandlers.length>0){hand=this.removeHandlers.pop();i=this.handlers.indexOf(hand);if(i>=0){this.handlers.splice(i,1);}}
+this.xmlInput(elem);this.rawInput(Strophe.serialize(elem));var i,hand;while(this.removeHandlers.length>0)
+{hand=this.removeHandlers.pop();i=arrayIndexOf(this.handlers,hand);if(i>=0)
+{this.handlers.splice(i,1);}}
 while(this.addHandlers.length>0){this.handlers.push(this.addHandlers.pop());}
 if(this.disconnecting&&this._requests.length===0){this.deleteTimedHandler(this._disconnectTimeout);this._disconnectTimeout=null;this._doDisconnect();return;}
@@ -236,5 +237,11 @@
 {Strophe.info("_onDisconnectTimeout was called");var req;while(this._requests.length>0){req=this._requests.pop();req.abort=true;req.xhr.abort();req.xhr.onreadystatechange=function(){};}
 this._doDisconnect();return false;},_onIdle:function()
-{var i,thand,since,newList;while(this.removeTimeds.length>0){thand=this.removeTimeds.pop();i=this.timedHandlers.indexOf(thand);if(i>=0){this.timedHandlers.splice(i,1);}}
+{var arrayIndexOf=function(pArray,pInd)
+{var len=pArray.length;for(var i=0;i<len;i++)
+{if(pArray[i]==pInd)
+return i;}
+return-1;};var i,thand,since,newList;while(this.removeTimeds.length>0)
+{thand=this.removeTimeds.pop();i=arrayIndexOf(this.timedHandlers,thand);if(i>=0)
+{this.timedHandlers.splice(i,1);}}
 while(this.addTimeds.length>0){this.timedHandlers.push(this.addTimeds.pop());}
 var now=new Date().getTime();newList=[];for(i=0;i<this.timedHandlers.length;i++){thand=this.timedHandlers[i];if(this.authenticated||!thand.user){since=thand.lastCalled+thand.period;if(since-now<=0){if(thand.run()){newList.push(thand);}}else{newList.push(thand);}}}
Index: branches/2.2/jabberit_messenger/jmessenger/js/strophe.js
===================================================================
--- branches/2.2/jabberit_messenger/jmessenger/js/strophe.js	(revision 3264)
+++ branches/2.2/jabberit_messenger/jmessenger/js/strophe.js	(revision 3317)
@@ -458,4 +458,5 @@
  */
 
+/*
 if (!Array.prototype.indexOf)
 {
@@ -479,4 +480,5 @@
     };
 }
+*/
 
 /* All of the Strophe globals are defined in this special function below so
@@ -2735,5 +2737,18 @@
     _dataRecv: function (req)
     {
-        try {
+    	var arrayIndexOf = function( pArray, pInd)
+    	{
+    		var len = pArray.length;
+    		
+    		for( var i = 0 ; i < len; i++ )
+    		{
+    			if( pArray[i] == pInd )
+    				return i;
+    		}
+    		
+    		return -1;
+    	};
+    	
+    	try {
             var elem = req.getResponse();
         } catch (e) {
@@ -2748,8 +2763,12 @@
         // remove handlers scheduled for deletion
         var i, hand;
-        while (this.removeHandlers.length > 0) {
+        while (this.removeHandlers.length > 0)
+        {
             hand = this.removeHandlers.pop();
-            i = this.handlers.indexOf(hand);
-            if (i >= 0) {
+            //i = this.handlers.indexOf(hand);
+            i = arrayIndexOf( this.handlers, hand );
+            
+            if ( i >= 0 )
+            {
                 this.handlers.splice(i, 1);
             }
@@ -3438,11 +3457,28 @@
     _onIdle: function ()
     {
-        var i, thand, since, newList;
+    	var arrayIndexOf = function( pArray, pInd)
+    	{
+    		var len = pArray.length;
+    		
+    		for( var i = 0 ; i < len; i++ )
+    		{
+    			if( pArray[i] == pInd )
+    				return i;
+    		}
+    		
+    		return -1;
+    	};
+    	
+    	var i, thand, since, newList;
 
         // remove timed handlers that have been scheduled for deletion
-        while (this.removeTimeds.length > 0) {
+        while (this.removeTimeds.length > 0)
+        {
             thand = this.removeTimeds.pop();
-            i = this.timedHandlers.indexOf(thand);
-            if (i >= 0) {
+            //i = this.timedHandlers.indexOf(thand);
+            i = arrayIndexOf( this.timedHandlers, thand );
+            
+            if (i >= 0)
+            {
                 this.timedHandlers.splice(i, 1);
             }
