/**



 * Escreve o codigo de um objeto Flash na pagina atual.



 * @param nome Nome do arquivo .swf desejado.



 */



function openFlash(nome,width,height,wmode,variavel) {



	document.write(



		"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='"+width+"' height='"+height+"' id='"+nome+"' align='middle'>"+



			"<param name='allowScriptAccess' value='sameDomain' />"+



			"<param name='movie' value='swf/"+nome+".swf?linkbanner="+variavel+"' />"+



			"<param name='menu' value='false' />"+

			

			"<param name='quality' value='high' />"+



			"<param name='scale' value='noscale' />"+



			"<param name='wmode' value='"+wmode+"' />"+



			"<param name='bgcolor' value='#ffffff' />"+



			"<embed src='swf/"+nome+".swf?linkbanner="+variavel+"' menu='false' quality='high' scale='noscale' wmode='"+wmode+"' bgcolor='#ffffff' width='"+width+"' height='"+height+"' name='"+nome+"' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+



		"</object>"



	);



}



function esconde(numero){



for(i=1;i<=500;i++){

if(document.getElementById('sessao_'+i)){



if(i!=numero){document.getElementById('sessao_'+i).innerHTML=''}}



}

}

function esconde_sub(numero){



for(s=1;s<=500;s++){

if(document.getElementById('sub_'+s)){



if(s!=numero){document.getElementById('sub_'+s).innerHTML=''}}



}

}


var biblioteca = new Array(0);
var biblioteca_sub = new Array(0);



function goTo(targeturl, targetframe) {
        if (!targetframe) {
            targetframe = self;
        }

        if (targetframe) {
            targetframe.location.replace(targeturl);
        }

        return true;
    }       

function bannerUpdate() {

 if (document.getElementById) {
    var z = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
 	}
	if (z) {
    z.onreadystatechange = function() {
    if (z.readyState == 4 && z.status == 200) {
    el = document.getElementById('bannerGrande');
	textoz=z.responseText
	//texto=texto.replace(//g," ")
	texto=unescape(textoz)
	el.style.visibility="visible"
    el.innerHTML = texto ;
	
	
	}
    }
	  z.open("GET", "flash.php", true);
	  z.send(null);
  }
}