/*  valida form de videos */
function cad_video(){
if(document.cadVid.titulo.value=="" || document.cadVid.titulo.value.length < 5){
	alert( "Verifique o titulo. Ele deve contar mais de 5 caracteres" );
	document.cadVid.titulo.focus();
	return false;
}
	
if( document.cadVid.url.value=="" ){
	alert( "Informe a URL do video" );
	document.cadVid.url.focus();
	return false;
}

return true;	
}


/*  valida form de comentarios */
function v_comment(){
	
if( document.comment.message.value=="" ){
alert( "Digite seu comentario!" );
document.comment.message.focus();
return false;
}

return true;	
}


/*  valida form das noticias */
function cad_news(){
if(document.cadNews.titulo.value=="" || document.cadNews.titulo.value.length < 5){
	alert( "Verifique o titulo. Ele deve contar mais de 5 caracteres" );
	document.cadNews.titulo.focus();
	return false;
}
	
if( document.cadNews.texto.value=="" ){
	alert( "Informe a o conteudo." );
	document.cadNews.texto.focus();
	return false;
}

return true;	
}


/*  valida form das noticias */
function cad_ht(){
	
if(document.cadHT.titulo.value=="" || document.cadHT.titulo.value.length < 5){
	alert( "Verifique o titulo. Ele deve contar mais de 5 caracteres" );
	document.cadHT.titulo.focus();
	return false;
}
	
if( document.cadHT.img.value=="" ){
	alert( "Informe a imagem." );
	document.cadHT.img.focus();
	return false;
}


if(document.cadHT.url1.value=="" && document.cadHT.url2.value=="" && document.cadHT.url3.value=="" && document.cadHT.url4.value=="" && document.cadHT.url5.value=="") {
	alert( "Você deve informar pelo menos uma URL" );
	document.cadHT.url1.focus();
	return false;
}


return true;	
}




function cad_contato(){

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


	
return true;	
}
