document.write('<div class="btn_imprimir"><a href="javascript:printTabs()">&laquo; Imprimir &raquo;</a></div>');
document.write('<div class="btn_imprimir_agricola"><a href="javascript:self.print()">&laquo; Imprimir &raquo;</a></div>');

//previne que o rodapé fique grudado no topo em algumas páginas que não tem lateral
siteFooter = '<br clear="all" style="line-height:0px;">'

siteFooter += '<div id="bottom">'
siteFooter += 'Pneus Goodyear - Pneus para <a href="/tirecatalog/passenger/index.html">carros</a>, <a href="/catalogo_pneus/pickup_suv/index.html">SUV</a>, <a href="/catalogo_pneus/pickup_suv/index.html">pickup</a>, <a href="/catalogo_pneus/caminhao/">caminhão</a>, <a href="/catalogo_pneus/caminhao/">ônibus</a>, <a href="/catalogo_pneus/caminhao/">micro ônibus</a>, <a href="/catalogo_pneus/agricola/index.html">máquinas agrícolas</a>, <a href="/catalogo_pneus/fora_estrada/index.html">fora de estrada</a>, <a href="/catalogo_pneus/vans_utilitarios/index.html">vans</a>, <a href="/catalogo_pneus/vans_utilitarios/index.html">utilitários</a>, <a href="/tirecatalog/airplane/">avião</a> e <a href="/catalogo_pneus/vans_utilitarios/index.html">camionetas</a>.<br>';
siteFooter += '<a href="/tirecatalog/passenger/index.html">Pneus para Automóveis</a> | <a href="/catalogo_pneus/pickup_suv/index.html">Pneus para Pickup e SUV</a> | <a href="/catalogo_pneus/caminhao/">Pneus para caminhões e ônibus</a> | <a href="/catalogo_pneus/agricola/index.html">Pneus agrícolas</a> | <a href="/catalogo_pneus/fora_estrada/index.html">Pneus Fora de Estrada</a> | <a href="/tirecatalog/airplane/">Pneus para Aviões</a> | <a href="/catalogo_pneus/vans_utilitarios/index.html">Pneus para Vans e Utilitários</a><br><a href="/catalogo_pneus/busca_pneus/busca_pneus.html">Encontre o pneu ideal para o seu carro</a> | <a href="http://vendas.goodyear.com.br/" target="_blank">Compre seu pneu on-line</a> | <a href="http://www.goodyearstockcar.com.br" target="_blank">Patrocinadora Oficial da Stock Car 2011</a><br><br>';
siteFooter += 	'<a href="' + dirBase + '/local/privacy.html"><img src="'+dirBase+'/img/link_privacy_politics.gif" width=114 height=19 border=0></a><a href="'+dirBase+'/local/copyright.html"><img src="'+dirBase+'/img/link_copyright.gif" width=114 height=19 border=0></a><div align="right"><a href="http://www.foster.com.br" target="_blank">design foster</a>&nbsp;&nbsp;&nbsp;</div><br>'
siteFooter += '</div>'
document.write(siteFooter);
	
if(document.getElementById('content_left')){
	var alturaLateral = document.getElementById('content_left').offsetHeight;
	if(document.getElementById('content').offsetHeight < alturaLateral){
		document.getElementById('content').style.height =  alturaLateral + 'px';
	}
}


try{
	if(_tamanho > 0 && _tamanho > document.getElementById('content').offsetHeight)
	{
		document.getElementById('content').style.height = _tamanho + 'px';
    }
		
}catch(e){}

if(document.getElementById('_lateral'))
    redimensionarFlash();

//script de metricas do google
var s = document.createElement('script');
s.type = "text/javascript";
s.src = "http://www.google-analytics.com/urchin.js"
s.id = "teste";
document.getElementById('bottom').appendChild(s);

//armazena o onload anterior da página, para o o novo onload nao sobreescrever o novo
var _onload;

if(window.onload)
	_onload = window.onload;
	
window.onload = function(){
	if(_onload)
		_onload();	
	
	_uacct = "UA-4614757-1";
	try{
		urchinTracker();
	}catch(err){}
}


//as funções abaixo controlam as opções de compatilhe das páginas
function compartilhe(){
	
	var divs = document.getElementsByTagName('div');
	var compartilhe
	var contadora = 0;
	
	for(var i=0; i<divs.length; i++){
		if(divs[i].className != ""){
			var titulo = divs[i].className.split('_');
			
			for(var a=0; a<titulo.length; a++){
				var pedacos = titulo[a].split(' ');
				
				for(var b=0; b<pedacos.length; b++){
					if((pedacos[b] == "title") && (contadora < 1)){
						var conteudoDiv = divs[i].innerHTML
						
						compartilhe = "<a href='javascript: abreCompartilhe();' id='linkCompartilhe'><img src='/img/compartilhe_bt.gif' border='0' /></a>";
						compartilhe += conteudoDiv;
						compartilhe += '<div id="compartilhe">';
						compartilhe += '<div id="controlaWidgets">';
						compartilhe += '<span id="tituloCompatilhe"><img src="/img/compartilhe.gif" width="93" height="11" alt="" border="0"></span>'
						compartilhe += '<ul id="widgets">';
						compartilhe += '</ul>';
						compartilhe += "<a href='javascript:fechaCompartilhe();' id='fechaCompartilhe'>X fechar</a>";
						compartilhe += '</div>';
						compartilhe += '</div>';
						divs[i].innerHTML = compartilhe;
						contadora = 1;
					}	
				}
			}
		}
	}
	widgets('widgets')
}

//compartilhe();


function widgets(nomeLista){
	try{
		var montaLista = document.getElementById(nomeLista);
		
		for(var i=0; i<sites.length; i++){
			if(sites[i] == "Amigo"){
				montaLista.innerHTML += '<li><img src="/img/amigo.png" alt="Envie para um amigo" border="0"><a href="/envie_amigo/envie_amigo.html">Envie para um amigo</a></li>'
			}
			if(sites[i] == "Reddit"){
				montaLista.innerHTML += '<li><img src="/img/reddit.gif" width="18" height="18" alt="Reddit" border="0"><a target="_blank" href="http://www.reddit.com/login?dest=%2Fsubmit%3Furl%3Dhttp%253A%252F%252F' + endereco + '%252F%26title%3D' + titulo + '">Reddit</a></li>'
			}
			if(sites[i] == "Facebook"){
				montaLista.innerHTML += '<li><img src="/img/facebook.gif" width="16" height="16" alt="Facebook" border="0"><a target="_blank" href="http://www.facebook.com/share.php?u=' + endereco +'">Facebook</a></li>'
			}
			if(sites[i] == "Delicious"){
				montaLista.innerHTML +='<li><img src="/img/delicious.png" width="16" height="16" alt="Delicious" border="0"><a target="_blank" href="http://del.icio.us/save?url=' + endereco +'&title=' + titulo +'&notes=' + descricao +'&tags=' + tags +'">Delicious</a></li>'
			}
			if(sites[i] == "Technorati"){
				montaLista.innerHTML +='<li><img src="/img/technorati.png" width="16" height="16" alt="Technorati" border="0"><a target="_blank" href="http://www.technorati.com/faves/?show=blogs&add=' + endereco +'">Technorati</a></li>'
			}
			if(sites[i] == "Yahoo Bookmarks"){
				montaLista.innerHTML +='<li><img src="/img/yahoo-myweb.png" width="18" height="18" alt="Yahoo Bookmarks" border="0"><a target="_blank" href="http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&u=' + endereco +'%2F&t=' + titulo +'">Yahoo Bookmarks</a></li>'
			}
			if(sites[i] == "Digg"){
				montaLista.innerHTML +='<li><img src="/img/digg.png" width="16" height="16" alt="Digg" border="0"><a target="_blank" href="http://digg.com/submit?url=' + endereco +'&title=' +  titulo +'">Digg</a></li>'
			}
			if(sites[i] == "MySpace"){
				montaLista.innerHTML +='<li><img src="/img/myspace.png" width="20" height="17" alt="MySpace" border="0"><a target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&u=' + endereco +'&t=' + titulo +'&c=' + descricao +'">MySpace</a></li>'
			}
			if(sites[i] == "Google BookMark"){
				montaLista.innerHTML +='<li><img src="/img/goog.png" width="16" height="16" alt="Google BookMark" border="0"><a target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&bkmk=' + endereco +'&title=' + titulo +'">Google BookMark</a></li>'
			}
			if(sites[i] == "Yahoo MyWeb"){
				montaLista.innerHTML +='<li><img src="/img/yahoo-myweb.png" width="18" height="18" alt="Yahoo MyWeb" border="0"><a target="_blank" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?Fu=' + endereco +'&t=' + titulo +'">Yahoo MyWeb</a></li>'
			}
			if(sites[i] == "Blog"){
				montaLista.innerHTML +='<li><img src="/img/blogger.jpg" width="16" height="16" alt="Blogger" border="0"><a target="_blank" href="http://www.blogger.com/add-widget?&infoUrl=' + endereco +'&logoUrl=' + logotipo + '&widget.title=' + titulo +'&widget.content=' + descricao +'">Blogger</a></li>'
			}
			if(sites[i] == "Twitter"){
				montaLista.innerHTML +='<li><img src="/img/twitter.gif" width="16" height="16" alt="Twitter" border="0"><a target="_blank" href="http://twitthis.com/twit?url=' + endereco + '">Twitter</a></li>'
			}
	//		if(sites[i] == "Orkut"){
	//			montaLista.innerHTML +='<li><img src="/img/orkut.png" width="16" height="17" alt="Orkut" border="0"><a target="_blank" href="http://www.orkut.com.br/Scrapbook.aspx">Orkut</a></li>'
	//		}
		}
	}
	catch(e){};
}

function abreCompartilhe(){
	document.getElementById('controlaWidgets').style.display = "block";
}

function fechaCompartilhe(){
	document.getElementById('controlaWidgets').style.display = "none";
}

// FUNÇÃO PARA MARCAR O SUB MENU DA PÁGINA DE EVENTOS
/*var local = location.pathname.split("/")[2];

function marcaSubMenuEventos2(){
	var menu = document.getElementById("topo").getElementsByTagName("a");
	for(var i = 0; i < menu.length; i++){
		var linkMenu = menu[i].href.split("/")[4];
		if(linkMenu == local){
			menu[i].className = "marcado";
			break;
		}
	}
}

if(location.pathname.split("/")[1] == "eventos"){
	marcaSubMenuEventos2();
}*/

