Difference: ScriptMenu ( vs. 1)

Revision 111 Jul 2011 - Main.AgnaldoCostaSantos

Line: 1 to 1
Added:
>
>
%STARTINCLUDE%

//---- Rotinas do menu -------
var t_objeto, t_imagem, t_trocar;
t_objAnt = false;
//Esconde e mostra os blocos de itens do menu
function troca(objeto,imagem) {

   if (t_objAnt) {
      if (t_objeto!=objeto) {   t_objAnt = false; troca(t_objeto, t_imagem); }
   }
  if (document.getElementById) {
    if (document.getElementById(objeto).style.display != 'none'){
      document.getElementById(imagem).src = "img/SetaBaixo.gif";
     document.getElementById(objeto).style.display = 'none';
    }else{
     document.getElementById(imagem).src = "img/SetaCima.gif";
     document.getElementById(objeto).style.display = 'block';
    }
  }
  else if (document.layers && document.layers[objeto] != null) {
    if (document.layers[objeto].visibility == 'visible' ||
        document.layers[objeto].visibility == 'show' )
        document.layers[objeto].visibility = 'hidden';
    else
      document.layers[objeto].visibility = 'visible';
  }

  else if (document.all) {
    if (document.all[objeto].style.visibility == 'visible')
      document.all[objeto].style.visibility = 'hidden';
    else
      document.all[objeto].style.visibility = 'visible';
  }
   if (t_objeto==objeto) {
      t_objAnt = false;
      t_objeto = null;
   } else {
        t_objeto = objeto;
        t_imagem = imagem;
        t_objAnt = true;
     }
  return false;
}

//---- Rotinas da toolbar -------

function reSize() {
 barW = 0; 
 barH = 0;
 if (navDOM) {
  if (document.height > innerHeight) barW = 15;
  if (document.width > innerWidth) barH = 15;
  } else {
  innerWidth = document.body.clientWidth;
  innerHeight = document.body.clientHeight;
  }
 posX = ((innerWidth - markW)-barW) * (markX/100);
 posY = ((innerHeight - markH)-barH) * (markY/106);
 }

function reposiciona() {
 wMark.left = posX + (navDOM?pageXOffset:document.body.scrollLeft);
 wMark.top = posY + (navDOM?pageYOffset:document.body.scrollTop);
 }

function inicializa() {
   markW = 55;      
   markH = 20;      
   markX = 95;     
   markY = 102;    
   intervalo = 600; 

   // set common object reference
   if (!document.all) document.all = document;
   if (!document.all.toolBar.style) document.all.toolBar.style = document.all.toolBar;

   wMark = document.all.toolBar.style;
   wMark.width = markW;
   wMark.height = markH;
   navDOM = window.innerHeight; 
   reSize();
   window.onresize=reSize;
   markID = setInterval ("reposiciona()",intervalo);
 }

function comboChange(comoBox,usado){ 
  window.open( comoBox.options[comoBox.selectedIndex].value);
  if (usado) comoBox.selectedIndex=0;
}

%STOPINCLUDE%
 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback