Index: sandbox/jabberit_messenger/trophy/js/loadIM.js
===================================================================
--- sandbox/jabberit_messenger/trophy/js/loadIM.js	(revision 2339)
+++ sandbox/jabberit_messenger/trophy/js/loadIM.js	(revision 2345)
@@ -5,4 +5,38 @@
 	var _xtools			= null;
 	var zIndex			= 9001;
+
+	
+	function actionButton()
+	{
+		if( arguments.length > 0 )
+		{
+			var e 	= arguments[0];
+			var jid = arguments[1];
+		
+			if ( !e )
+				var e = window.event;
+			
+			( ( e.target ) ? e.target : e.srcElement ).oncontextmenu = function(e)
+			{
+				return false;
+			};
+	
+			if ( ( e.which && e.which > 1 ) || ( e.button && e.button > 1 ) )
+				optionsItensContact(e, jid);
+			else
+				TrophyIM.rosterClick(jid);
+		}
+	}
+
+	function addContacts()
+	{
+		/*
+		var jid		= 'contact@servidor_jabber';
+		var name	= 'Nome Contato';
+		var group	= 'CONTATOS';
+		
+		TrophyIM.addContacts( jid, name, group );
+		*/
+	}
 	
 	function configEvents(pObj, pEvent, pHandler)
@@ -18,53 +52,4 @@
 				pObj.attachEvent('on' + pEvent, pHandler);
 		}
-	}
-	
-	function TrophyIMChatArea()
-	{
-		/*
-		var winImChatArea = 
-		{
-			 id_window		: "window_chat_area",
-			 width			: 490,
-			 height			: 395,
-			 top			: 100,
-			 left			: 400,
-			 draggable		: true,
-			 visible		: "display",
-			 resizable		: true,
-			 zindex			: zIndex++,
-			 title			: "Mensagens - Expresso Messenger",
-			 closeAction	: "remove",
-			 content		: '<div id="trophyimchat"><div id="trophyimchattabs"/></div>'	
-		};
-		
-		_winBuild( winImChatArea );
-		
-		return '<div id="trophyimchat"><div id="trophyimchattabs"/></div>';
-		*/
-	}
-	
-	function TrophyIMChatBox()
-	{
-		var chatBox = '<div>' +
-						'<div id="trophyimchattabs"/>' +
-						'<div class="trophyimchatbox"/>' +
-							'<form name="chat" onsubmit="TrophyIM.sendMessage(this); return(false);">' +
-								'<textarea class="trophyimchatinput" rows="3" cols="50"></textarea>' +
-								'<input type="button" value="Send" onclick="TrophyIM.sendMessage(this)"/>' +
-							'</form>' +
-					   '</div>';
-		
-		return chatBox;
-	}
-	
-	function TrophyIMChatTab()
-	{
-        var chatTab	=	'<div class="trophyimchattab" onclick="TrophyIM.tabClick(this);">' +
-            				'<div class="trophyimchattabjid" />' +
-        					'<div class="trophyimtabclose" onclick="TrophyIM.tabClose(this);">X</div>' +
-            				'<div class="trophyimchattabname" />' +
-            			'</div>';
-		return chatTab;
 	}
 	
@@ -120,29 +105,8 @@
 	}
 	
-	function TrophyIMRosterGroup()
-	{
-		return '<div class="trophyimrostergroup"><div class="trophyimrosterlabel"/></div>';
-	}
-	
-	function TrophyIMRosterItem()
-	{
-		var rosterItem = '<div class="trophyimrosteritem" onclick="TrophyIM.rosterClick(this)">' + 
-        					'<div class="trophyimrosterjid" />' +
-        					'<div class="trophyimrostername" />' +
-        				 '</div>';
-        
-        return rosterItem;
-	}
-	
 	function HTMLSnippets( pType )
 	{
 		return new ( function( )
 		{
-			//this.chatArea		= TrophyIMChatArea;
-	
-			this.chatBox		= TrophyIMChatBox;
-	
-			this.chatTab		= TrophyIMChatTab;
-				
 			this.loggingDiv		= TrophyIMLoggingDiv;
 		
@@ -150,9 +114,4 @@
 				
 			this.rosterDiv		= TrophyIMRosterDiv;
-				
-			this.rosterGroup	= TrophyIMRosterGroup;
-	
-			this.rosterItem		= TrophyIMRosterItem;
-
 		} );
 	}
@@ -244,4 +203,44 @@
 	}
 
+	
+	function optionsItensContact()
+	{
+		if( arguments.length > 0 )
+		{
+			var element = ( arguments[0].target ) ? arguments[0].target : arguments[0].srcElement;
+			var jid 	= arguments[1];
+			
+			if( _showhidden == null )
+				_showhidden = new ShowHidden(300);
+
+			var _options = [
+			                	['Autorizar', 'Autorizar : ' + jid ],
+			                	['Remover', 'Remover : ' + jid ],
+			                	['Renomear', 'Renomear : ' + jid],
+			                	['Trocar grupo', 'Trocar grupo : ' + jid],
+						   ];
+
+			var _itens = "";
+			
+			for( var i in _options )
+			{
+				_itens += '<img src="images/arrow_right.gif"/><span style="cursor:pointer; margin:3px;" onclick="alert(\'' +_options[i][1] + '\');">';
+				_itens += _options[i][0] + '</span><br/>';
+			}
+			
+			var _optionsItens = document.createElement("div");
+				_optionsItens.setAttribute("style", "margin: -5px 0px 0px 20px;");
+				_optionsItens.className		= "x-menu";
+				_optionsItens.style.zIndex	= '99999';
+				_optionsItens.innerHTML		= _itens;  
+										  
+				_showhidden.action('onmouseover', 'onmouseout', _optionsItens);
+				
+			element.parentNode.onmouseout	= function(){ _showhidden.hiddenObject(false); };
+			element.parentNode.onmouseover	= function(){ _showhidden.hiddenObject(true); };
+			element.parentNode.appendChild( _optionsItens );
+		}
+		
+	}
 	
 	function setPresence()
@@ -310,5 +309,5 @@
 		           	 'js/show_hidden.js',
 		           	 'css/trophyim.css',
-		           	 'css/window_azul.css'
+		           	 //'css/window_azul.css'
 		           	 //'css/window_cataratas.css'
 		           	 //'css/window_celepar.css'
@@ -317,5 +316,5 @@
 		           	 //'css/window_escritorio.css'
 		           	 //'css/window_metropole.css'
-		           	 //'css/window_rochas.css'
+		           	 'css/window_rochas.css'
 		            ];
 		
@@ -324,4 +323,6 @@
 	}
 	
+	loadIM.prototype.actionButton		= actionButton;
+	loadIM.prototype.addContacts		= addContacts;
 	loadIM.prototype.configEvents		= configEvents;
 	loadIM.prototype.getZIndex			= getZindex;
