Index: /branches/2.2/jabberit_messenger/inc/jabberit_acl.inc.php
===================================================================
--- /branches/2.2/jabberit_messenger/inc/jabberit_acl.inc.php	(revision 4439)
+++ /branches/2.2/jabberit_messenger/inc/jabberit_acl.inc.php	(revision 5161)
@@ -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: /branches/2.2/jabberit_messenger/js/show_hidden.js
===================================================================
--- /branches/2.2/jabberit_messenger/js/show_hidden.js	(revision 3102)
+++ /branches/2.2/jabberit_messenger/js/show_hidden.js	(revision 5161)
@@ -2,11 +2,9 @@
 {
 	var _delay;
+	var _event_show 	= false;
+	var _event_hidden	= false;
 
 	var _last_displayed;
-	var _timeout = false;
-
-	var _event_show = false;
-	var _event_hidden = false;
-	var count = 0;
+	var _timeout 		= false;
 
 	function _config(pObj, pEvent, pHandler)
@@ -38,7 +36,9 @@
 		{
 			if( arguments[0] )
-				clearTimeout(_timeout);
+				clearTimeout( _timeout );
 			else
+			{
 				_timeout = setTimeout( hdObject, _delay);
+			}
 		}
 	}
@@ -46,6 +46,9 @@
 	function _show(_element)
 	{
-		_element.style.display = 'block';
-		_last_displayed = _element;
+		if( !(_last_displayed && ( _last_displayed.id == _element.id )))
+		{
+			_element.style.display = 'block';
+			_last_displayed = _element;
+		}
 	}
 
@@ -77,4 +80,5 @@
 			{
 				var _element = false;
+				
 				switch ( typeof arguments[2] )
 				{
@@ -82,4 +86,5 @@
 						_element = arguments[2];
 					break;
+					
 					case 'string' :
 						_element = document.getElementById(arguments[2]);
@@ -98,7 +103,9 @@
 	}
 
-	ShowHidden.prototype.action  = _view;
-	ShowHidden.prototype.hiddenObject = _hidden;
-    window.ShowHidden = ShowHidden;
-}
-)();
+	
+	ShowHidden.prototype.action  		= _view;
+	ShowHidden.prototype.hiddenObject	= _hidden;
+    
+	window.ShowHidden					= ShowHidden;
+    
+})();
Index: /branches/2.2/jabberit_messenger/js/load.js
===================================================================
--- /branches/2.2/jabberit_messenger/js/load.js	(revision 4438)
+++ /branches/2.2/jabberit_messenger/js/load.js	(revision 5161)
@@ -115,58 +115,58 @@
 			
 			configEvents(_menu_div,'onclick', windowShow);
-
-			configEvents(
-				_status,
-				'onclick',
-				function()
-				{
-					var _options = [
-						['Add Contact', addContacts],
-						['Help', helpJabberit],
-						['Preferences', preferences],
-						['Change Status', subMenuChangeStatus]
-					];
-
-					var _style_text = 'cursor: pointer;' +
-									  'padding:2px 2px 2px 15px;' +
-									  'background: no-repeat url(' + jabberit_group_close.src + ');';					
-
-					var _xml = Xtools.xml('menu');
-					var _option;
-					var _item;
-					var _action;
-					var _style;
-
-					for ( var i in _options )
-					{
-						_option = _xml.createElement('option');
-
-						_item = _xml.createElement('item');
-						_item.appendChild(_xml.createTextNode(jabberitGetLang(_options[i][0])));
-						
-						_style = _xml.createElement('style');
-						_style.appendChild(_xml.createTextNode(_style_text));
-
-						_option.appendChild(_item);
-						_option.appendChild(_style);
-
-						_xml.documentElement.appendChild(_option);
-					}
-
-					_menu.innerHTML = Xtools.parse(_xml, 'options.xsl');
-					_showhidden.action('onmouseover', 'onmouseout', _menu);
-
-					_item = _menu.firstChild;
-
-					for ( var i in _options )
-					{
-						_item.childNodes[i].setAttribute('presence', _options[i]);
-						configEvents( _item.childNodes[i], 'onclick', _options[i][1] );
-					}
-				});
-		}
-	}
-
-	function addUser()
+            configEvents( _status, 'onclick', function(){fastMenu(_status);});
+		}
+	}
+	
+    function fastMenu()
+    {
+        if( arguments.length > 0 )
+        {
+            var element = arguments[0];
+
+            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]+'>';
+                _itens += jabberitGetLang( _options[i][0] ) + '</span><br/>';
+            }
+		
+            var _optionsItens 		= document.createElement("div");
+            	_optionsItens.id	= "fastMenu_Jabber";				
+            	_optionsItens.style.marginTop	= "19px";
+            	_optionsItens.style.marginLeft	= "-8px";
+            	_optionsItens.className		= "x-menu";
+            	_optionsItens.style.zIndex	= '999999';
+            	_optionsItens.innerHTML		= _itens;
+            	_optionsItens.onclick		= function(){
+                _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()
 	{
 		_ldap.addUser();
@@ -627,118 +627,4 @@
 	}
 
-	function subMenuChangeStatus()
-	{
-		if(document.getElementById('subMenu_Change_Status_JabberIt') == null )
-		{
-			var _itens  = [
-								['Online', 'loadscript.subMnChStIt("2",this);', 'available_jabberit.src','jabberit_group_close.src'],
-								['Free For Chat', 'loadscript.subMnChStIt("1",this);', 'chat_jabberit.src','jabberit_group_close.src'],
-								['Xa', 'loadscript.subMnChStIt("3",this);','xa_jabberit.src','jabberit_group_close.src'],
-								['Dnd', 'loadscript.subMnChStIt("4",this);','dnd_jabberit.src','jabberit_group_close.src'],
-								['Away', 'loadscript.subMnChStIt("5",this);','away_jabberit.src','jabberit_group_close.src'],
-								['Invisible', 'loadscript.subMnChStIt("6",this);','invisible_jabberit.src']
-						  ];
-	
-			var _itensMenu = "<dl style='margin:2px 2px !important; font-size:8pt !important;'>";
-			
-			for(var i in _itens)
-			{
-				_itensMenu += '<dt onmouseover="elementOnMouseOver(this);" onmouseout="elementOnMouseOut(this, false);" style="cursor: pointer;">';
-				_itensMenu += "<div ";
-				if( _itens[i][3] )
-					_itensMenu += "style='background: url(" + eval(_itens[i][3]) + ") no-repeat center right'";
-				_itensMenu += "onclick="+_itens[i][1] +"><img src='" + eval(_itens[i][2]) + "' style='margin-right:3px;'/>" + jabberitGetLang(_itens[i][0]) + "</div></dt>";
-			}
-
-			_itensMenu += "</dl>";
-	
-			var _subMenu_div = document.createElement("div");
-				_subMenu_div.setAttribute('id','subMenu_Change_Status_JabberIt');
-				_subMenu_div.className		= 'x-subMenuChangeStatus';
-				_subMenu_div.style.left		= '55px'; 
-				_subMenu_div.style.width	= ( is_ie ) ? '160px': '140px';;
-				_subMenu_div.style.zindex	= '99999';
-				_subMenu_div.innerHTML		= _itensMenu; 
-	
-			var elementParent = document.getElementById('fast_menu_jabberit');
-			elementParent.appendChild(_subMenu_div);
-			
-			setItensStatusMenu();
-		}
-	}
-	
-	function subMenuChangeStatusItens()
-	{
-		if( arguments.length > 0 )
-		{
-			var status	= arguments[0];
-			var element	= arguments[1];
-			var msg		= "";
-
-			if( itensSubMenu.length > 0 )
-			{
-				var string = "";
-				for( var i = 0; i < itensSubMenu.length ; i++ )
-				{
-					if( itensSubMenu[i] != undefined )
-					{
-						string = itensSubMenu[i].substring(1);
-						string = string.substring(0, string.indexOf("]")).toString();
-
-						if( string != "" )
-						{
-							if( status == i )
-							{
-								if ( ! ( string.indexOf( ',' ) < 0 ) )
-								{
-									var phases = string.split(',');
-									var _itensMenu = "<dl style='padding:1px !important; margin:2px 2px !important;font-size:8pt !important;'>";
-									for ( var m = 0; m < phases.length; m++ )
-									{
-										_itensMenu += "<dt onmouseover='elementOnMouseOver(this);' onmouseout='elementOnMouseOut(this, false);' style='cursor: pointer;'>";
-										_itensMenu += "<div onclick='loadscript.chgStatusJava(\""+i+"\", \""+phases[m]+"\")'><img src='" + jabberit_group_close.src + "' style='margin-right:3px;'/>" + phases[m] + "</div></dt>";	
-									}
-									_itensMenu += "</dl>";
-								}
-								else
-								{
-									var _itensMenu  = "<dl style='padding:1px !important; margin:2px 2px !important;font-size:8pt !important;'>";
-										_itensMenu += "<dt onmouseover='elementOnMouseOver(this);' onmouseout='elementOnMouseOut(this, false);' style='cursor: pointer;'>";								
-										_itensMenu += "<div onclick='loadscript.chgStatusJava(\""+i+"\", \""+string+"\");'><img src='" + jabberit_group_close.src + "' style='margin-right:3px;'/>" + string + "</div></dt>";
-										_itensMenu += "</dl>";
-								}
-							}
-
-							for( var j = 0 ; j < 6 ; j++ )
-							{
-								if( document.getElementById('ItemSubMenuJabberd_' + j) != null )
-								{
-									var ElementItem = document.getElementById('ItemSubMenuJabberd_' + j);
-										ElementItem.parentNode.removeChild(ElementItem);
-								}
-							}
-						}
-					}
-				}
-				
-				if( _itensMenu ) 
-				{
-					var _subMenuItem_div = document.createElement("div");
-					_subMenuItem_div.setAttribute('id','ItemSubMenuJabberd_' + status);
-					_subMenuItem_div.className		= "x-subMenuChangeStatusItens";	
-					_subMenuItem_div.style.margin	= ( is_ie ) ? '-3px 5px 0px 0px' : '-20px 5px 0px 0px';
-					_subMenuItem_div.style.left		= ( is_ie ) ? '157px' : '140px'; 
-					_subMenuItem_div.style.width	= ( is_ie ) ? '180px': '160px';
-					_subMenuItem_div.style.zindex	= '99999';
-					_subMenuItem_div.innerHTML		= _itensMenu; 
-					
-					element.appendChild( _subMenuItem_div );
-					
-				}else
-					changeStatusJava(status,"");
-			}
-		}
-	}
-
 	function Load()
 	{
@@ -753,4 +639,5 @@
 
 	Load.prototype.adIcon			= addIcon;
+	Load.prototype.addContacts		= addContacts;
 	Load.prototype.addUser			= addUser;
 	Load.prototype.autoStatusIM		= autoStatus;
@@ -758,11 +645,11 @@
 	Load.prototype.closeW			= closeWindow;
 	Load.prototype.getElement		= getElementStatus;
+	Load.prototype.helpJabberit		= helpJabberit;
 	Load.prototype.keyPress			= keyPressSearch;
 	Load.prototype.openPopup		= openPopup;
+	Load.prototype.preferences		= preferences;	
 	Load.prototype.search			= searchUser;
 	Load.prototype.setPrefe 		= setPreferences;
-	Load.prototype.subMnChStIt		= subMenuChangeStatusItens;
 	Load.prototype.windowHidden		= windowHidden;
-	
 	
 	configEvents(window, 'onload', function(){ window.loadscript = new Load; });
