function addWidth() 
{
	var mydiv = document.getElementById("bottom");
	var curr_width = document.documentElement.clientWidth; // removes the "px" at the end
	mydiv.style.width = curr_width +"px";
	
	var divleft = document.getElementById("left");
	var divright = document.getElementById("right");
	var divleft_height = document.getElementById('left').offsetHeight;
	var divright_height = document.getElementById('right').offsetHeight;
		
	if(divleft_height >= divright_height)
	{
		divright.style.height = (divleft_height +"px");
		divleft.style.height = (divleft_height +"px");
	}
	else
	{
		divleft.style.height = (divright_height +"px");
		divright.style.height = (divright_height +"px");
	}
}
 
 window.onload=addWidth;
