 // <![CDATA[

  var ua= navigator.userAgent;
  var OPERA= (ua.indexOf("Opera") > 0);
  var OMNI= (ua.indexOf("Omni") > 0);
  var MAC= (navigator.platform.indexOf("PPC") > 0);
  var WIN= (navigator.platform=="Win32");

  var IE6, IE5_6, IE5_5, IE5, N4, N5, NS6, NS6_1, MOZ, MAC_IE5;

  if(!OPERA && !OMNI){

     IE6= (ua.indexOf("MSIE 6") > 0);
  
     // IE 5.5 and IE 5.6 are similar. IE 5.6 is released on WindowsXP
     IE5_6= (ua.indexOf("MSIE 5.6") > 0);
     IE5_5= (ua.indexOf("MSIE 5.5") > 0 || IE5_6);
   
     // IE5 is true for IE5.5, IE5.6, and IE6.
     IE5= (ua.indexOf("MSIE 5") > 0  || IE6);
 
     N4= (document.layers);
     NS6= N5= (ua.indexOf("Gecko") > 0);
     NS6_1= (N5 && ua.indexOf("6.1") != -1);
     MOZ= N5 && !(ua.indexOf("Netscape") > 0);
     MAC_IE5= (MAC && IE5);
} 
 // ]]>

var nn4= (document.layers);
var nn6= (document.getElementById && !document.all);
var ie4= (document.all && !document.getElementById);
var ie5= (document.all && document.getElementById);

var CorBGBaixo='white';
var CorTextoBaixo='#333399';
var CorBGCima='#F5F4DF'
var CorTextoCima='#ECB404';

var TimerID=null;
var Timer=false;



function hide_all(excepcao) {
	if (document.all) {
	 if (excepcao!='menu41')
		document.all['menu41'].style.visibility='hidden';
	 if (excepcao!='menu33')
		document.all['menu33'].style.visibility='hidden';
	 if (excepcao!='menu331')
		document.all['menu331'].style.visibility='hidden';
	 if (excepcao!='menu111')
		document.all['menu111'].style.visibility='hidden';	
	 if (excepcao!='menu112')
		document.all['menu112'].style.visibility='hidden';			
	 if (excepcao!='menu11')
		document.all['menu11'].style.visibility='hidden';
	 if (excepcao!='menu51')
		document.all['menu52'].style.visibility='hidden';
	}
	else if (nn4){   
	 if (excepcao!='menu41')
		document.layers['menu41'].visibility='hide';
	 if (excepcao!='menu33')
		document.layers['menu33'].visibility='hide';
	 if (excepcao!='menu331')
		document.layers['menu331'].visibility='hide';
	 if (excepcao!='menu111')
		document.layers['menu111'].visibility='hide';	
	 if (excepcao!='menu112')
		document.layers['menu112'].visibility='hide';				
	 if (excepcao!='menu11')
		document.layers['menu11'].visibility='hide';		
	 if (excepcao!='menu52')
		document.layers['menu52'].visibility='hide';
	}
	else if (nn6){   
	 if (excepcao!='menu41')
			document.getElementById('menu41').style.visibility='hidden';
	 if (excepcao!='menu33')
			document.getElementById('menu33').style.visibility='hidden';
	 if (excepcao!='menu331')
			document.getElementById('menu331').style.visibility='hidden';
	 if (excepcao!='menu111')
	 	document.getElementById('menu111').style.visibility='hidden';
	 if (excepcao!='menu112')
		document.getElementById('menu112').style.visibility='hidden';
	 if (excepcao!='menu11')
			document.getElementById('menu11').style.visibility='hidden';
	 if (excepcao!='menu52')
			document.getElementById('menu52').style.visibility='hidden';
	}
}
 
function show (id) {
	hide_all('');
	if (document.all)
	  document.all[id].style.visibility='visible';
	else if (document.layers)
	  document.layers[id].visibility='show';
	else  if(nn6) 
	   document.getElementById(id).style.visibility='visible';
}

function show2 (id) {
	if (document.all)
	  document.all[id].style.visibility='visible';
	else if (document.layers)
	  document.layers[id].visibility='show';
	else  if(nn6) 
	   document.getElementById(id).style.visibility='visible';
}

function MudaCores(RowID,aID,Cima) {
 if(Cima) {
  CorBG=CorBGCima;
  CorTexto=CorTextoCima;
  TextoBaixo=document.getElementById(aID).href;
  if (Timer)
   clearTimeout(TimerID);
  Timer=false;
 }
 else {
  CorBG=CorBGBaixo;
  CorTexto=CorTextoBaixo;
  TextoBaixo="";
  TimerID=setTimeout('hide_all()',1);
  Timer=true;
 }
 /*
 if(nn4) {
   document.layers[RowID].bgColor=CorBG;
   document.layers[aID].color=CorTexto;
   window.status=TextoBaixo;
   document.layers[RowID].cursor='hand';
 } else if(ie4 || ie5) {
   document.all[RowID].style.background=CorBG;
   document.all[aID].style.color=CorTexto;
   window.status=TextoBaixo;
   document.all[RowID].style.cursor='hand';
 } else  if(nn6){*/
   document.getElementById(RowID).bgColor=CorBG;
   document.getElementById(aID).style.color=CorTexto;
   window.status=TextoBaixo;
   document.getElementById(RowID).style.cursor='pointer';
 //}
 //*/ 
}

function MudaCoresFooter(aID,Cima) {
 if(Cima) {
  CorTexto='#9E9EDE';
  if (document.all)
    TextoBaixo=document.all[aID].href;
 }
 else { CorTexto='#333399'; }

 if(nn4) {
   document.layers[aID].color=CorTexto;
   document.layers[aID].cursor='hand';
 } else if(ie4 || ie5) {
   document.all[aID].style.color=CorTexto;
   document.getElementById(aID).style.cursor='hand';
 } else  if(nn6){
   document.getElementById(aID).style.color=CorTexto;
   document.getElementById(aID).style.cursor='pointer';
 }
}
  
function MudaLink(aID) {
 if(nn4) {
   location.href=document.layers[aID].href;
 } else if(ie4 || ie5) {
   document.location=document.all[aID].href;
 } else  if(nn6){
   location.href=document.getElementById(aID).href;
 }
}


function turnOn(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "on.src");
  }
}  
   
function turnOff(imageName) {
  if (document.images) {
    document[imageName].src = eval(imageName + "off.src");
  }
}  

                        function RetornaAnoActual()
                        {
                        if ((aux=now.getYear())<2000){
                           aux=aux+1900;}
                        return aux;
                        }
                         
                        function RetornaData()
                        {
                        now=new Date();
                        data=new Array();
                        data[0]="Domingo";
                        data[1]="Segunda";
                        data[2]="Terça";  
                        data[3]="Quarta"; 
                        data[4]="Quinta"; 
                        data[5]="Sexta";  
                        data[6]="Sábado"; 

                        mes=new Array();
                        mes[0]="Janeiro";
                        mes[1]="Fevereiro";
                        mes[2]="Março";  
                        mes[3]="Abril";   
                        mes[4]="Maio";
                        mes[5]="Junho";   
                        mes[6]="Julho";   
                        mes[7]="Agosto";  
                        mes[8]="Setembro";
                        mes[9]="Outubro"; 
                        mes[10]="Novembro";
                        mes[11]="Dezembro";
                        
                        document.write(data[now.getDay()] + ", " + now.getDate() + " de "+ mes[now.getMonth()] + " de " + RetornaAnoActual());
                        }

						function RetornaData1()
                        {
                        now=new Date();
                        data=new Array();
                        data[0]="Domingo";
                        data[1]="Segunda";
                        data[2]="Terça";  
                        data[3]="Quarta"; 
                        data[4]="Quinta"; 
                        data[5]="Sexta";  
                        data[6]="Sábado"; 

                        mes=new Array();
                        mes[0]="Janeiro";
                        mes[1]="Fevereiro";
                        mes[2]="Março";  
                        mes[3]="Abril";   
                        mes[4]="Maio";
                        mes[5]="Junho";   
                        mes[6]="Julho";   
                        mes[7]="Agosto";  
                        mes[8]="Setembro";
                        mes[9]="Outubro"; 
                        mes[10]="Novembro";
                        mes[11]="Dezembro";
                        
                        document.write(mes[now.getMonth()] + " de " + RetornaAnoActual());
                        }
function s_size()
{

	var x = screen.width;
	if (screen.width <= 800)
	{
		x=100;
		document.write(x);
	}
	else 
	{
		x=200;
		document.write(x);
//		return screen.width;
	}

		
}



function MostraTudoBanner(LinkAux) {   
window.open(LinkAux,"","width=600,height=400,scrollbars=yes,left=215,top=310,toolbar=no");  
}

function MostraTudoNewsletter() {
window.open("RegistoNewsletterPasso1.php","","width=600,height=400,scrollbars=yes,left=215,top=310,toolbar=no");
} 

function MostraTudoProdutos(ID) {
window.open("MostraTudoProdutos.php?ID="+ID,"","width=600,height=400,scrollbars=yes,left=215,top=310,toolbar=no, resizable=yes");
}

function MostraTudoGuiaoObras(ID) {
window.open("MostraTudoGuiaoObras.php?ID="+ID,"","width=600,height=400,scrollbars=yes,left=215,top=310,toolbar=no");
}



//-----------------------------------------------------

/*
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
return false;
}
return true;
}

document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
*/