Index: trunk/workflow/js/userinterface/orgchart.js
===================================================================
--- trunk/workflow/js/userinterface/orgchart.js	(revision 795)
+++ trunk/workflow/js/userinterface/orgchart.js	(revision 1245)
@@ -34,9 +34,19 @@
 
 	var content = '<ul class="horizontalMenu">';
+	content += '<li style="margin: 5px 5px 0 5px">Visualizar : <select>'
+	content += '<option>-- Selecione uma opção de visualização --</option>'
+	content += '<option onclick="">Alfabética</option>'
+	content += '<option onclick="getHierarchicalArea( );">Áreas</option>'
+	content += '<option onclick="">Lotação</option>'
+	content += '<option onclick="getUsefulPhones( );">Telefones Úteis</option>'
+	content += '<option onclick="getAreaWithSubtituteBoss( )">Substituição de Chefia</option>'
+	content += '<option onclick="getCostCenters( );">Centros de Custo</option>'
+	content += '<option onclick="">Vínculos</option>'
+	content += '</select></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 href="#" onclick="getCostCenters(); return false;"><img src="templateFile.php?file=images/coins.png">&nbsp;Centros de Custo</a></li>';
-	content += '<li><a href="#" onclick="getHierarchicalArea(); return false;"><img src="templateFile.php?file=images/orgchart_tree.png">Lista Hierárquica</a></li>';
-	content += '<li><a href="#" onclick="getAreaList(); return false;"><img src="templateFile.php?file=images/orgchart_list.png">&nbsp;&nbsp;Lista Alfabética</a></li>';
-	content += '<li><a href="#" onclick="getCategoriesList(); return false;"><img src="templateFile.php?file=images/folder_green.png">&nbsp;&nbsp;Listar Vínculos</a></li>';
+	//content += '<li><a href="#" onclick="getCostCenters(); return false;"><img src="templateFile.php?file=images/coins.png">&nbsp;Centros de Custo</a></li>';
+	//content += '<li><a href="#" onclick="getHierarchicalArea(); return false;"><img src="templateFile.php?file=images/orgchart_tree.png">Lista Hierárquica</a></li>';
+	//content += '<li><a href="#" onclick="getAreaList(); return false;"><img src="templateFile.php?file=images/orgchart_list.png">&nbsp;&nbsp;Lista Alfabética</a></li>';
+	//content += '<li><a href="#" onclick="getCategoriesList(); return false;"><img src="templateFile.php?file=images/folder_green.png">&nbsp;&nbsp;Listar Vínculos</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 += '<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>';
@@ -115,4 +125,63 @@
 }
 
+function displayUsefulPhones( data )
+{
+	if ( _checkError( data ) )
+		return;
+
+	var div = $('orgchartEmployees');
+	if (data.length == 0)
+	{
+		div.innerHTML = '<br/><br/><center><strong>Nenhum registro encontrado</strong></center>';
+		return;
+	}
+
+	var content = '<center><h3>TELEFONES ÚTEIS</strong></h3>';
+	content += '<table class="employeeList">';
+	content += '<tr><th>Localidade</th><th>Número</th></tr>';
+	var current;
+	var usefulPhoneCount = data.length;
+	for (var i = 0; i < usefulPhoneCount; i++)
+	{
+		current = data[i];
+		content += '<tr class="linha'+ i%2 + '">';
+		content += '<td>' + current[ 'descricao' ] + '</td>';
+		content += '<td>' + current[ 'numero' ] + '</td>';
+		content += '</tr>';
+	}
+	content += '</table>';
+	div.innerHTML = content;
+}
+
+function displayAreaWithSubtituteBoss( data )
+{
+	if ( _checkError( data ) )
+		return;
+
+	var div = $('orgchartEmployees');
+	if (data.length == 0)
+	{
+		div.innerHTML = '<br/><br/><center><strong>Nenhum registro encontrado</strong></center>';
+		return;
+	}
+
+	var content = '<center><h3>Áreas com Substituição de Chefia</strong></h3>';
+	content += '<table class="employeeList">';
+	content += '<tr><th>Área</th><th>Titular</th><th>Substituto</th></tr>';
+	var current;
+	var usefulPhoneCount = data.length;
+	for (var i = 0; i < usefulPhoneCount; i++)
+	{
+		current = data[i];
+		content += '<tr class="linha'+ i%2 + '">';
+		content += '<td>' + current['area'] + '</td>';
+		content += '<td>' + current['titular'] + '</td>';
+		content += '<td>' + current['substituto'] + '</td>';
+		content += '</tr>';
+	}
+	content += '</table>';
+	div.innerHTML = content;
+}
+
 function displayHierarchicalAreas(data)
 {
@@ -133,4 +202,14 @@
 	div.innerHTML = "<center><strong>ÁREAS</strong></center>";
 	recursivePrint(data);
+}
+
+function getUsefulPhones( )
+{
+	cExecute("$this.bo_userinterface.getUsefulPhones", displayUsefulPhones, "");
+}
+
+function getAreaWithSubtituteBoss( )
+{
+	cExecute("$this.bo_userinterface.getAreaWithSubtituteBoss", displayAreaWithSubtituteBoss, "");
 }
 
