<!--
//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;
}

//NAVEGAÇÃO

function rs()
{
if (parent.window.screen) {
var aw = screen.availWidth;
var ah = screen.availHeight;
parent.window.moveTo(0, 0);
parent.window.resizeTo(aw, ah);}
}
function gothere(mname)
{
var thisform = mname
 if (thisform.selectsite.options[thisform.selectsite.options.selectedIndex].value != "nolink") location.href=thisform.selectsite.options[thisform.selectsite.options.selectedIndex].value
}

// FUNÇÃO PARA EVITAR ERROS DE SCRIPT;

  function stopError() {
   return true;
}
  window.onerror = stopError;


// FUNÇÃO PARA CHAMAR UMA NOVA JANELA;

  function openWindow(jan) { 
   window.open(jan,"window",'width=340,height=240,top=50,left=50,scrollbars=no,scrollbars=no,status=no');

}

// FUNÇÃO PARA ADICIONAR AOS FAVORITOS;

  function Favoritos(Url,Tit) {
   window.external.AddFavorite(Url,Tit);
}

//FUNÇÃO IMAGEM
	function Img(img,pos) {
         document.images[pos].src = img + '.jpg';}

// FUNÇÃO PARA ABRIR UMA NOVA JANELA;
function Nova_Janela7() {
   window.open('autori.htm','janela','toolbar=0,location=0,scroll=no,width=350,height=330,top=80,left=100,resizable=0');}

function Nova_Janela6() {
   window.open('autori.htm','janela','toolbar=0,location=0,scroll=no,width=350,height=130,top=80,left=100,resizable=0');}

function Nova_Janela5() {
   window.open('sessao.htm','janela','toolbar=0,location=0,scroll=no,width=550,height=150,top=80,left=100,resizable=0');}

function Nova_Janela4() {
   window.open('anuncio.htm','janela','toolbar=0,location=0,scroll=no,width=550,height=150,top=80,left=100,resizable=0');}

function Nova_Janela3() {
   window.open('mapa.htm','janela','toolbar=0,location=0,scroll=no,width=470,height=400,top=10,left=100,resizable=0');}

function Nova_Janela2() {
   window.open('cont.asp','janela','toolbar=0,location=0,scroll=no,width=550,height=350,top=80,left=100,resizable=0');}

function Nova_Janela1() {
   window.open('aprova.asp','janela','toolbar=0,location=0,scroll=no,width=600,height=350,top=80,left=100,resizable=0');}

function Nova_Janela() {
   window.open('tab_anu.asp','janela','toolbar=0,location=0,scroll=no,width=300,height=280,top=80,left=100,resizable=0');}

// SCRIPT MENU;

  function Over(Obj,Txt,Descr,Img,Link) {
   Obj.style.cursor = 'hand';
   Obj.style.border = '1 solid #000000';
   Obj.style.background = '#F0F0F0';
   Obj.title = Descr;
//   Img.style.display = '';
   Link.style.color = '#00008B';
   window.status = Txt;

}
  function Out(Obj,Img,Link) {
   Obj.style.cursor = 'default';
   Obj.style.border = 'rgb(200,204,51)';
   Obj.style.background = 'rgb(153,204,51)';
//   Img.style.display = 'none';
   Link.style.color = '#000000';
   window.status = '';

}
  function Des(Tp,Url) {
   if (Tp == 'l') {
       if (Url == '') {
           return false;}
       else {
           Url += '.html';
           window.open(Url,'p');}}
   else if (Tp == 'e') {
            if (Url == '') {
                return false;}
            else {
                window.location = Url;}}
   else if (Tp == 'i') {
            Imprimir(Url);}
   else if (Tp == 'f') {
            if (Url == '0') {
                Favoritos('http://','Portal Consultoria');}}
}
// FUNÇÃO DO MENU COMBO;
  function Combo_URL() {
   var URL = document.frmCombo.cmbURL.options[document.frmCombo.cmbURL.selectedIndex].value;
   if (URL == '0') {
       return false;}
   else {
   window.open(URL,'me');
   frmCombo.cmbURL.selectedIndex = 0;}
}
// FUNÇÃO PARA IMPRIMIR UM DOCUMENTO;
  function Imprimir(Alvo) {
   window.parent.Alvo.focus();
   window.parent.Alvo.print();
}
//FUNÇÃo DETALHES
	function new_detalhe(url) {
		 var win = null;
		 win = window.open(url,'_new','width=660,height=520,left=50,top=0,scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no');
}


//FUNÇÃo DETALHES

	function detalhe(url) {
		 var win = null;
		 win = window.open(url,'_new','width=660,height=520,left=50,top=0,scrollbars=no,toolbar=no,location=no,status=no,menubar=no,resizable=no');
}


//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:\n(51)3364-4094 |9108-9454 |(48)9993-5217 |55*135*17353.\nAcesse www.WCT.inf.br!\nObrigado.\nThe WCT - Web Consulting Technology warns:\nFor more information call:\n55(51)3364-4094 |9108-9454 |(48)9993-5217 |55*135*17353\nSign www.WCT.inf.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:\n(51)3364-4094 |9108-9454 |(48)9993-5217 |55*135*17353.\nAcesse www.WCT.inf.br!\nObrigado.\nThe WCT - Web Consulting Technology warns:\nFor more information call:\n55(51)3364-4094 |9108-9454 |(48)9993-5217 |55*135*17353\nSign www.WCT.inf.br!\nThanks");
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;

//FUNÇÃO JANELA NOVA

	function Horizontal(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=no,width=640,height=480,top=150,left=250,resizable=0');}

	function Vertical(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scrollbars=1,width=480,height=640,top=100,left=250,resizable=0');}

      function Cores(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scrollbars=1,width=780,height=680,top=100,left=250,resizable=0');}

          function Slide(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scrollbars=1,width=780,height=680,top=100,left=250,resizable=0');}

	
//FUNÇÃO JANELA POP

   function Max() {
   window.open('anuncio.asp','win','width=500,height=400,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}


//FUNÇÃO STATUS

  function Eins()

    {window.status = "                Imobiliária Farol - Aqui sempre se faz um bom Negócio!!!  ";

    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 = ("Porto Alegre/RS" + ", " + DiaMes + " de " + Mes + " de " + Ano + "&nbsp;&nbsp;" + "-" + "&nbsp;&nbsp;"+ Dia);
   document.write(DataC);

}

// FUNÇÃO PARA EXIBIR DATA1;

  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 = "Dom";
   if (Dia == 2) Dia = "Seg";
   if (Dia == 3) Dia = "Ter";
   if (Dia == 4) Dia = "Qua";
   if (Dia == 5) Dia = "Qui";
   if (Dia == 6) Dia = "Sex";
   if (Dia == 7) Dia = "Sáb";

   if (Mes == 1) Mes = "01";
   if (Mes == 2) Mes = "02";
   if (Mes == 3) Mes = "03";
   if (Mes == 4) Mes = "04";
   if (Mes == 5) Mes = "05";
   if (Mes == 6) Mes = "06";
   if (Mes == 7) Mes = "07";
   if (Mes == 8) Mes = "08";
   if (Mes == 9) Mes = "09";
   if (Mes == 10) Mes = "10";
   if (Mes == 11) Mes = "11";
   if (Mes == 12) Mes = "12";

   var DataC = ( DiaMes + "/ " + Mes + " / " + Ano );
   document.write(DataC);

}


//-->
