<!--
//Função Transparencia efeito Imagem
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

/* object - image to be faded (actual object, not name);
 * destop - destination transparency level (ie 80, for mostly solid)
 * rate   - time in milliseconds between trasparency changes (best under 100)
 * delta  - amount of change each time (ie 5, for 5% change in transparency)
 */

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  //do this so I can take a string too
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }

    clearTimeout(nereidFadeTimers[object.sourceIndex]);

    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}
////Pula Automatico Campo
 function pular(){
     if(window.event.srcElement.type == 'text'){
       var ele = window.event.srcElement;
       var index = ele.sourceIndex;
       if(ele.value.length == ele.getAttribute('maxlength')){
         document.all.item(index + 1).focus();
       }
     }
   }

   document.onkeyup = pular;

//MÁSCARA DE VALORES

function txtBoxFormat(objeto, 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;
} else {
    nTecla = evtKeyPress.which;
    if (nTecla == 8) {
        return true;
    }
}

    sValue = objeto.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( ")", "" );
    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) == "/") || (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++;
    }

    objeto.value = sCod;

    if (nTecla != 8) { // backspace
      if (sMask.charAt(i-1) == "9") { // apenas números...
        return ((nTecla > 47) && (nTecla < 58)); }
      else { // qualquer caracter...
        return true;
      }
    }
    else {
      return true;
    }
  }
///CPF
  function submete () {
   if (checaCPF(document.form1.cpf.value)) {
     document.form1.submit();
   }
   else {
	 	 errors="1";
     if (errors) alert('Digite corretamente o CPF');
		 document.MM_returnValue = (errors == '');
   }
 }

 function checaCPF (CPF) {
	if (CPF.length != 11 || CPF == "00000000000" || CPF == "11111111111" ||
		CPF == "22222222222" ||	CPF == "33333333333" || CPF == "44444444444" ||
		CPF == "55555555555" || CPF == "66666666666" || CPF == "77777777777" ||
		CPF == "88888888888" || CPF == "99999999999")
		return false;
	soma = 0;
	for (i=0; i < 9; i ++)
		soma += parseInt(CPF.charAt(i)) * (10 - i);
	resto = 11 - (soma % 11);
	if (resto == 10 || resto == 11)
		resto = 0;
	if (resto != parseInt(CPF.charAt(9)))
		return false;
	soma = 0;
	for (i = 0; i < 10; i ++)
		soma += parseInt(CPF.charAt(i)) * (11 - i);
	resto = 11 - (soma % 11);
	if (resto == 10 || resto == 11)
		resto = 0;
	if (resto != parseInt(CPF.charAt(10)))
		return false;
        alert('Correto');
	return true;
 }

////Mensagem Status

function Msg(msgStr)  { //v3.0
	status=msgStr; document.Msg_returnValue = true;
}





// FUNÇÃO PARA EVITAR ERROS DE SCRIPT;

  function stopError() {
   return true;
}
  window.onerror = stopError;



// FUNÇÃO PARA IMPRIMIR UM DOCUMENTO;

  function Imprimir(Alvo) {
   window.parent.Alvo.focus();
   window.parent.Alvo.print();
}
//FUNÇÃO JANELA NOVA
  function Visualiza(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=auto,width=800,height=600,top=10,left=50,resizable=0');}

  function Mostra(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=no,width=780,height=660,top=5,left=50,resizable=0');}

  function Mostra_mail(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=no,width=780,height=750,top=5,left=50,resizable=0');}


  function Dica(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=no,width=680,height=480,top=10,left=50,resizable=0');}

  function Mapa(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=no,width=640,height=480,top=10,left=50,resizable=0');}

  function Mapa1(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=no,width=1024,height=768,top=10,left=50,resizable=0');}

  function Mostra_Foto(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=no,width=640,height=480,top=10,left=50,resizable=0');}
  
  function detalhe(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=auto,width=640,height=480,top=10,left=50,resizable=0');}
	
//FUNÇÃO SEJA CRIATIVO
function right(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
alert("A WCT - Tecnologia & Consultoria em WEB adverte:\nPara maiores informações ligue:\n55(51)9108-9454 |(48)9993-5217.\nAcesse www.WCT.eti.br!\nObrigado.\nThe WCT - Web Consulting Technology warns:\nFor more information call:\n55(51)9108-9454 |(48)9993-5217\nSign www.WCT.eti.br!\nThanks");
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("A WCT - Tecnologia & Consultoria em WEB adverte:\nPara maiores informações ligue:\n55(51)9108-9454 |(48)9993-5217.\nAcesse www.WCT.eti.br!\nObrigado.\nThe WCT - Web Consulting Technology warns:\nFor more information call:\n55(51)9108-9454 |(48)9993-5217\nSign www.WCT.eti.br!\nThanks");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;



//FUNÇÃO JANELA POP

   function Max() {
   window.open('anuncio.htm','win','width=400,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}


//FUNÇÃO STATUS

  function Eins()

    {window.status = "                 Marina da Conga !!!  ";

    setTimeout("Zwei()",60);

    }

   Eins();




///SCROLL

function scroll()

	{

		document.all.ultimas.scrollTop = document.all.ultimas.scrollTop + 3



		if (document.all.ultimas.scrollTop >= document.all.ultimas.scrollHeight-document.all.ultimas.style.height.replace('px', ''))

		{

			document.all.ultimas.scrollTop = 0

		}

	}



	function iniciaScroll()

	{

		IntervaloUltimas=setInterval('scroll()', 150)

	}

												

	function paraScroll()

	{

		clearInterval(IntervaloUltimas)

	}

												

	var altura = 0

	iniciaScroll()





// FUNÇÃO PARA EXIBIR DATA;

  function Data() {

   Hoje = new Date();

   var DiaMes = Hoje.getDate();
   var Dia = Hoje.getDay() + 1;
   var Mes = Hoje.getMonth() + 1;
   var Ano = Hoje.getYear();

   if (Dia == 1) Dia = "Domingo";
   if (Dia == 2) Dia = "Segunda-feira";
   if (Dia == 3) Dia = "Terça-feira";
   if (Dia == 4) Dia = "Quarta-feira";
   if (Dia == 5) Dia = "Quinta-feira";
   if (Dia == 6) Dia = "Sexta-feira";
   if (Dia == 7) Dia = "Sábado";

   if (Mes == 1) Mes = "Janeiro";
   if (Mes == 2) Mes = "Fevereiro";
   if (Mes == 3) Mes = "Março";
   if (Mes == 4) Mes = "Abril";
   if (Mes == 5) Mes = "Maio";
   if (Mes == 6) Mes = "Junho";
   if (Mes == 7) Mes = "Julho";
   if (Mes == 8) Mes = "Agosto";
   if (Mes == 9) Mes = "Setembro";
   if (Mes == 10) Mes = "Outubro";
   if (Mes == 11) Mes = "Novembro";
   if (Mes == 12) Mes = "Dezembro";

   var DataC = ("Ilha das Flores/RS" + ", " + DiaMes + " de " + Mes + " de " + Ano + "&nbsp;&nbsp;" + "-" + "&nbsp;&nbsp;"+ Dia);
   document.write(DataC);

}
// FUNÇÃO PARA EXIBIR DATA;

  function Data1() {

   Hoje = new Date();

   var DiaMes = Hoje.getDate();
   var Dia = Hoje.getDay() + 1;
   var Mes = Hoje.getMonth() + 1;
   var Ano = Hoje.getYear();

   if (Dia == 1) Dia = "Domingo";
   if (Dia == 2) Dia = "Segunda-feira";
   if (Dia == 3) Dia = "Terça-feira";
   if (Dia == 4) Dia = "Quarta-feira";
   if (Dia == 5) Dia = "Quinta-feira";
   if (Dia == 6) Dia = "Sexta-feira";
   if (Dia == 7) Dia = "Sábado";

   if (Mes == 1) Mes = "Janeiro";
   if (Mes == 2) Mes = "Fevereiro";
   if (Mes == 3) Mes = "Março";
   if (Mes == 4) Mes = "Abril";
   if (Mes == 5) Mes = "Maio";
   if (Mes == 6) Mes = "Junho";
   if (Mes == 7) Mes = "Julho";
   if (Mes == 8) Mes = "Agosto";
   if (Mes == 9) Mes = "Setembro";
   if (Mes == 10) Mes = "Outubro";
   if (Mes == 11) Mes = "Novembro";
   if (Mes == 12) Mes = "Dezembro";

   var DataC = ("Ilha das Flores/RS" + ", " + DiaMes + " de " + Mes + " de " + Ano + "&nbsp;&nbsp;" );
   document.write(DataC);

}


//-->

