// PopUp
function OpenWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

// click direiro
document.oncontextmenu = function(){return false}

function Alert(obj, txt){
	document.getElementById('Erro').innerHTML = txt;
	document.getElementById(obj).focus();
}
// Validação contato
function VerificaContato(){
	if (document.form1.txtNome.value == ""){
		Alert("txtNome", "Informe seu nome");
		return false;
	}
	if (document.form1.txtEmail.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.gov)|(\.br)|(\..{2,2}))$)\b/gi)){			
	} else {
		Alert("txtEmail", "Informe um e-mail válido");
	  	return false;
	}
	if (document.form1.txtCidade.value == ""){
		Alert("txtCidade", "Informe sua cidade");
		return false;
	}
	if (document.form1.txtEstado.value == ""){
		Alert("txtEstado", "Informe seu estado (UF)");
		return false;
	}
	if (document.form1.txtMensagem.value == ""){
		Alert("txtMensagem", "Digite uma mensagem");
		return false;
	}
	return true;
}
function EnviaContato(){
	if (VerificaContato())
		document.form1.submit();
}
