function NovaJanela(pagina, w, h) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',resizable=no,directories=no';
	window.open(pagina, 'ProEcologic', winprops);
}

function validaContato() {
// NOME
	if (document.getElementById('nome').value.length < 3) {
		alert('Preencha o campo nome corretamente!');
		document.getElementById('nome').focus();
		return false;
	}

// EMAIL
	if (document.getElementById('email').value.length < 3) {
		alert('Preencha o campo email corretamente!');
		document.getElementById('email').focus();
		return false;
	}
	endereco=document.getElementById('email').value;
	invalidChars=" /:,;()='´`^~áéàèíìóòãñüöïç+&#$"
	for (i=0; i<invalidChars.length; i++) {
		badChar=invalidChars.charAt(i)
		if (endereco.indexOf(badChar,0)>-1) {
			alert('Digite o email corretamente');
			return false;
		}
	}
	//Verifica a existência do @ no endereço
	atPos=endereco.indexOf("@",1)
	if (atPos == -1) {
		alert('Preencha o campo email corretamente!');
		return false;
	}
	//Testa se existe apenas um @ no endereço de e-mail
	if (endereco.indexOf("@",atPos+1)>-1) {
		alert('Preencha o campo email corretamente!');
		return false;
	}
	//Verifica se existe um ponto em algum lugar depois do sinal de @
	if (endereco.indexOf(".",atPos) == -1) {
		alert('Preencha o campo email corretamente!');
		return false;
	}

// TELEFONE
	if (document.getElementById('fone').value.length < 3) {
		alert('Preencha o campo telefone corretamente!');
		document.getElementById('fone').focus();
		return false;
	}

// ASSUNTO
	if (document.getElementById('assunto').value.length < 3) {
		alert('Preencha o campo assunto corretamente!');
		document.getElementById('assunto').focus();
		return false;
	}

// MENSAGEM
	if (document.getElementById('mensagem').value.length < 3) {
		alert('Preencha o campo mensagem corretamente!');
		document.getElementById('mensagem').focus();
		return false;
	}
}
