function contato() {
	var Check = 0;
	if (document.fm.nome.value == '') { Check = 1; }
	if (document.fm.email.value == '') { Check = 1; }
	if (document.fm.mensagem.value == '') { Check = 1; }
	if (Check == 1) {
		alert("Nome, email e mensagem devem ser preenchidos.");
		return false;
	} else {
		document.fm.submit.disabled = true;
		return true;
	}
}
function press() {
	if (window.confirm('Os dados estão todos corretos?')) { 
		document.getElementById("set").style.display == 'none';
		document.getElementById("set").innerHTML = '<font color=#DD0000>Por favor, aguarde...</font>';
		return true;
	}
	else { return false; }
}
function editar(_id){
	if (document.getElementById(_id).style.display == 'none') {
		document.getElementById(_id).style.display = '';
	}
	else {
		document.getElementById(_id).style.display = 'none';
	}
}
function detalhes(_id){
	if (document.getElementById(_id).style.display == 'none') {
		document.getElementById(_id).style.display = '';
	}
	else {
		document.getElementById(_id).style.display = 'none';
	}
}
function excluir(codigo) {
	if (window.confirm('Deseja excluir este anúncio?')) { 
		location.href='afiliados.php?pi=anuncios&del=sim&id_anuncio='+codigo;
	}
}
var start = 30;
function diminui () {
	document.getElementById("tempo").innerHTML = "Por favor, aguarde <b>"+start+"</b> segundos";
	if (start > 0) {
		window.setTimeout ("diminui()", 1000);
	}
	if (start == 0) {
		document.getElementById('proximo').style.display='block';
		document.getElementById('tempo').style.display='none';
		return false;
	}
start--;
}

function confere() {

	var Check = 0;

	if (document.fnd.valor_fundos.value == '') { Check = 1; }
	if (Check == 1) {
		alert("Digite um valor múltiplo de 10.\n10, 20, 30, 40...");
		return false;
	} else {
		document.fnd.submit.disabled = true;
		return true;
	}
}