﻿/*
    var hellotext="Assim vai ficar sua mensagem na barra de status do widows"
    var thetext=""
    var started=false
    var step=0
    var times=1

    function welcometext()
    {
      times--
      if (times==0)
      { 
        if (started==false)
        {
          started = true;
          window.status = hellotext;
          setTimeout("anim()",1); 
        }
        thetext = hellotext;
      }
    }

    function showstatustext(txt)
    {
      thetext = txt;
      setTimeout("welcometext()",4000)
      times++
    }

    function anim()
    {
      step++
      if (step==7) {step=1}
      if (step==1) {window.status='>==='+thetext+'===<'}
      if (step==2) {window.status='=>=='+thetext+'==<='}
      if (step==3) {window.status='>=>='+thetext+'=<=<'}
      if (step==4) {window.status='=>=>'+thetext+'<=<='}
      if (step==5) {window.status='==>='+thetext+'=<=='}
      if (step==6) {window.status='===>'+thetext+'<==='}
      setTimeout("anim()",200);
  }
  */

  //--=========================================
  timeID = 99;
  stcnt = 2;
  msg = ">> Unilar móveis e eletros <<";
  wmsg = new Array(33);
  wmsg[0] = msg;
  blnk = "                                                               ";
  for (i = 1; i < 32; i++) {
      b = blnk.substring(0, i);
      wmsg[i] = "";
      for (j = 0; j < msg.length; j++) wmsg[i] = wmsg[i] + msg.charAt(j) + b;
  }
  function wiper() {
      if (stcnt > -1) str = wmsg[stcnt];
      else str = wmsg[0];
      if (stcnt-- < -40) stcnt = 31;
      status = str;
      clearTimeout(timeID);
      timeID = setTimeout("wiper()", 3000);
  }
  
  
function abre(x,y) {
//var w = 800;
//var h = 650;
var w = 1030;
var h = 768;
var lado = (screen.width - w) / 2;
var topo = (screen.height - h) / 2;
window.open(x, y, 'height=' + h + ',width=' + w + ',top=' + topo + ',left=' + lado + '' + ',scrollbars=YES,Menubar=NO,Toolbar=NO');
}

function calcula_centro_tela(w) {
    var w = 860;
    var lado = (screen.width - w) / 2;
    //alert(lado);
    //alert(screen.width);
    document.getElementById('lateral_Esquerda').style.width = lado-10;
    document.getElementById('lateral_Direita') .style.width = lado+12;
}

