// uol busca //
var dC = document;
document.domain = "uol.com.br";
/*var ultimaBarraSel = dC.getElementById('abas').getElementsByTagName('a')[0];
var docForm = dC.getElementById('form');
function UOLBusca(s) {
	if(ultimaBarraSel!="" && ultimaBarraSel!=s){
    ultimaBarraSel.className="";
    ultimaBarraSel.nextSibling.style.visibility=ultimaBarraSel.previousSibling.style.visibility='visible';
	}
		
	s.nextSibling.style.visibility=s.previousSibling.style.visibility='hidden';
	s.blur();
	s.className="sel";
	ultimaBarraSel=s;

	dC.formb.skin.disabled=dC.formb.id.disabled=dC.formb.rd.disabled = (s.innerHTML=='Notícias') ? "" : "disabled" ;

	if(s.innerHTML=='Web') dC.formb.action = "http://busca.uol.com.br/www/index.html";
	else if(s.innerHTML=='Not?cias') dC.formb.action = "http://noticias.busca.uol.com.br/uol/index.html";
	else if(s.innerHTML=='Imagens') dC.formb.action = "http://busca.uol.com.br/imagem/index.html";
	else if(s.innerHTML=='V?deo') dC.formb.action = "http://busca.uol.com.br/video/index.html";
	else if(s.innerHTML=='Pre?os') dC.formb.action = "http://shopping.uol.com.br/busca.html";
		
	docForm.getElementsByTagName('input')[0].focus();
			
	return true;
} */// End of UOLBusca

// posiciona elementos //
bFs = (document.getElementById('barrauol')) ? document.getElementById('barrauol').offsetWidth/76 : 0 ;

function findPos(bId, sum) {
	obj = document.getElementById(bId);
	var curtop = 0;
	if (obj.offsetParent) {
	while (obj.offsetParent) {
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y) curtop += obj.y;
	return curtop;
}		

// equaliza colunas //
function getHeight(id) {
	if (document.getElementById(id)) return document.getElementById(id).offsetHeight + findPos(id);
	else return 0;
}
		
function getMaxHeight(args) {
	maxHeight = getHeight(args[0]);
	for(i=0;i<args.length;i++)	
	maxHeight = Math.max(maxHeight, getHeight(args[i]))
	return maxHeight;
}
		
function setHeight() {
	maxHeight = getMaxHeight(arguments) 
	for(i=0;i<arguments.length;i++)
		if (document.getElementById(arguments[i]) && maxHeight != 0 && bFs != 0){
			document.getElementById(arguments[i]).style.height = (maxHeight - findPos(arguments[i]))/bFs  +'em';
			if (document.getElementById('gastronomia-col-dir')) {
				document.getElementById('gastronomia-col-dir').style.height = (maxHeight - findPos('gastronomia-col-dir'))/bFs - 1 +'em';
			}
			if (document.getElementById('gastronomia-receitas-ervas')) {
				document.getElementById('gastronomia-receitas-ervas').style.height = (maxHeight - findPos('gastronomia-receitas-ervas'))/bFs - 3 +'em';
			}
			if (document.getElementById('gastronomia-receitas-acompanhamentos')) {
				document.getElementById('gastronomia-receitas-acompanhamentos').style.height = (maxHeight - findPos('gastronomia-receitas-acompanhamentos'))/bFs - 3 +'em';
			}
			if (document.getElementById('gastronomia-receitas-item')) {
				document.getElementById('gastronomia-receitas-item').style.height = (maxHeight - findPos('gastronomia-receitas-item'))/bFs - 3 +'em';
			}
		}
}
		
// adicionar aqui os IDs das colunas que deseja equalizar 
// estes elementos devem ser DIVs de estruturação, não devem conter padding ou margin
setHeight("col-esquerda","centro");
