<!--

function fValidaNecessidade()
{
	var vForm=document.frmSuaNecessidade;
	
	if(vForm.txtNome.value=="")
	{
		alert("Digite o nome!");
		vForm.txtNome.focus();
		return false;
	}
	if(vForm.txtEmail.value=="")
	{
		alert("Digite o e-mail!");
		vForm.txtEmail.focus();
		return false;
	}
	if(vForm.txtTelefone.value=="")
	{
		alert("Digite o telefone!");
		vForm.txtTelefone.focus();
		return false;
	}
	if(vForm.txtDescricao.value=="")
	{
		alert("Digite a descrição!");
		vForm.txtDescricao.focus();
		return false;
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function SendMe()
{
	var where_to = document.frmVendas.vendas.options[document.frmVendas.vendas.selectedIndex].value;
	if(where_to != '')
	{
	   parent.location = where_to;
	 }
	return false
}

function SendMeLoc()
{

	var where_to = document.frmLocacao.locacao.options[document.frmLocacao.locacao.selectedIndex].value;
		if (where_to != '')
		{
		   parent.location = where_to;
		}
	return false
}

function Ordena(tp)
{
var where_to = document.forms[1].order.options[document.forms[1].order.selectedIndex].value;
	if (tp==1 ){
	if (where_to != "value") location = where_to + "&optTpOrder=desc"
	return false
	}
	else {
	if (tp==2){
	 if (where_to != "value") location = where_to
	return false
	}
}
}

function fEnviar(setor,atendente)
{
var varLocal = 'atendimento.asp?opt=alterasetor&idSetor='+setor+'&idAtendente='+atendente;

			 document.frmGeral.action=varLocal;
		     document.frmGeral.method="post";
			 document.frmGeral.submit();
	   	     return false
}

function Imprimir() {
  var mac = (navigator.userAgent.indexOf("Mac") != -1); 
  var doc = (document.all) ? 1 : 0;
  var ie_ns = (window.print) ? 1 : 0;

  if (ie_ns)     			// Se for netscape 4 ou ie5
    window.print();
  else if (doc && !mac)     // Se for ie4
    vbPrintPage()
  else     					// Outros
    alert("Opção não suportada pela navegador ");
    return false;
}


function fCarregaLancamento(varID)
{
	if(varID!=0)
	{
		var varUrl='lancamento/lancamento_view.asp?id='+varID;
		MM_openBrWindow(varUrl,'jLancamento','width=300,height=500');
	}
}

function fMapa(varUrl)
{
	if(varUrl!='')
	{
	   window.open(varUrl,'jMapa','width=700,height=550');	   
	}
}

//-->