<!-- 

function validarUsuario()
 {
   document.Login.login_username.value = document.Login.txtLoginLocal.value;
   document.Login.secretkey.value = document.Login.txtSenhaLocal.value;
   document.Login.txtLoginLocal.value = '';
   document.Login.txtSenhaLocal.value = '';

  }

function hL(content) {
	 //document.all[content].style.display = "none";
	 document.getElementById(content).style.display = "none";
	 if(document.getElementById("If_" + content)){
		 document.getElementById("If_" + content).style.display = "none";
	 }	 
	   
}
function sL(content) {
	 //document.all[content].style.display = "block";
         document.getElementById(content).style.display = "block";
	 
	 if(document.getElementById("If_" + content)){
		 document.getElementById("If_" + content).style.width = document.getElementById(content).offsetWidth;
		 document.getElementById("If_" + content).style.height = document.getElementById(content).offsetHeight;
		 document.getElementById("If_" + content).style.display = "block";
	 }
}


function comboChange(comoBox,usado){
  window.location.href = comoBox.options[comoBox.selectedIndex].value;
  if (usado) comoBox.selectedIndex=0;
}

				
function pop_up(){
		window.open ('pop_up.htm','Cep','status=no,resizable=no,scrollbars=no,menubar=no,width=200,height=200,left=0,top=0');
	}



function CriticaCampos()
	{
	  if (document.Geral.Localidade.value == "")
	  {
	    alert("Informe o nome da cidade, município, distrito ou povoado. Para o DF poderá ser informado o nome da Região Administrativa (Lago Sul, Lago Norte, Cruzeiro, Taguatinga, etc) !!");
	    document.Geral.Localidade.focus();
	    return (false);
	  } 
	  else
	  { 
	   var Branco = " ";
	   var Posic, Carac;
	   var Temp = document.Geral.Localidade.value.length;    
	   var Cont = 0;
	   for (var i=0; i < Temp; i++)   
	   {  
	   Carac =  document.Geral.Localidade.value.charAt (i);
	   Posic  = Branco.indexOf (Carac);   
	   if (Posic == -1)   
		  Cont++;      
	   }   
	   if (Cont <= 0)
	   {
	    	alert("Informe o nome da cidade, município, distrito ou povoado. Para o DF poderá ser informado o nome da Região Administrativa (Lago Sul, Lago Norte, Brasília, Taguatinga, etc) !!");
	    	document.Geral.Localidade.focus();
	    	return (false);
	   }   
	  }
	  if (document.Geral.Logradouro.value == "")
	  {
	    alert("Informe o nome do logradouro");
	    document.Geral.Logradouro.focus();
	    return (false);
	  }  
	  else
	  { 
	   var Branco = " ";
	   var Posic, Carac;
	   var Temp = document.Geral.Logradouro.value.length;    
	   var Cont = 0;
	   for (var i=0; i < Temp; i++)   
	   {  
	   Carac =  document.Geral.Logradouro.value.charAt (i);
	   Posic  = Branco.indexOf (Carac);   
	   if (Posic == -1)   
		  Cont++;      
	   }   
	   if (Cont <= 0)
	   {
	    	alert("Informe o nome do logradouro");
	    	document.Geral.Logradouro.focus();
	    	return (false);
	   }  
	  }
	  
	}    



function AjudaLogradouro()
	{   
	   DocRemote = window.open ('ajuda_cep_loc_log.htm','Logradouro','scrollbars,resizable,width=300,height=300');
	}



function ConsultarLocalidade()
	{   
		if(document.Geral.Localidade.value.length >=3){
	   		DocRemote = window.open ('consulta_localidade.cfm?mostrar=2&UF='+document.Geral.UF.value+'&Localidade='+document.Geral.Localidade.value,'Localidade','scrollbars,status=no,resizable,width=400,height=250');
		}else{
			DocRemote = window.open ('consulta_localidade.cfm?mostrar=1&UF='+document.Geral.UF.value+'&Localidade='+document.Geral.Localidade.value,'Localidade','scrollbars,status=no,resizable,width=400,height=250');
		}
	}


function Procura(){
		
		var objRegExp = new RegExp("[^a-zA-Z0-9-_ ãáàâÃÁÀÂêéèÊÉÈíìîÍÌÎõóòôÕÓÒÔúùûÚÙÛñÇç´`~^&]{1}");
		var blnHasInvalidChr = objRegExp.test(document.forms["frmPesquisaShop"].buscaproduto.value);
		var blnReturn = false;
		
		//alert(document.forms["frmPesquisaShop"].buscaproduto.value);
		
		if (document.forms["frmPesquisaShop"].buscaproduto.value == 'Palavra chave') 
			{ alert('Palavra chave requerida!'); blnReturn = true; }
		
		if (document.forms["frmPesquisaShop"].buscaproduto.value.length < 3)
			{ alert('A palavra chave deve conter no mínimo 3 caracteres!'); blnReturn = true; } 
		
		if (blnHasInvalidChr)
			{ alert('O texto não pode conter caracteres especiais!'); blnReturn = true; }
			
		if (!blnReturn)
			PTASubmete();
	}
	
	
function btContinuarAction(e)
	{
		if (e.keyCode == 13) Procura();
	}
	
        
function PTASubmete()
        {		
		document.forms["frmPesquisaShop"].action = "http://shopping.correios.com.br/wbm/shopping/script/resultado_busca.aspx?pesquisa=1&produto=" + document.forms["frmPesquisaShop"].buscaproduto.value;
		document.forms["frmPesquisaShop"].submit();
	}
        
-->

