
<!--

function clientSideInclude(id, url) {
  var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
 if (!element) {
  alert("Bad id " + id + 
   "passed to clientSideInclude." +
   "You need a div or span element " +
   "with this id in your page.");
  return;
 }
  if (req) {
    // Synchronous request, wait till we have it all
    req.open('GET', url, false);
    req.send(null);
    element.innerHTML = req.responseText;
  } else {
    element.innerHTML =
   "Sorry, your browser does not support " +
      "XMLHTTPRequest objects. This page requires " +
      "Internet Explorer 5 or better for Windows, " +
      "or Firefox for any system, or Safari. Other " +
      "compatible browsers may also exist.";
  }
}


/////////////////////////////////////////////////////////////////
function LoadFlash(caminho,largura,altura)
{
    document.write('<object style="float:left;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+largura+'" height="'+altura+'">');
    document.write('<param name="movie" value="'+caminho+'">');
    document.write('<param name="quality" value="high">'); 
    document.write('<param name="wmode" value="transparent">');
    document.write('<param name="menu" value="false">');
    document.write('<embed src="'+caminho+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'"></embed>');
    document.write('</object>');
}	


/////////////////////////////////////////////////////////


		var timer;

		function clickButtonBarra(id){
			if (timer != undefined) return;

			var tamanhoC = document.getElementById("container").offsetHeight;

			elem = document.getElementsByTagName("A");
			for(i=0;i<elem.length;i++){
				if (elem[i].className == "botaoBarraAtiva")
					elem[i].className = "botaoBarra";
				if (elem[i].className == "botaoBarra")
					tamanhoC -= elem[i].offsetHeight;
			}

			var inc = Math.round(tamanhoC / 10);

			itemClicado = document.getElementById(id);
			itemClicado.className = "botaoBarraAtiva";

			barra = "";
			elem = document.getElementsByTagName("DIV");
			for(i=0;i<elem.length;i++){
				if ((elem[i].id.substring(0,8) == "Conteudo") && (elem[i].style.display == "block"))
					barra = elem[i].id;
			}

			if(barra!="" && barra == ("Conteudo" + id)) return;

			timer = setTimeout("timerResizeBarra('"+"Conteudo" + id +"','"+barra+"',0,"+tamanhoC+","+tamanhoC+",10,"+inc+")",10);
		}

		function timerResizeBarra(barraAtiva, barraInativa, alturaAtiva,
				 alturaInativa, tamanhoC, tempo, inc){
			b1 = document.getElementById(barraAtiva);

			if ((alturaAtiva + inc) <= tamanhoC){
				b1.style.height = alturaAtiva + inc;

				if (barraInativa != ""){
					b2 = document.getElementById(barraInativa);
					b2.style.height = alturaInativa - inc;
				}

				if (tamanhoC == alturaInativa){
					if (b1.style.display != "block")
						b1.style.display = "block";
					if ((barraInativa != "") && (b2.style.overflow != "hidden"))
						b2.style.overflow = "hidden";
				}

				timer = setTimeout("timerResizeBarra('"+barraAtiva+"','"+barraInativa+"',"+(alturaAtiva + inc)+","+(alturaInativa - inc)+","+tamanhoC+","+tempo+","+inc+")",tempo);
			}else{
				b1.style.height = tamanhoC;
				if (barraInativa != ""){
					b2 = document.getElementById(barraInativa);
					b2.style.height = 0;
					b2.style.display = "none";
				}

				b1.style.overflow = "auto";

				clearTimeout(timer);
				timer = undefined;
			}
		}

		window.onload = function(){

			elem = document.getElementsByTagName("A");
			for(i=0;i<elem.length;i++){
				if (elem[i].className == "botaoBarra"){
					clickButtonBarra(elem[i].id);
					return;
				}
			}

			// Preloading de imagens
			preloader();

		}

		window.onresize = function(){

			if (navigator.appName.indexOf("Microsoft") != -1){
				tamanhoC = document.body.offsetHeight-4;
			}else{
				tamanhoC = window.innerHeight;
			}

			elem = document.getElementsByTagName("A");
			for(i=0;i<elem.length;i++){
				if ((elem[i].className == "botaoBarra") || (elem[i].className == "botaoBarraAtiva"))
					tamanhoC -= elem[i].offsetHeight;
			}

			elem = document.getElementsByTagName("DIV");
			for(i=0;i<elem.length;i++){
				if ((elem[i].id.substring(0,8) == "Conteudo") && (elem[i].style.display == "block")){
					elem[i].style.height = tamanhoC;
					return;
				}
			}
		}

		function preloader(){
			img1 = new Image();
			img1.src = "bnt_01.jpg";
			img2 = new Image();
			img2.src = "bnt_02.jpg";
			img3 = new Image();
			img3.src = "bnt_03.jpg";
			img4 = new Image();
			img4.src = "bnt_04.jpg";
			img5 = new Image();
			img5.src = "fundo.jpg";

} 

///////////////////////////////TROCA DE IMAGENS////////////////////////////////////////////

var fadeimages=new Array()
fadeimages[0]=["http://heroi.ig.com.br//images/stories/imgs/fullmetal_hqheroi_capaprinc.jpg", "http://heroi.ig.com.br/index.php?option=com_content&amp;task=view&amp;id=2198&amp;Itemid=20&amp;catid=75",""]
fadeimages[1]=["http://heroi.ig.com.br//images/stories/imgs/comunidades-capa.jpg", "http://heroi.ig.com.br/index.php?option=com_content&amp;task=view&amp;id=2181&amp;Itemid=20&amp;catid=75",""]
fadeimages[2]=["http://heroi.ig.com.br//images/stories/imgs/star-wars-force-unleashed_capa.jpg", "http://heroi.ig.com.br/index.php?option=com_content&amp;task=view&amp;id=2175&amp;Itemid=20&amp;catid=75",""]
fadeimages[3]=["http://heroi.ig.com.br//images/stories/imgs/halo3-capa.jpg", "http://heroi.ig.com.br/index.php?option=com_content&amp;task=view&amp;id=2168&amp;Itemid=20&amp;catid=75",""]

var fadebgcolor="white"

var fadearray=new Array()
var fadeclear=new Array()

var dom=(document.getElementById)
var iebrowser=document.all

function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=20
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();})
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array()
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}

var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2

if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')

if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}

fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}


fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1)
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}

fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj.degree/100
}


fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}


////////////////////////////////////LINK IMG//////////////////////////////////


function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=20
}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}

<!--
var windowHandle;
function abre_info() {

windowHandle = window.open('utilitario_informativo.php?info_email='+document.informativo.info_email.value+'&info='+document.informativo.info.value,'newsletter','width=350,height=350');
    if (!windowHandle.opener)
        windowHandle.opener = self;
    return false;
}

function abre_janela(nome_janela,alvo_janela){
window.open(nome_janela,alvo_janela,'width=500,height=500');
}


//-->
