IE = false;
if(navigator.appName.indexOf('Microsoft') >-1)IE=true

topDescription=new Array();
topDescription.push('Produtos para proteção e acabamentos de madeiras');
topDescription.push('Produtos para engenheiros, arquitetos, pintores, marceneiros, etc.');
topDescription.push('Produtos para lojistas - Linhas Decorativa/Imobiliária e Moveleira');
topDescription.push('Produtos para Industrias da Construção, Madeireiras e Moveleiras');
topDescription.push('Tudo o que você quer saber sobre quem somos, de onde viemos e para onde vamos');
topDescription.push('Fique por dentro do que vem acontecendo e do que você não pode perder');
topDescription.push('Tire aqui suas dúvidas');
topDescription.push('O seu canal de contato conosco');
function showTopDescription(id) {
  try {
    var el=document.getElementById('top_description');
    if(topDescription[id] !== undefined) {
      el.innerHTML=topDescription[id];
    }
  } catch(e1){}
  
}
function hideTopDescription() {
   try {
    var el=document.getElementById('top_description');
    el.innerHTML='';
  } catch(e1){}
  
}
var printHandler = {
  
  openPrintWindow:function(url) {
    window.open(url, 'PrintWindow','width=560 , height=600, scrollbars=1');
  }
}
var ambienteHandler = {
  ambienteLinkDivs:['ambiente-link1','ambiente-link2','ambiente-link3','ambiente-link4','ambiente-link5','ambiente'],
  getAmbiente:function(id) {
    
    ajaxObj=new Ajax('/ambientes/list/'+id) ;
    ajaxObj.setCallBack('ambiente'); // use a string representation of the function name, not the function reference
    ajaxObj.send()
  },
  ambiente:function(id) {
    this.getAmbiente(id);
    try {
      if (navigator.appName.indexOf("Microsoft") != -1) {
        window['simulator_flash'].getAmbiente(id);
      } else {
        
        document['simulator_flash'].getAmbiente(id);
      }
    } catch(e1) {
      
    }
    
    
    
  },
  internalGetList:function() {
    try {
      if (navigator.appName.indexOf("Microsoft") != -1) {
        window['simulator_flash'].emptyClick();
      } else {
        
        document['simulator_flash'].emptyClick();
      }
    } catch(e1) {
      
    }
    this.getList();
  },
  
  
  getList:function() {
    var el = null;
    var el2 = null;
    try {
      el = document.getElementById('ambiente');
      el2 = document.getElementById('ambiente_pool'); 
      el.innerHTML = el2.innerHTML;
    } catch(e1) {
      
    }
    
  },
  paintLink:function(id) {
    this.clearLink();
    try {
      var el = getElByName('a','ambientes_links'+id);
      for(var i=0; i < el.length; i++) {
        
        el[i].className = 'ambiente_select';
      }
     
    } catch(e1) {
      
    }
    
  },
  clearLink:function() {
    var divname;
    for(var i = 0; i < this.ambienteLinkDivs.length; i++) {
      divname = this.ambienteLinkDivs[i];
      try {
        var elems = getElByName('div',divname);
        for(var j=0; j < elems.length; j++) {
          
          this.clearChild(elems[j]);
        }
        
        
        
        
        
      } catch(e1) {
        
      }
      
      
      
    }
    
    
    
  },
  clearChild:function(el) {
    try {
      //var el = document.getElementById(divname);
      var c = null;
      for(var i=0; i < el.childNodes.length; i++) {
        c = el.childNodes[i];
        
        if((c.nodeType == 1) &&(c.tagName == 'A')) {
          c.className = 'ambiente';
        }
        
        
      }
      
      
    } catch(e1) {
      
    }
  },
  linkOver:function(id) {
    try {
      if (navigator.appName.indexOf("Microsoft") != -1) {
        window['simulator_flash'].mouseOverLink(id);
      } else {
        
        document['simulator_flash'].mouseOverLink(id);
      }
    } catch(e1) {
      
    }
  },
  linkOut:function() {
    try {
      if (navigator.appName.indexOf("Microsoft") != -1) {
        window['simulator_flash'].mouseOutLink();
      } else {
        
        document['simulator_flash'].mouseOutLink();
      }
    } catch(e1) {
      
    }
  }
  
  
  
  
}
function ambiente(ret) {
  try {
    var el = document.getElementById('ambiente');
    el.innerHTML = ret;
    
  } catch(e1) {
    
  }
  
  
  
  
  
}
function getElByName(tag,name) {
  if(IE) {

    var a = document.getElementsByTagName(tag)
    var b = new Array()
    for(var i = 0; i < a.length; i++) {
      if(a[i].name == name) b.push(a[i])
    }
    return b
  } else {
    return document.getElementsByName(name)
  }

}


