<!-- INÍCIO Script Janela Detalhes //-->
function janela_detalhes(url)
	{
	mywin = window.open(url,"window",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=779,height=550');
	}
	

<!-- INÍCIO Script Links Úteis - Tela Cheia //-->
function janela_links(url)
	{
	mywin = window.open(url,"window",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,fullscreen=0');
	}


<!-- INÍCIO Script do Cadastro //-->
function open_cadastro(url)
	{
	mywin = window.open(url,"window",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=530,height=590');
	}
	
	
<!-- INÍCIO Script do maisLinksUteis //-->
function open_maisLinksUteis(url)
	{
	mywin = window.open(url,"window",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=300,height=500');
	}
	
	

<!-- INÍCIO Script do Calendário //-->
function open_calendario(url)
	{
	mywin = window.open(url,"window",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=290,height=150');
	}


<!-- INÍCIO Script que controla o tamanho dos textos //-->
function TamanhoFonte(num, id)
{
document.getElementById(id).className = "aumenta"+num;
}


<!-- INÍCIO da verificação dos campos dos formulários -->
function Form_Validator(theForm) {

//****** CAMPO NOME  ******
  if (theForm.nome.value == false)
   {
     alert("Preencha o campo Nome.");
     theForm.nome.focus();
     theForm.nome.select();
     return (false);
   }

if (isNaN(theForm.nome.value) == false)
  {
    alert("Este campo não aceita números.");
    theForm.nome.focus();
    theForm.nome.select();
    return (false);
  }
  
//****** CAMPO Telefone ******
 if (theForm.telefone.value == false)
   {
     alert("Preencha o campo Telefone.");
     theForm.telefone.focus();
     theForm.telefone.select();
     return (false);
   }
if (theForm.telefone.value != false) {
		// verifica se todos os caracteres digitados são numeros
		var checkOK = "0123456789-";
		var checkStr = theForm.telefone.value;
		var allValid = true;
		var decPoints = 0;
		var allNum = "";
		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);
			for (j = 0;  j < checkOK.length;  j++)
			if (ch == checkOK.charAt(j)) break;
			if (j == checkOK.length)
			{
				allValid = false;
				break;
			}
			allNum += ch;
		}
		if (!allValid)
		{
			alert("O campo Telefone só pode conter números e (-), não utilize letras ou caracteres especiais. Ex.:6565-4545");
			theForm.telefone.focus();
			theForm.telefone.select();
			return (false);
		}

//****** CAMPO EMAIL  ******
	var texto = theForm.email.value
	if (texto == false) {
		alert("Preencha o campo E-mail.");
		theForm.email.focus();
		theForm.email.select();
		return(false);
	} else {
	//VERIFICA SE EXISTE "@" NO E-MAIL
	pos = texto.indexOf("@")
	if (pos == -1) {
		alert("Preencha o caractere @");
		theForm.email.focus();
		theForm.email.select();
		return(false);
		} else {
			//VERIFICA SE EXISTE "."(PONTO) NO E-MAIL
			pos = texto.indexOf(".")
			if (pos == -1) {
				alert("Preencha o caractere ponto (.)");
				theForm.email.focus();
				theForm.email.select();
				return(false);
				}
 
//****** CAMPO ASSUNTO ******
  if (theForm.assunto.value == false)
    {
      alert("Selecione um Assunto.");
      theForm.assunto.focus();
      return (false);
   }   
	  }

       }
    }

  }



<!-- INÍCIO Script que faz a verificação das Exteções e Tamanhos das Fotos para Upload-->
 <!-- Verificação da FOTO 01 -->
function verifica_extencao() 
{
 var extensoesOk = ",.gif,.jpg,.jpge,.bmp,";
 var extensao = "," + document.up.foto1.value.substr( document.up.foto1.value.length - 4 ).toLowerCase() + ",";
 if (document.up.foto1.value == "")
 {
  alert("O campo FOTO 01 está vazio!!");
  return false;
 }
 else if( extensoesOk.indexOf( extensao.toLowerCase() ) == -1 )
 {
  alert( document.up.foto1.value + "\n\n\nA FOTO 01 não possui uma extensão válida, o sistema aceita apenas Fotos com \n extensão .Jpg, Jpge, Gif ou .BMP");javascript:location.reload();
  return false;
 }
 else 
 {javascript:tamanhos();} 
}

function tamanhos() 
{
 tamanhoArqMax = 3000000
 imagem=new Image();
 imagem.src=document.up.foto1.value;
 tamanho_imagem = imagem.fileSize 
 img_tan = tamanho_imagem
 if (tamanho_imagem < 0)
 {
  javascript:tamanhos();
  return false;
 }
 else if (tamanho_imagem > tamanhoArqMax)
 {
  alert("A Foto 01 está muito grande, favor Reduzir seu tamanho ... \n\n Tamanho Máximo suportado: "+tamanhoArqMax+" Bytes ou 3000000MB \n\n São "+(tamanho_imagem-tamanhoArqMax)+" Bytes a Mais!");javascript:location.reload();
  return false;
 }
 else 
 { return true; }
}
										<!-- FIM -->