// JavaScript Document

var barHeightDefault = 0;

function ajustPage(){
	var bar = document.getElementById("barreBas");
	var structure = document.getElementById("structure");
	
	var barHeight = bar.clientHeight;
	var structureHeight = structure.clientHeight - (barHeight-barHeightDefault);
	
	if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ){
		screenHeight = document.documentElement.clientHeight;
	}
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ){
	screenHeight = document.body.clientHeight;
	}
	else{
	screenHeight = (window.innerHeight);
	}
	
	
	if(screenHeight > structureHeight) bar.style.height = (barHeightDefault+(screenHeight-structureHeight)) + "px";
}

function initPage(){
	var bar = document.getElementById("barreBas");
	barHeightDefault = bar.clientHeight;
	
	ajustPage();
}

onload=initPage;
onresize=ajustPage; 
