// 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';
		}

}

// 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('menuHistorico','central','centralhome','central-textos','dadosArtistas','lateralArtistas','conteudohomenova','apresentacao');

writeUOLBar();
writeCopyright();
