function contato_valida(){
	objform = document.getElementById("frm_contato");
	
	if(objform.nome.value=='' || objform.nome.value.length < 4){
      alert('Digite seu nome corretamente');
      objform.nome.focus("");
   }
   else if(objform.email.value=='' || objform.email.value.length < 8){
      alert('Digite seu e-mail corretamente');
      objform.email.focus("");
   }
   else if(objform.email.value!='' && (objform.email.value.split("@").length <=1 || objform.email.value.split(".").length <=1)){
      alert('Email digitado é inválido');
      objform.email.focus("");
   }
   else if(objform.fone.value=='' || objform.fone.value.length < 8){
      alert('Digite seu telefone corretamente');
      objform.fone.focus("");
   }
   else if(objform.mensagem.value==''){
      alert('Digite o comentario corretamente');
      objform.mensagem.focus("");
   }
   else
      objform.submit();
}
function validanews(){
	objform = document.getElementById("form_news");
	
   if(objform.nome.value == ''){
      alert('Digite seu nome');
      objform.nome.focus();
   }
   else if(objform.email.value == ''){
      alert('Digite seu e-mail');
      objform.email.focus();
   }
   else if(objform.email.value!='' && (objform.email.value.split("@").length <=1 || objform.email.value.split(".").length <=1)){
      alert('Email digitado invalido');
      objform.email.focus();
   }
   else
      objform.submit();
}
function validar(){
   objfrm = document.frm;
   if(objfrm.USUARIO.value == ""){
      alert("Digite o seu login");
      objfrm.USUARIO.focus();
   }
   else if(objfrm.SENHA.value == ""){
      alert("Digite a sua senha");
      objfrm.SENHA.focus();
   }
   else
      objfrm.submit();
}
function validahelp(id){
	objform = document.getElementById("form_help");
	
	if(objform.help_assunto.value.length < 2){
      alert('Digite um assunto corretamente');
      objform.help_assunto.focus("");
   }
   else if(objform.help_nome.value.length < 2){
      alert('Digite um nome corretamente');
      objform.help_nome.focus("");
   }
   else{
      window.open(id+"/atendimento.php?help_assunto=" + objform.help_assunto.value + "&help_nome=" + objform.help_nome.value, 'Helpdesk', 'width=400, height=450 left='+((screen.width-400)/2)+' top='+((screen.height-450)/2)+' status=no scrollbars=no');
		objform.help_assunto.value = "";
		objform.help_nome.value    = "";
	}
}