<!--
////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;

///Conta Campos
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
countfield.value = maxlimit - field.value.length;
}
///Evita seeção de Texto
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function ("return false")
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

//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;
    }
  }
  
//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);
    }
}



//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 JANELA POP dinamica  exemplo função imagem

   function Max(lin) {
   window.open('anuncio.htm','win','width=500,height=520,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}

//FUNÇÃO JANELA POP

   function Max() {
   window.open('anuncio.htm','win','width=500,height=520,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
}
//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=400,height=300,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://','WB Arquitetura');}}
}

// 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 detalhe(url) {
		 var win = null;
		 win = window.open(url,'_new','width=600,height=420,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=auto,width=640,height=480,top=150,left=160,resizable=0');}
  function Vertical(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=auto,width=480,height=640,top=150,left=160,resizable=0');}

 function Wallpapers(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=auto,width=1024,height=768,top=10,left=230,resizable=0');}

function Slide(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=auto,width=680,height=600,top=10,left=230,resizable=0');}

         function Cores(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=auto,width=680,height=480,top=10,left=50,resizable=0');}

        function Ampliar(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=no,width=640,height=480,top=10,left=50,resizable=0');}

         function Mapa(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=no,width=1024,height=768,top=10,left=50,resizable=0');}

     function Dica(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=auto,width=550,height=320,top=10,left=50,resizable=0');}

   function Janela(URL) {
  	window.open(URL,'janela','toolbar=0,location=0,scroll=auto,width=650,height=420,top=10,left=50,resizable=0');}

//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 VALIDANDO O FORMULÁRIO;

function Validator(txt)

{



  if (txt.Nome.value == "")

  {

    alert("Digite um valor para o campo \"Nome\".");

    txt.Nome.focus();

    return (false);

  }



  if (txt.Nome.value.length < 1)

  {

    alert("Digite pelo menos 1 caracteres no campo \"Nome\".");

    Form.Nome.focus();

    return (false);

  }



  if (Form.Nome.value.length > 50)

  {

    alert("Digite no máximo 50 caracteres no campo \"Nome\".");

    Form.Nome.focus();

    return (false);

  }



  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ. \t\r\n\f";

  var checkStr = txt_Nome.value;

  var allValid = true;

  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;

    }

  }

  if (!allValid)

  {

    alert("Digite somente letra, espaço em branco e \".\" caracteres no campo \"Nome\".");

    theForm.Nome.focus();

    return (false);

  }



  if (theForm.Cidade.value == "")

  {

    alert("Digite um valor para o campo \"Cidade\".");

    theForm.Cidade.focus();

    return (false);

  }



  if (theForm.Cidade.value.length < 1)

  {

    alert("Digite pelo menos 1 caracteres no campo \"Cidade\".");

    theForm.Cidade.focus();

    return (false);

  }



  if (theForm.Cidade.value.length > 20)

  {

    alert("Digite no máximo 20 caracteres no campo \"Cidade\".");

    theForm.Cidade.focus();

    return (false);

  }



  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@., \t\r\n\f";

  var checkStr = theForm.Email.value;

  var allValid = true;

  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;

    }

  }

  if (!allValid)

  {

    alert("Digite somente letra, dígito, espaço em branco e \"@.,\" caracteres no campo \"Email\".");

    theForm.Email.focus();

    return (false);

  }



  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-/ \t\r\n\f";

  var checkStr = theForm.DataEntrada.value;

  var allValid = true;

  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;

    }

  }

  if (!allValid)

  {

    alert("Digite somente letra, dígito, espaço em branco e \"/\" caracteres no campo \"DataEntrada\".");

    theForm.DataEntrada.focus();

    return (false);

  }



  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-/ \t\r\n\f";

  var checkStr = theForm.DataSaida.value;

  var allValid = true;

  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;

    }

  }

  if (!allValid)

  {

    alert("Digite somente letra, dígito, espaço em branco e \"/\" caracteres no campo \"DataSaida\".");

    txt.DataSaida.focus();

    return (false);

  }

  return (true);

}



//FUNÇÃO STATUS

  function Eins()

    {window.status = "                Pousada Vento & Cia onde realmente o mar esta a seus pés - Farol de Santa Marta - SC!  ";

    setTimeout("Zwei()",60);

    }

   Eins();




///SCROLL

function scroll()

	{

		document.all.ultimas.scrollLeft = document.all.ultimas.scrollLeft + 3



		if (document.all.ultimas.scrollLeft >= document.all.ultimas.scrollHeight-document.all.ultimas.style.height.replace('px', ''))

		{

			document.all.ultimas.scrollLeft = 0

		}

	}



	function iniciaScroll()

	{

		IntervaloUltimas=setInterval('scroll()', 250)

	}

												

	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" + ", " + DiaMes + " de " + Mes + " de " + Ano + "&nbsp;&nbsp;" + "-" + "&nbsp;&nbsp;"+ Dia);
   document.write(DataC);

}

//-->

//-->

