Index: branches/2.2/workflow/js/userinterface/orgchart.js
===================================================================
--- branches/2.2/workflow/js/userinterface/orgchart.js	(revision 1452)
+++ branches/2.2/workflow/js/userinterface/orgchart.js	(revision 3167)
@@ -45,5 +45,5 @@
 	content += '</select></a></li>';
 	content += '<li><a href="#" onclick="window.open(\'' + enderecoImagem + '\', \'extwindow\'); return false;"><img src="templateFile.php?file=images/Process.gif">&nbsp;&nbsp;Gráfico</a></li>';
-	content += '<li><a><input type="text" name="search_term" id="search_term" onkeypress="if (((event.which) ? event.which : event.keyCode) == 13) $(\'search_span\').onclick(); return true;" /><span id="search_span" style="cursor: pointer;" onclick="tmp = $$(\'div#orgchartAreas a.destaque\'); if (tmp[0]) tmp[0].removeClassName(\'destaque\'); orgchartSearchEmployee($F(\'search_term\')); return false;">&nbsp;busca</span></a></li>';
+	content += '<li><a><input type="text" name="search_term" id="search_term" onkeypress="if (((event.which) ? event.which : event.keyCode) == 13) $(\'search_span\').onclick(); return true;" /><span id="search_span" style="cursor: pointer;" onclick="tmp = $$(\'div#orgchartAreas a.destaque\'); if (tmp[0]) tmp[0].removeClassName(\'destaque\'); orgchartSearchEmployee($F(\'search_term\')); return false;">&nbsp;busca&nbsp;</span><img src="templateFile.php?file=images/help.png" title="Informe o nome, área ou telefone a ser pesquisado." style="cursor: help" /></a></li>';
 	content += '<li><a href="#" onclick="printArea(); return false;"><img src="templateFile.php?file=images/imprimir.png" width="16">&nbsp;&nbsp;Imprimir</a></li>';
 	content += '</ul>';
@@ -171,5 +171,5 @@
 	var content = '<center><h2>Substituição de Chefia</h2></center>';
 	content += '<table class="employeeList">';
-	content += '<tr><th>Área</th><th>Titular</th><th>Substituto</th></tr>';
+	content += '<tr><th>Área</th><th>Titular</th><th>Substituto</th><th>Data de início</th><th>Data de término</th></tr>';
 	var current;
 	for (var i = 0; i < data.length; i++)
@@ -180,4 +180,6 @@
 		content += '<td>' + current['titular'] + '</td>';
 		content += '<td>' + current['substituto'] + '</td>';
+		content += '<td>' + current['data_inicio'] + '</td>';
+		content += '<td>' + current['data_fim'] + '</td>';
 		content += '</tr>';
 	}
@@ -294,5 +296,7 @@
 
 	/* no employee to list */
-	if ( ( ! data['employees'] || data['employees'].length == 0 ) && ( ! data['bygroup'] || data['bygroup'].length == 0 ) )
+	if ( ( ! data['employees'] || data['employees'].length == 0 ) && 
+		 ( ! data['bygroup'] || data['bygroup'].length == 0 ) &&
+		 ( ! data['bytelephone'] || data['bytelephone'].length == 0 ) )
 	{
 		div.innerHTML = '<br/><br/><center><strong>Nenhum registro encontrado</strong></center>';
@@ -317,5 +321,5 @@
 		/* build the display table (headers)*/
 		content += '<table id="employeeList" class="employeeList" style="clear: both">';
-		content += '<tr>';
+		content += '<tr class="message_header">';
 		content += '<th>Nome</th>';
 		if (useArea)
@@ -344,5 +348,5 @@
 				complement = '';
 			if (employees[i]['removed'])
-				complement += ' <font color="red">(excluído)</font>';
+				complement += ' <font color="red">(inativo)</font>';
 			content += '<tr class="linha'+ i%2 + (useCategories ? ' categoria_' + employees[i]['funcionario_categoria_id'] : '') + '" onmouseover="this.className=\'highlight0\'" onmouseout="this.className=\'linha'+ i%2 + (useCategories ? ' categoria_' + employees[i]['funcionario_categoria_id'] : '') + '\'">';
 			content += '<td><a href="javascript:void(0);" onmouseover="getEmployeeInfoTimer(event, ' + employees[i]['funcionario_id'] + '); return false;" onmouseout="hideEmployeeInfo(); return false;">' + employees[i]['cn'] + complement + '</a></td>';
@@ -477,4 +481,5 @@
 			div.innerHTML += '</center><span style="color:red">Busca pelo nome: ' + searchTerm.toUpperCase( ) + '</span>' + content;
 
+		// printing records found by group
 		if ( data['bygroup'] && data['bygroup'].length )
 		{
@@ -484,4 +489,14 @@
 			if ( content )
 				div.innerHTML += '<br/><br/><span style="color:red">Busca pelo setor: ' + searchTerm.toUpperCase( ) + '</span><br/>' + content;
+		}
+
+		// printing records found by telephoneNumber
+		if ( data['bytelephone'] && data['bytelephone'].length )
+		{
+			employees = [ ];
+			employees[ 'employees' ] = data['bytelephone'];
+			content = printEmployeesHandler( employees, 'returnResult' );
+			if ( content )
+				div.innerHTML += '<br/><br/><span style="color:red">Busca pelo telefone: ' + searchTerm.toUpperCase( ) + '</span><br/>' + content;
 		}
 
