//function escreveBanner() {
 //   var so = new SWFObject("flash/geniabanner.swf", "geniaBanner", "943", "128", "6", "#EEEEEE");
  //  so.write("banner");
//}

function efeitoBotaoSupIn(botao) {
    document.getElementById(botao).className = 'btnSup2';
}

function efeitoBotaoSupOut(botao) {
    document.getElementById(botao).className = 'btnSup1';
}

function efeitoBotaoInfIn(botao) {
    document.getElementById(botao).className = 'btnInf2';
}

function efeitoBotaoInfOut(botao) {
    document.getElementById(botao).className = 'btnInf1';
}

function efeitoBotaoEsqCinzaIn(botao) {
    document.getElementById(botao).className = 'btnEsqCinza2';
}

function efeitoBotaoEsqCinzaOut(botao) {
    document.getElementById(botao).className = 'btnEsqCinza1';
}

function efeitoBotaoEsqVermelhoIn(botao) {
    document.getElementById(botao).className = 'btnEsqVermelho2';
}

function efeitoBotaoEsqVermelhoOut(botao) {
    document.getElementById(botao).className = 'btnEsqVermelho1';
}

function efeitoBotaoRodapeEscuroIn(botao) {
    document.getElementById(botao).className = 'divGrandeRodapeBtnEscuro2';
}

function efeitoBotaoRodapeEscuroOut(botao) {
    document.getElementById(botao).className = 'divGrandeRodapeBtnEscuro1';
}

function efeitoBotaoRodapeClaroIn(botao) {
    document.getElementById(botao).className = 'divGrandeRodapeBtnClaro2';
}

function efeitoBotaoRodapeClaroOut(botao) {
    document.getElementById(botao).className = 'divGrandeRodapeBtnClaro1';
}

//efeitos destaque superior direito
function efeitoBotaoSupIn2(botao) {
    document.getElementById(botao).className = 'btnSup2';
}

function efeitoBotaoSupOut2(botao) {
    document.getElementById(botao).className = 'btnSup1';
}

function efeitoBotaoInfIn2(botao) {
    document.getElementById(botao).className = 'btnInf2';
}

function efeitoBotaoInfOut2(botao) {
    document.getElementById(botao).className = 'btnInf1';
}

function efeitoBotaoEsqCinzaIn2(botao) {
    document.getElementById(botao).className = 'btnEsqCinzadir2';
}

function efeitoBotaoEsqCinzaOut2(botao) {
    document.getElementById(botao).className = 'btnEsqCinzadir1';
}

function efeitoBotaoEsqVermelhoIn2(botao) {
    document.getElementById(botao).className = 'btnEsqVermelhodir2';
}

function efeitoBotaoEsqVermelhoOut2(botao) {
    document.getElementById(botao).className = 'btnEsqVermelhodir1';
}

function efeitoBotaoRodapeEscuroIn2(botao) {
    document.getElementById(botao).className = 'divGrandeRodapeBtnEscurodir2';
}

function efeitoBotaoRodapeEscuroOut2(botao) {
    document.getElementById(botao).className = 'divGrandeRodapeBtnEscurodir1';
}

function efeitoBotaoRodapeClaroIn2(botao) {
    document.getElementById(botao).className = 'divGrandeRodapeBtnClarodir2';
}

function efeitoBotaoRodapeClaroOut2(botao) {
    document.getElementById(botao).className = 'divGrandeRodapeBtnClarodir1';
}

function validaSenha()
{
	var usuario = document.form.usuario.value
	var senha = document.form.senha.value
	flagUsuario = 0;
	flagSenha = 0;	
	
	// VERIFICANDO O USUARIO
	for (i=0; i < usuario.length ;i++)
	{
		if(usuario.charAt(i) == "'")
		{ 
			flagUsuario = 1;
		}
 	}
	
	// VERIFICANDO A SENHA
	for (i=0; i < senha.length ;i++)
	{
		if(senha.charAt(i) == "'")
		{ 
			flagSenha = 1;
		}
 	}

	// RETORNANDO O RESULTADO
	if(flagSenha == 0 && flagUsuario == 0)
	{
		return true
	}
	else
	{
		if(flagSenha == 1 && flagUsuario == 0)
		{
			alert("Existe um caracter invalido na sua senha \n\n Por favor verifique");
			return false
		}
		else
		{
			if(flagSenha == 0 && flagUsuario == 1)
			{
				alert("Existe um caracter invalido no seu nome de usuario \n\n Por favor verifique");
				return false
			}
			else
			{
				alert("Seu nome de usuario e sua senha contem um caracter invalido \n\n Por favor verifique");
				return false
			}
		}	
	}
}

function validarContato()
{
	if(document.contato.nome.value == '')
	{
		alert('Preencha os campos obrigatórios!');
		return false;
	}
	if(document.contato.email.value == '')
	{
		alert('Preencha os campos obrigatórios!');
		return false;
	}
	if(!validaEmail(document.contato.email.value))
	{
		alert("E-mail inválido.");
		return false;
	}
	return true;
}

// VALIDAÇÃO
function validaEmail(email) {
  var objRegExp  = /^[A-Za-z]([\w\.]*)@([A-Za-z0-9\.]*)\.(([A-Za-z]{3}\.[A-Za-z]{2}$)|([A-Za-z]{3}$)|([a-z]{2}$))/i ;
  return objRegExp.test(email);
}

function fone(){
if (document.contato.telefone.value.length == 0){
document.contato.telefone.value = "(" + document.contato.telefone.value; }
if (document.contato.telefone.value.length == 3){
document.contato.telefone.value = document.contato.telefone.value + ") "; }
if (document.contato.telefone.value.length == 9){
document.contato.telefone.value = document.contato.telefone.value + "-";}
}

function mcep(){
if (document.contato.cep.value.length == 5){
document.contato.cep.value = document.contato.cep.value + "-";}
}

    function txtBoxFormat(objForm, strField, sMask, evtKeyPress) {
      var i, nCount, sValue, fldLen, mskLen,bolMask, sCod, nTecla;

      if(document.all) { // Internet Explorer
        nTecla = evtKeyPress.keyCode; }
      else if(document.layers) { // Nestcape
        nTecla = evtKeyPress.which;
      }

      sValue = objForm[strField].value;

      // Limpa todos os caracteres de formatação que
      // já estiverem no campo.
      sValue = sValue.toString().replace( "-", "" );
      sValue = sValue.toString().replace( "-", "" );
      sValue = sValue.toString().replace( ".", "" );
      sValue = sValue.toString().replace( ".", "" );
      sValue = sValue.toString().replace( "/", "" );
      sValue = sValue.toString().replace( "/", "" );
      sValue = sValue.toString().replace( "(", "" );
      sValue = sValue.toString().replace( "(", "" );
      sValue = sValue.toString().replace( ")", "" );
      sValue = sValue.toString().replace( ")", "" );
      sValue = sValue.toString().replace( " ", "" );
      sValue = sValue.toString().replace( " ", "" );
      fldLen = sValue.length;
      mskLen = sMask.length;

      i = 0;
      nCount = 0;
      sCod = "";
      mskLen = fldLen;

      while (i <= mskLen) {
        bolMask = ((sMask.charAt(i) == "-") || (sMask.charAt(i) == ".") || (sMask.charAt(i) == "/"))
        bolMask = bolMask || ((sMask.charAt(i) == "(") || (sMask.charAt(i) == ")") || (sMask.charAt(i) == " "))

        if (bolMask) {
          sCod += sMask.charAt(i);
          mskLen++; }
        else {
          sCod += sValue.charAt(nCount);
          nCount++;
        }

        i++;
      }

      objForm[strField].value = sCod;

      if (nTecla != 8) { // backspace
        if (sMask.charAt(i-1) == "9") { // apenas números...
          return ((nTecla > 47) && (nTecla < 58)); } // números de 0 a 9
        else { // qualquer caracter...
          return true;
        } }
      else {
        return true;
      }
    }
