var conteudo 		= document.getElementById("conteudo");
var menu 			= document.getElementById("menu");
var conteudobase 	= document.getElementById("conteudobase");
var tamanhoconteudo = (findPosY(document.getElementById('conteudofim')));
var tamanhomenu 	= (findPosY(document.getElementById('xis')));
var sombraleft 		= document.getElementById("sombraleft"); 
var sombraright 	= document.getElementById("sombraright"); 

//alert(tamanhoconteudo + '>' + tamanhomenu);
if (tamanhoconteudo > tamanhomenu)
{
	conteudobase.style.height = tamanhoconteudo-250+ "px";
	sombraleft.style.height = tamanhoconteudo - 60 +"px";
	sombraright.style.height = tamanhoconteudo - 60 +"px";
}else if (tamanhoconteudo < tamanhomenu)	{
	tamanhoconteudo = findPosY(document.getElementById('rodapegeral'));
	conteudo.style.height = tamanhoconteudo + 20 +"px";
	sombraleft.style.height = tamanhoconteudo - 1 +"px";
	sombraright.style.height = tamanhoconteudo - 1 +"px";
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}