function VerificaDados() {
with (document.dados){
	if (nome.value.length==0) {
		alert("Por favor, digite seu nome.");
		nome.focus();
		return false;
	}
	if (email.value.length==0) {
		alert("Por favor, digite seu email.");
		email.focus();
		return false;
	}
    if (email.value.indexOf('@' , 0) == -1){
		alert("E-mail inválido.");
		email.focus();
		return false;		
		}
    if (email.value.indexOf('.' , 0) == -1){
		alert("E-mail inválido.");
		email.focus();
		return false;		
		}
   if (email.value.length<5) {
		alert("E-mail inválido.");
		email.focus();
		return false;
      }
}
}

function Mascara(formato, objeto)

{
	campo = eval(objeto);
	
	//TELEFONE
	if(formato=='TELEFONE'){
		var padrao = /[0-9]/;
		var tecla = window.event.keyCode;
		tecla = String.fromCharCode(tecla);
		padraoT = padrao.exec(tecla);
		if(padraoT == null){
			window.event.keyCode = 0;
		}
		if(campo.value.length == 0)
			campo.value += "(";
		else if(campo.value.length == 3)
			campo.value += ") ";
		else if(campo.value.length == 9)
			campo.value += ".";
	}
	
	//CEP
	if(formato=='CEP'){
		var padrao = /[0-9]/;
		var tecla = window.event.keyCode;
		tecla = String.fromCharCode(tecla);
		padraoT = padrao.exec(tecla);
		if(padraoT == null){
			window.event.keyCode = 0;
		}
		if(campo.value.length == 5)
			campo.value += ".";
	}
	//ESTADO
	if(formato=='UF'){
		var padrao = /[a-zA-Z]/;
		var tecla = window.event.keyCode;
		tecla = String.fromCharCode(tecla);
		padraoT = padrao.exec(tecla);
		if(padraoT == null){
			window.event.keyCode = 0;
		}
		if(campo.value.length == 5)
			campo.value += ".";
	}
}

function MM_jumpMenuGo(objId,targ,restore){ //v9.0
  var selObj = null;  with (document) { 
  if (getElementById) selObj = getElementById(objId);
  if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0; }
  
}
function SubmitForm(objId){
	document.FormModelo.submit();
	
	var selObj = null;  
	with (document) { 
		if (getElementById) selObj = getElementById(objId);
		//alert(selObj.value);
	}
	
}
