function validaPonto(){
	ok=true;
	rua=document.form_ponto.nome_rua;
	numero=document.form_ponto.nome_numero;
	complemento=document.form_ponto.nome_complemento;
	cep=document.form_ponto.nome_cep;
	bairro=document.form_ponto.nome_bairro;
	referencia=document.form_ponto.nome_referencia;
	doDigits(numero);
	if (rua.value == "" && ok) {
		ok = false;
		alert("Por favor, insira o nome da rua");
		rua.focus();
		}
	if (numero.value == "" && ok) {
		ok = false;
		alert("Por favor, insira o numero");
		numero.focus();
		}
	if(cep.value!="" && ok){
		doDigits(cep);
		if (cep.value == "" && ok) {
			alert("Por favor, se desejas fornecer o cep, preencha corretamente");
			ok=false;
			cep.focus();
			}	
		}
	if(ok){
		URL = 'includes/act/act_pontos.php?rua='+rua.value+'&numero='+numero.value+'&complemento='+complemento.value+'&cep='+cep.value+'&bairro='+bairro.value+'&referencia='+referencia.value;
		ajaxGet(URL,document.getElementById("painel_aviso"),true);
		}
	}
	
function validaPonto2(){
	ok=true;
	rua=document.form_ponto.nome_rua;
	numero=document.form_ponto.nome_numero;
	
	doDigits(numero);
	if (rua.value == "" && ok) {
		ok = false;
		alert("Por favor, insira o nome da rua");
		rua.focus();
		}
	if (numero.value == "" && ok) {
		ok = false;
		alert("Por favor, insira o numero");
		numero.focus();
		}
	
	if(ok){
		URL = 'includes/act/act_pontos.php?rua='+rua.value+'&numero='+numero.value+'&pesq=1';
		ajaxGet(URL,document.getElementById("painel_aviso"),true);
		}
	}
	
	
function alteraPonto_form(id){
	ok=true;
	rua=document.form_ponto.nome_rua;
	numero=document.form_ponto.nome_numero;
	complemento=document.form_ponto.nome_complemento;
	cep=document.form_ponto.nome_cep;
	bairro=document.form_ponto.nome_bairro;
	referencia=document.form_ponto.nome_referencia;
	doDigits(numero);
	if (rua.value == "" && ok) {
		ok = false;
		alert("Por favor, insira o nome da rua");
		rua.focus();
		}
	if (numero.value == "" && ok) {
		ok = false;
		alert("Por favor, insira o numero");
		numero.focus();
		}
	if(cep.value!="" && ok){
		doDigits(cep);
		if (cep.value == "" && ok) {
			alert("Por favor, se desejas fornecer o cep, preencha corretamente");
			ok=false;
			cep.focus();
			}	
		}
	if(ok){
		URL = 'includes/act/act_pontos.php?altera=1&rua='+rua.value+'&numero='+numero.value+'&complemento='+complemento.value+'&cep='+cep.value+'&bairro='+bairro.value+'&referencia='+referencia.value+'&id='+id;
		ajaxGet(URL,document.getElementById("painel_aviso"),true);
		document.form_ponto.nome_rua.value="";
		document.form_ponto.nome_numero.value="";
		document.form_ponto.nome_complemento.value="";
		document.form_ponto.nome_cep.value="";
		document.form_ponto.nome_bairro.value="";
		document.form_ponto.nome_referencia.value="";
		}
	}
function tem_rua(){
		rua=document.form_ponto.nome_rua;
		numero=document.form_ponto.nome_numero;
		if(numero.value != "" && rua.value != "" && rua.value.length>2 ){
			URL = 'includes/act/act_pontos.php?rua='+rua.value+'&numero='+numero.value+'&pesq=1';
			ajaxGet(URL,document.getElementById("painel_aviso"),true);
			}

		}
