function cad_autor(){

if(document.cad.nome.value=="" || document.cad.nome.value.length < 5){
	alert( "Informe o nome corretamente." );
	document.cad.nome.focus();
	return false;
}
	
if( document.cad.email.value=="" || document.cad.email.value.indexOf('@')==-1 || document.cad.email.value.indexOf('.')==-1 ){
	alert( "Preencha o e-mail corretamente!" );
	document.cad.email.focus();
	return false;
}

if(document.cad.login.value=="" || document.cad.login.value.length < 5 || document.cad.login.value!=document.cad.clogin.value ){
	alert( "Informe e confirme o login corretamente." );
	document.cad.login.focus();
	return false;
}

if(document.cad.senha.value=="" || document.cad.senha.value.length < 5 || document.cad.senha.value!=document.cad.csenha.value ){
	alert( "Informe e confirme a senha corretamente." );
	document.cad.senha.focus();
	return false;
}

if(document.cad.foto.value==""){
	alert( "Informe a foto do autor corretamente." );
	return false;
}
	
return true;	
}




function cad_categ(){

if(document.cad.titulo.value=="" || document.cad.titulo.value.length < 3){
	alert( "Informe o titulo corretamente." );
	document.cad.titulo.focus();
	return false;
}
return true;	
}



function cad_categED(n_form){
	var oForm = document.getElementById(n_form); // pega o form
	
	if(oForm.titulo.value=="" || oForm.titulo.value.length < 3){
		alert( "Informe o titulo corretamente." );
		oForm.titulo.focus();
		return false;
	}
	
return true;	
}





function cad_news(){

if(document.cad.titulo.value=="" || document.cad.titulo.value.length < 3){
	alert( "Informe o titulo corretamente." );
	document.cad.titulo.focus();
	return false;
}

if(document.cad.chapeu.value=="" || document.cad.chapeu.value.length < 3){
	alert( "Informe o Chápeu corretamente." );
	document.cad.chapeu.focus();
	return false;
}

if(document.cad.categoria1.value==0 ){
	alert( "Informe pelo menos a primeira categoria." );
	document.cad.categoria1.focus();
	return false;
}

/*
if(document.cad.texto.value=="" || document.cad.texto.value.length < 50){
	alert( "Informe o conteudo da notícia." );
	document.cad.texto.focus();
	return false;
} */

return true;	
}


function cad_personagem(){
	
if(document.cad.nome.value=="" || document.cad.nome.value.length < 3){
	alert( "Informe o nome corretamente." );
	document.cad.nome.focus();
	return false;
}

if(document.cad.foto.value==""){
	alert( "Informe a foto do autor corretamente." );
	return false;
}

return true;	
	
}


function cad_personagemED(n_form){
	var oForm = document.getElementById(n_form); // pega o form
	
	if(oForm.nome.value=="" || oForm.nome.value.length < 3){
		alert( "Informe o nome corretamente." );
		oForm.nome.focus();
		return false; 
	}
	
return true;	
}


function sendEmail(){
	
if(document.sendEmailForm.nome.value==""){
	alert( "Informe o nome corretamente." );
	document.sendEmailForm.nome.focus();
	return false;
}

if( document.sendEmailForm.email.value=="" || document.sendEmailForm.email.value.indexOf('@')==-1 || document.sendEmailForm.email.value.indexOf('.')==-1 ){
	alert( "Preencha seu e-mail corretamente!" );
	document.sendEmailForm.email.focus();
	return false;
}

if( document.sendEmailForm.para.value=="" || document.sendEmailForm.para.value.indexOf('@')==-1 || document.sendEmailForm.para.value.indexOf('.')==-1 ){
	alert( "Preencha o e-mail do destinatário corretamente!" );
	document.sendEmailForm.para.focus();
	return false;
}

if( document.sendEmailForm.confirma.value!=document.sendEmailForm.edcaptcha.value){
	alert( "Confirme as letras corretamente" );
	document.sendEmailForm.confirma.focus();
	return false;
} 

return true;	
	
}





function verificaFormERRO(){
	
if(document.erro_form.nome.value==""){
	alert( "Informe o nome corretamente." );
	document.erro_form.nome.focus();
	return false;
}

if( document.erro_form.email.value=="" || document.erro_form.email.value.indexOf('@')==-1 || document.erro_form.email.value.indexOf('.')==-1 ){
	alert( "Preencha seu e-mail corretamente!" );
	document.erro_form.email.focus();
	return false;
}

if(document.erro_form.erro.value=="" || document.erro_form.erro.value.length < 5){
	alert( "Informe o erro corretamente." );
	document.erro_form.erro.focus();
	return false;
}


if( document.erro_form.confirma.value!=document.erro_form.edcaptcha.value){
	alert( "Confirme as letras corretamente" );
	document.erro_form.confirma.focus();
	return false;
} 

//enviaErroF();
return true;	
	
}



function cad_videoED(n_form){
	var oForm = document.getElementById(n_form); // pega o form
	
	if(oForm.titulo.value=="" || oForm.titulo.value.length < 3){
		alert( "Informe o titulo corretamente." );
		oForm.titulo.focus();
		return false; 
	}
	
	if(oForm.url.value=="" || oForm.url.value.length < 3){
		alert( "Informe a URL corretamente." );
		oForm.url.focus();
		return false; 
	}
	
return true;	
}



function cad_blogED(n_form){
	var oForm = document.getElementById(n_form); // pega o form
	
	if(oForm.titulo.value=="" || oForm.titulo.value.length < 3){
		alert( "Informe o titulo corretamente." );
		oForm.titulo.focus();
		return false; 
	}
	
	if(oForm.url.value=="" || oForm.url.value.length < 3){
		alert( "Informe a URL corretamente." );
		oForm.url.focus();
		return false; 
	}
	
	if(oForm.image.value=="" || oForm.image.value.length < 3){
		alert( "Informe a imagem corretamente." );
		oForm.image.focus();
		return false; 
	}	
	
return true;	
}


function cadContato(){
	
if(document.cad.nome.value==""){
	alert( "Informe o nome corretamente." );
	document.cad.nome.focus();
	return false;
}

if( document.cad.email.value=="" || document.cad.email.value.indexOf('@')==-1 || document.cad.email.value.indexOf('.')==-1 ){
	alert( "Preencha seu e-mail corretamente!" );
	document.cad.email.focus();
	return false;
}



if( document.cad.captcha.value!=document.cad.ccaptcha.value){
	alert( "Confirme as letras corretamente" );
	document.cad.captcha.focus();
	return false;
} 

if(document.cad.mensagem.value==""){
	alert( "Digite a mensagem." );
	document.cad.mensagem.focus();
	return false;
}

return true;	
	
}




function cad_revistaED(n_form){
	var oForm = document.getElementById(n_form); // pega o form
	
	if(oForm.titulo.value=="" || oForm.titulo.value.length < 3){
		alert( "Informe o titulo corretamente." );
		oForm.titulo.focus();
		return false; 
	}
	
	if(oForm.valor.value==""){
		alert( "Informe o valor corretamente." );
		oForm.url.focus();
		return false; 
	}
	
	if(oForm.imagem.value==""){
		alert( "Informe a imagem corretamente." );
		oForm.imagem.focus();
		return false; 
	}	
	
	if(oForm.idpagseguro.value==""){
		alert( "Informe o ID do PagSeguro corretamente." );
		oForm.idpagseguro.focus();
		return false; 
	}		
	
	if(oForm.swf.value==""){
		alert( "Informe o nome do SWF corretamente." );
		oForm.swf.focus();
		return false; 
	}	

	if(oForm.descricao.value==""){
		alert( "Informe a descrição corretamente." );
		oForm.descricao.focus();
		return false; 
	}		
	
return true;	
}


function cad_bancaED(n_form){
	var oForm = document.getElementById(n_form); // pega o form
	
	if(oForm.nome.value=="" || oForm.nome.value.length < 3){
		alert( "Informe o nome corretamente." );
		oForm.nome.focus();
		return false; 
	}
	
	if(oForm.endereco.value==""){
		alert( "Informe o endereço corretamente." );
		oForm.endereco.focus();
		return false; 
	}
	
	
return true;	
}



function cad_numerodiaED(n_form){
	var oForm = document.getElementById(n_form); // pega o form
	
	if(oForm.numero.value==""){
		alert( "Informe o numero corretamente." );
		oForm.numero.focus();
		return false; 
	}
	
	if(oForm.texto.value==""){
		alert( "Informe o texto corretamente." );
		oForm.texto.focus();
		return false; 
	}
	
	
return true;	
}


