Index: trunk/jabberit_messenger/jmessenger/inc/jabberit_acl.inc.php
===================================================================
--- trunk/jabberit_messenger/jmessenger/inc/jabberit_acl.inc.php	(revision 5041)
+++ trunk/jabberit_messenger/jmessenger/inc/jabberit_acl.inc.php	(revision 5320)
@@ -86,18 +86,17 @@
 		$preferences	= $_DbIM->getPreferences();
                 
-                
 		echo "<script type='text/javascript'>".$js."</script>";
 		echo "<script type='text/javascript' src='".$webserver_url .        "js/strophe.mini.js'></script>";
 		echo "<script type='text/javascript' src='".$webserver_expresso .   "js/browser/browserDetect.js'></script>";
-                echo "<script type='text/javascript' src='".$webserver_url .        "js/jscode/loadIM.mini.js'></script>";
-                echo "<script type='text/javascript' src='".$webserver_url .        "js/connector.mini.js'></script>";
-	 	echo "<script type='text/javascript' src='".$webserver_expresso .   "js/x_tools/xtools.js'></script>";
-	 	echo "<script type='text/javascript' src='".$webserver_url .        "js/lang/i18n_pt_Br.mini.js'></script>";
-	 	echo "<script type='text/javascript' src='".$webserver_url .        "js/dragdrop.mini.js'></script>";
+		echo "<script type='text/javascript' src='".$webserver_url .        "js/jscode/loadIM.mini.js'></script>";
+		echo "<script type='text/javascript' src='".$webserver_url .        "js/connector.mini.js'></script>";
+		echo "<script type='text/javascript' src='".$webserver_expresso .   "js/x_tools/xtools.js'></script>";
+		echo "<script type='text/javascript' src='".$webserver_url .        "js/lang/i18n_pt_Br.mini.js'></script>";
+		echo "<script type='text/javascript' src='".$webserver_url .        "js/dragdrop.mini.js'></script>";
 	 	echo "<script type='text/javascript' src='".$webserver_url .        "js/makeW.mini.js'></script>";
 	 	echo "<script type='text/javascript' src='".$webserver_url .        "js/show_hidden.mini.js'></script>";
 	 	echo "<script type='text/javascript' src='".$webserver_url .        "js/trophyim_constants.js'></script>";
-                echo "<script type='text/javascript' src='".$webserver_url .        "js/trophyim.mini.js'></script>";
-                echo "<script type='text/javascript' src='".$webserver_url .        "js/AddUser.mini.js'></script>";			            	 	
+        echo "<script type='text/javascript' src='".$webserver_url .        "js/trophyim.mini.js'></script>";
+        echo "<script type='text/javascript' src='".$webserver_url .        "js/AddUser.mini.js'></script>";			            	 	
 	 	echo "<script type='text/javascript' src='".$webserver_url .        "js/json2.js'></script>";
 	 	echo "<script type='text/javascript' src='".$webserver_url .        "js/SelectEditable.mini.js'></script>";
Index: trunk/jabberit_messenger/jmessenger/js/trophyim.mini.js
===================================================================
--- trunk/jabberit_messenger/jmessenger/js/trophyim.mini.js	(revision 5217)
+++ trunk/jabberit_messenger/jmessenger/js/trophyim.mini.js	(revision 5320)
@@ -28,5 +28,6 @@
 {loadscript.rosterDiv();}},storeData:function()
 {if(TrophyIM.connection&&TrophyIM.connection.connected)
-{TrophyIM.setCookie('trophyim_bosh_xid',TrophyIM.connection.jid+"|"+TrophyIM.connection.sid+"|"+TrophyIM.connection.rid);TrophyIM.rosterObj.save();}},showLogin:function()
+{TrophyIM.setCookie('trophyim_bosh_xid',TrophyIM.connection.jid+"|"+
+TrophyIM.connection.sid+"|"+TrophyIM.connection.rid);TrophyIM.rosterObj.save();}},showLogin:function()
 {if(typeof(JSON)!=undefined&&typeof(Strophe)!=undefined)
 {TrophyIM.JSONStore=new TrophyIMJSONStore();if(TrophyIM.JSONStore.store_working&&TrophyIM.cookies['trophyim_bosh_xid'])
@@ -67,5 +68,6 @@
 if(status==Strophe.Status.CONNECTED)
 {loadscript.setStatusJabber(i18n.STATUS_AVAILABLE,'available');TrophyIM.statusConn.connected=true;TrophyIM.showClient();}},showClient:function()
-{TrophyIM.setCookie('trophyim_bosh_xid',TrophyIM.connection.jid+"|"+TrophyIM.connection.sid+"|"+TrophyIM.connection.rid);TrophyIM.rosterObj=new TrophyIMRoster();TrophyIM.connection.addHandler(TrophyIM.onVersion,Strophe.NS.VERSION,'iq',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onRoster,Strophe.NS.ROSTER,'iq',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onPresence,null,'presence',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onMessage,null,'message',null,null,null);TrophyIM.connection.send($iq({type:'get',xmlns:Strophe.NS.CLIENT}).c('query',{xmlns:Strophe.NS.ROSTER}).tree());TrophyIM.connection.send($pres().tree());setTimeout(TrophyIM.renderRoster,1000);},clearClient:function()
+{TrophyIM.setCookie('trophyim_bosh_xid',TrophyIM.connection.jid+"|"+
+TrophyIM.connection.sid+"|"+TrophyIM.connection.rid);TrophyIM.rosterObj=new TrophyIMRoster();TrophyIM.connection.addHandler(TrophyIM.onVersion,Strophe.NS.VERSION,'iq',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onRoster,Strophe.NS.ROSTER,'iq',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onPresence,null,'presence',null,null,null);TrophyIM.connection.addHandler(TrophyIM.onMessage,null,'message',null,null,null);TrophyIM.connection.send($iq({type:'get',xmlns:Strophe.NS.CLIENT}).c('query',{xmlns:Strophe.NS.ROSTER}).tree());TrophyIM.connection.send($pres().tree());setTimeout(TrophyIM.renderRoster,1000);},clearClient:function()
 {if(TrophyIM.logging_div)
 {var logging_div=TrophyIM.client_div.removeChild(document.getElementById('trophyimlog'));}
@@ -84,8 +86,8 @@
 group_array[group_array.length]=groups[g].firstChild.nodeValue;}
 if(getAttribute('ask')&&getAttribute('ask').toString()==="subscribe")
-{if(getAttribute('subscription').toString()==="remove")
-{TrophyIM.rosterObj.removeContact(getAttribute('jid').toString());}
-else
-{TrophyIM.rosterObj.addContact(getAttribute('jid'),getAttribute('ask'),getAttribute('name'),group_array);}}
+{if(getAttribute('subscription').toString()==="none")
+{TrophyIM.rosterObj.addContact(getAttribute('jid'),getAttribute('ask'),getAttribute('name'),group_array);}
+if(getAttribute('subscription').toString()==="remove")
+{TrophyIM.rosterObj.removeContact(getAttribute('jid').toString());}}
 else
 {if((getAttribute('ask')==null&&getAttribute('subscription').toString()==="remove")||getAttribute('subscription').toString()==="remove")
@@ -405,5 +407,6 @@
 {current=presence}
 else
-{if(presence['priority']>current['priority']&&((presence['show']=="chat"||presence['show']=="available")||(current['show']!="chat"||current['show']!="available")))
+{if(presence['priority']>current['priority']&&((presence['show']=="chat"
+||presence['show']=="available")||(current['show']!="chat"||current['show']!="available")))
 {current=presence}}}}
 return current;}
@@ -440,5 +443,6 @@
 return xhr;}
 this.getData=function(vars){if(typeof(TROPHYIM_JSON_STORE)!=undefined){Strophe.debug("Retrieving JSONStore data");var xhr=this._newXHR();var getdata="get="+vars.join(",");try{xhr.open("POST",TROPHYIM_JSON_STORE,false);}catch(e){Strophe.error("JSONStore open failed.");return false;}
-xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');xhr.setRequestHeader('Content-length',getdata.length);xhr.send(getdata);if(xhr.readyState==4&&xhr.status==200){try{var dataObj=JSON.parse(xhr.responseText);return this.emptyFix(dataObj);}catch(e){Strophe.error("Could not parse JSONStore response"+xhr.responseText);return false;}}else{Strophe.error("JSONStore open failed. Status: "+xhr.status);return false;}}}
+xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');xhr.setRequestHeader('Content-length',getdata.length);xhr.send(getdata);if(xhr.readyState==4&&xhr.status==200){try{var dataObj=JSON.parse(xhr.responseText);return this.emptyFix(dataObj);}catch(e){Strophe.error("Could not parse JSONStore response"+
+xhr.responseText);return false;}}else{Strophe.error("JSONStore open failed. Status: "+xhr.status);return false;}}}
 this.emptyFix=function(obj){if(typeof(obj)=="object"){for(var i in obj){if(obj[i].constructor==Function)
 continue;if(i=='_empty_'){obj[""]=this.emptyFix(obj['_empty_']);delete obj['_empty_'];}else{obj[i]=this.emptyFix(obj[i]);}}}
Index: trunk/jabberit_messenger/jmessenger/js/trophyim.js
===================================================================
--- trunk/jabberit_messenger/jmessenger/js/trophyim.js	(revision 5217)
+++ trunk/jabberit_messenger/jmessenger/js/trophyim.js	(revision 5320)
@@ -622,11 +622,12 @@
                 if( getAttribute('ask') && getAttribute('ask').toString() === "subscribe" ) 
                 {
+                    if( getAttribute('subscription').toString() === "none" )
+                    {
+                        TrophyIM.rosterObj.addContact( getAttribute('jid'), getAttribute('ask'), getAttribute('name'), group_array );
+                    }
+					
                     if( getAttribute('subscription').toString() === "remove" )
                     {
                         TrophyIM.rosterObj.removeContact( getAttribute('jid').toString() );
-                    }
-                    else
-                    {
-                    	TrophyIM.rosterObj.addContact( getAttribute('jid'), getAttribute('ask'), getAttribute('name'), group_array );
                     }
                 }
@@ -642,5 +643,5 @@
                     }
                 }
-            }
+                }
         }
 
Index: trunk/jabberit_messenger/xsl/options.xsl
===================================================================
--- trunk/jabberit_messenger/xsl/options.xsl	(revision 3102)
+++ 	(revision )
@@ -1,18 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-	<xsl:output method="html" omit-xml-declaration="yes"/>
-
-	<xsl:param name="style" />
-
-	<xsl:template match="/">
-
-		<dl style="margin:0;">
-			<xsl:apply-templates select="." mode="option" />
-		</dl>
-	</xsl:template>
-
-	<xsl:template match="option" mode="option">
-		<dt style="{style}" onmouseover="elementOnMouseOver(this);" onmouseout="elementOnMouseOut(this);"><xsl:value-of select="item"/></dt>
-	</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/jabberit_messenger/inc/jabberit_acl.inc.php
===================================================================
--- trunk/jabberit_messenger/inc/jabberit_acl.inc.php	(revision 5041)
+++ trunk/jabberit_messenger/inc/jabberit_acl.inc.php	(revision 5320)
@@ -81,9 +81,9 @@
 			$js .= "var _ZINDEX='99000'; ";	
 	
-                        // Xtools Phpgwapi
-                        echo "<script type='text/javascript' src='".$webserver_expresso."js/x_tools/xtools.js'></script>";
+            // Xtools Phpgwapi
+            echo "<script type='text/javascript' src='".$webserver_expresso."js/x_tools/xtools.js'></script>";
                         
-                        // Javascript JMessenger
-                        echo "<script type=\"text/javascript\">".$js."</script>";
+            // Javascript JMessenger
+            echo "<script type=\"text/javascript\">".$js."</script>";
 			$js = array(
 						'j.connector',
Index: trunk/jabberit_messenger/js/show_hidden.js
===================================================================
--- trunk/jabberit_messenger/js/show_hidden.js	(revision 5183)
+++ trunk/jabberit_messenger/js/show_hidden.js	(revision 5320)
@@ -6,5 +6,5 @@
 
 	var _last_displayed;
-	var _timeout = false;
+	var _timeout 		= false;
 
 	function _config(pObj, pEvent, pHandler)
@@ -40,6 +40,6 @@
 			{
 				_timeout = setTimeout( hdObject, _delay);
+			}
 		}
-	}
 	}
 
@@ -48,7 +48,7 @@
 		if( !(_last_displayed && ( _last_displayed.id == _element.id )))
 		{
-		_element.style.display = 'block';
-		_last_displayed = _element;
-	}
+			_element.style.display = 'block';
+			_last_displayed = _element;
+		}
 	}
 
@@ -104,8 +104,8 @@
 
 	
-	ShowHidden.prototype.action  = _view;
-	ShowHidden.prototype.hiddenObject = _hidden;
+	ShowHidden.prototype.action  		= _view;
+	ShowHidden.prototype.hiddenObject	= _hidden;
     
-    window.ShowHidden = ShowHidden;
+	window.ShowHidden					= ShowHidden;
     
 })();
Index: trunk/jabberit_messenger/js/load.js
===================================================================
--- trunk/jabberit_messenger/js/load.js	(revision 5183)
+++ trunk/jabberit_messenger/js/load.js	(revision 5320)
@@ -118,24 +118,24 @@
 		}
 	}
-
+	
     function fastMenu()
-				{
+    {
         if( arguments.length > 0 )
         {
             var element = arguments[0];
 
-					var _options = [
+            var _options = [
 	                            ['Add Contact', 'loadscript.addContacts();'],
 	                            ['Help', 'loadscript.helpJabberit();'],
 	                            ['Preferences', 'loadscript.preferences();']
-					];
-
+	                       ];
+            
             var _itens = "";
-
+		
             for( var i in _options )
-					{
+            {
                 if( _options[i].constructor == Function )
                     continue;
-						
+			
                 _itens += '<img src="'+jabberit_group_close.src +'"/>';
                 _itens += '<span style="cursor:pointer; margin:3px;" onclick='+_options[i][1]+'>';
@@ -153,20 +153,20 @@
                 _showhidden.hiddenObject(false);
             };
-
+            
             _optionsItens.onmouseout = function(){
                 _showhidden.hiddenObject(false);
             };
-
+            
             _optionsItens.onmouseover = function(){
                 _showhidden.hiddenObject(true);
             };	
-
+									  
             _showhidden.action('onmouseover', 'onmouseout', _optionsItens);
-
+			
             element.parentNode.appendChild( _optionsItens );
-		}
-	}
-
-	function addUser()
+        }
+    }
+
+    function addUser()
 	{
 		_ldap.addUser();
