function topo(){
	document.write('<img src="imagens/novo_topo.jpg">');
}

var  marquee_slogan , marquee_parceiros; //globais que guardam os objetos marquee

function marquee(target_id,direction,delay,amount,myVarName){
/* objeto que simula o funcionamento do elemento marquee
** autor: Náiron J.C.G - micoxjcg@yahoo.com.br
** versao: 0.9 - 24/07/2006 
** testado: Firefox 1.5 ; IE 6.0 ; Opera 8.5 */
	var target_id,direction,delay,amount,myVarName;
	var target,targetmid,targetfilho, movendo,timeout;

	//funções públicas para parar e recomeçar
	this.pause = function (){ clearTimeout(timeout); movendo = false; }
	this.restart = function () { movendo=true; this.move(); }

	this.start = function(){ //private chamada inicialmente. lá embaixo está a chamada a este
		/* gera os elementos fantasmas a serem movidos */
		/* bug com text nodes no opera. A primeira letra é repetida */
		if(target.style.position==""){ target.style.position="relative";}
		//definindo elementos extra pra esconder ao andar
		//o span sem nome é por causa de outro bug no opera
		target.innerHTML = "<span id='mid-" + target_id + "-marquee'><span style='display:block;'>" + target.innerHTML + "</span></span>";
		targetmid = document.getElementById("mid-"+target_id + "-marquee");
		targetmid.style.display = "block";	targetmid.style.overflow = "hidden"; 
		targetmid.style.width = "99%"; targetmid.style.height="99%";
		targetmid.style.top = "0px" ; targetmid.style.left = "0px";
		targetmid.style.position = "relative"; targetmid.style.textAlign="left";
		//definindo o novo filho no meio pra aplicar o scroll
		targetmid.innerHTML = "<span id='" +target_id+ "-marquee'>" +targetmid.innerHTML+ "</span>";
		targetfilho = document.getElementById(target_id + "-marquee");	
		targetfilho.style.position = "relative";  targetfilho.style.display="block";
		//targetfilho.style.border="1px solid yellow";
		if(direction=="left"){ targetfilho.style.left="200px";}
		//manda mover
		movendo=true;
		this.move();
	}
	this.move=function(){ //public
		/* executa o movimento do elemento */
		if(direction=="up"||direction=="left"){ var amount_new = amount * (-1); }
		else if(direction=="down"||direction=="right"){ var amount_new = amount  * (1);}
		if(direction=="left"||direction=="right"){
			var left = Number(targetfilho.style.left.replace("px",""));
			if(-left>targetfilho.offsetWidth){ left = targetmid.offsetWidth;}
			else if(left>targetmid.offsetWidth){ left = -targetfilho.offsetWidth; }
			targetfilho.style.left =  (left+amount_new) + "px";		
		}else if(direction=="up"||direction=="down"){
			var top = Number(targetfilho.style.top.replace("px",""));
			if(-top>targetfilho.offsetHeight){ top = targetmid.offsetHeight;}
			else if(top>targetmid.offsetHeight){ top = -targetfilho.offsetHeight; }
			targetfilho.style.top =  (top+amount_new) + "px";
		}
		if(movendo){ timeout = setTimeout(myVarName+".move()",delay) /* chama novamente */;}
	}
	//construtor
	target = document.getElementById(target_id);
	this.start();
	return this;
}
function tableless_onLoad(){ //evento que é chamado no carregamento da página
	if(screen.width>500){ 
		/* ativo o marquee apenas para resoluções de tela  maiores que largura
		   de 500 px para não atrapalhar a visualização em celulares e
		   computadores com tela pequena. */
		marquee_slogan = new marquee("slogan","left",200,4,"marquee_slogan");
		marquee_parceiros = new marquee("parceiros","up",200,4,"marquee_parceiros");
		//abaixo, crio um link no menu para parar o scroll
		var a = document.createElement("a");
		a.innerHTML = '<span class="ak">Parar/Rolar</span>';
		a.setAttribute("href","#"); a.setAttribute("id","para_marquees");
		//habilitando a rolagem ao clicar. o return false cancela o link
		a.onclick = function (){tableless_rolagemOnOff(false); return false;}
		var span = document.createElement("span");
		span.appendChild(a);
	}
}
function tableless_rolagemOnOff(on){ //liga e desliga a rolagem
	var on;	var link_ = document.getElementById("para_marquees");
	if(on){ //ativando rolagem
		marquee_slogan.restart(); marquee_parceiros.restart();
		link_.onclick=function (){tableless_rolagemOnOff(false); return false;}
		link_.innerHTML = "<span class='ak'>Parar/Rolar</span>";
	}else{ //parando a rolagem
		marquee_slogan.pause(); marquee_parceiros.pause();
		link_.onclick = function () {tableless_rolagemOnOff(true); return false;}
		link_.innerHTML = "<span class='ak'>Parar/Rolar</span>";
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}







function abrepopup(janela) {
    var w = 1024;
    var h = 680;
    window.open(janela,'Grade','height='+h+',width='+w+',scrollbars=yes');
}