<!-- 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;
}


<!-- Verificação dos campos dos formulários CONTATO -->
function valida_contato(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("Favor preencha uma Mensagem.");
      theForm.assunto.focus();
      return (false);
   }   
	  }

       }
    }

  }



<!-- Verificação dos campos dos formulários ORÇAMENTO -->
function valida_orcamento(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 DDD ******
 if (theForm.ddd.value == false)
   {
     alert("Preencha o campo DDD.");
     theForm.ddd.focus();
     theForm.ddd.select();
     return (false);
   }
if (theForm.ddd.value != false) {
		// verifica se todos os caracteres digitados são numeros
		var checkOK = "0123456789";
		var checkStr = theForm.ddd.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 DDD só pode conter números, não utilize letras ou caracteres especiais. Ex.:011");
			theForm.ddd.focus();
			theForm.ddd.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 FABRICANTE  ******
  if (theForm.fabricante.value == false)
   {
     alert("Preencha o campo Fabricante.");
     theForm.fabricante.focus();
     theForm.fabricante.select();
     return (false);
   }

if (isNaN(theForm.fabricante.value) == false)
  {
    alert("Este campo não aceita números.");
    theForm.fabricante.focus();
    theForm.fabricante.select();
    return (false);
  }

//****** CAMPO MODELO  ******
  if (theForm.modelo.value == false)
   {
     alert("Preencha o campo Modelo.");
     theForm.modelo.focus();
     theForm.modelo.select();
     return (false);
   }

if (isNaN(theForm.modelo.value) == false)
  {
    alert("Este campo não aceita números.");
    theForm.modelo.focus();
    theForm.modelo.select();
    return (false);
  }


//****** CAMPO ANO ******
 if (theForm.ano.value == false)
   {
     alert("Preencha o campo Ano.");
     theForm.ano.focus();
     theForm.ano.select();
     return (false);
   }
if (theForm.ano.value != false) {
		// verifica se todos os caracteres digitados são numeros
		var checkOK = "0123456789";
		var checkStr = theForm.ano.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 Ano só pode conter números, não utilize letras ou caracteres especiais. Ex.:1958");
			theForm.ano.focus();
			theForm.ano.select();
			return (false);
		}  
  

//****** CAMPO ASSUNTO ******
  if (theForm.assunto.value == false)
    {
      alert("Favor preencha uma Mensagem.");
      theForm.assunto.focus();
      return (false);
   }   
	  }

       }
    }

  }
}
}
 
