function BrowserCheck() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.v = parseInt(navigator.appVersion)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0)
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0)
	if (this.ie5) this.v = 5
	this.min = (this.ns||this.ie)
}

// automatically create the "is" object
is = new BrowserCheck()


//funcao imagem esmaecer
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=60
}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}

// funcao rollover menutop

//drop down menu function
function GoUrl(s)
{	var d = s.options[s.selectedIndex].value
	window.top.location.href = d
	s.selectedIndex=0
}


//preload nav rollovers
for(q=0;q<5;q++)
{
eval("n"+q+"On = new Image()")
eval("n"+q+"On.src = '/informe/cabofrio/img/"+q+"_on.gif'")
eval("n"+q+"Off = new Image()")
eval("n"+q+"Off.src = '/informe/cabofrio/img/"+q+".gif'")
}

//rollover function
	function roll(sec,num,state,layer)
{
if (layer=="") eval("document.images['"+ sec + num + "'].src =" + sec + num + state + ".src;");
else 
 {
  if (document.all) eval("document.images['"+ sec + num + "'].src =" + sec + num + state + ".src;");
  if (document.layers)  eval("document.layers."+layer+".document.images['" + sec + num + "'].src = " + sec + num + state + ".src;");
  if (!document.all && document.getElementById) eval("document.getElementById('" + sec + num + "').src = " + sec + num + state + ".src;");
 }
}

//set up layer call
var isIE, isNS, isNS6, isDOM, lR, sR, vis, invis, myTimeOut, goName;
	if (document.all) {isIE= true;lR="document.all.";sR=".style";vis="visible";invis="hidden";}
	if (document.layers){isNS = true;lR="document.layers.";sR="";vis="show";invis="hide";}
	if (document.getElementById &&!isIE) {isDOM=true;lR = "document.getElementById('";sR = "').style";invis ="hidden";vis = "visible"}
	if (isDOM == true && navigator.appName =="Netscape") isNS6 = true;
	
var oldwhich = 1;
var x=1;
var layerTimer;
	
//turn on layer and rollover
	function layOver(which)
	{
	x=0;
	l = eval(lR + "l" + which + sR);
	eval("roll('n',"+which+",'On','lN')")
	if (oldwhich != which)
	{
		ol = eval(lR + "l" + oldwhich + sR);
		eval("roll('n',"+oldwhich+",'Off','lN')")
		ol.visibility = invis;
	}
	l.visibility = vis;
	oldwhich = which;
	clearTimeout(layerTimer);
	return;
	}
	
//turn on layer and rollover if user is completely off nav 
	function stopOver()
	{
		if (x<7) x++;
		else
		{
		ol = eval(lR + "l" + oldwhich + sR);
		ol.visibility = invis;
		eval("roll('n',"+oldwhich+",'Off','lN')")
		x=0;
		}
	layerTimer = setTimeout("stopOver()",150)
	}
	
//reset the timer
	function startOver()
	{
	x=0
	clearTimeout(layerTimer);
	}
	
//change subnav background color (ie5+ ns6+)
	function changebg(item, color)
{
	if (document.getElementById)
	{
	theone = eval("document.getElementById('"+item+"')")
	theone.style.background = color
	}	

}


//netscape resize bug fix
function NSresize() {
  if (document.FIX.NSfix.initWindowWidth != window.innerWidth || document.FIX.NSfix.initWindowHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function NSCheck() {
  if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) == 4)) {
    if (typeof document.FIX == 'undefined'){
      document.FIX = new Object;
    }
    if (typeof document.FIX.FIX_scaleFont == 'undefined') {
      document.FIX.NSfix = new Object;
      document.FIX.NSfix.initWindowWidth = window.innerWidth;
      document.FIX.NSfix.initWindowHeight = window.innerHeight;
    }
    window.onresize = NSresize;
  }
}

NSCheck()

// funcao caixa combo

NS4 = (document.layers);
IE4 = (document.all);
    ver4 = (NS4 || IE4);
	 IE5 = (IE4 && navigator.appVersion.indexOf("5.")!=-1);
   isMac = (navigator.appVersion.indexOf("Mac") != -1);
  isMenu = (NS4 || (IE4 && !isMac) || (IE5 && isMac));
function popUp(){return};
function popDown(){return};
if (!ver4) event=null;
function abrircombo(popup,wi,he,to,le){
  if (is.b!='ie')
  {
   windowPopup = window.open(popup,wi+he+to+le,'width='+wi+',height='+he+',left='+le+',top='+to+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,menubar=no,')
    if (windowPopup != null) {
        windowPopup.location.href = popup;
  }
  }
}

// fim do script

// script anti-frame
if(top.frames.length!=0){ top.location=self.document.location; }

// script dhtml do menu dropdown de serviços
var netscape = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4) ? true : false;
var explorer = (document.all) ? true : false;
function HideLayer(layer) { if (netscape) document[layer].visibility = "hide"; if (explorer) document.all[layer].style.visibility = "hidden"; }
function ShowLayer(layer) { if (netscape) document[layer].visibility = "show"; if (explorer) document.all[layer].style.visibility = "visible";}
