// JavaScript Document

window.onload = function () { ini_largeur(); ini_hauteur(); }
window.onresize = function () { ini_largeur(); }

function ini_hauteur()
{
	var obj_header = document.getElementById('header');
	var obj_footer = document.getElementById('footer');
	var obj_columncontent = document.getElementById('column_content');
	var obj_columnleft = document.getElementById('column_left');
	var obj_columnright = document.getElementById('column_right');

	if(obj_header && obj_footer && obj_columncontent && obj_columnleft)
	{
		obj_columncontent.style.height = 'auto';
		obj_columnleft.style.height = 'auto';
		if((obj_header.offsetHeight + obj_footer.offsetHeight + obj_columncontent.offsetHeight) < 420 && (obj_header.offsetHeight + obj_footer.offsetHeight + obj_columnleft.offsetHeight) < 420)
		{
			obj_columncontent.style.height = 420 - obj_header.offsetHeight - obj_footer.offsetHeight + 'px';
			obj_columnleft.style.height = 420 - obj_header.offsetHeight - obj_footer.offsetHeight + 'px';
		}
		else if(obj_columncontent.offsetHeight > obj_columnleft.offsetHeight || !obj_columnleft.offsetHeight)
		{
			obj_columnleft.style.height = obj_columncontent.offsetHeight +'px';
		}
		else
		{
			obj_columncontent.style.height = obj_columnleft.offsetHeight +'px';
		}
	}
	else if(obj_header && obj_columncontent)
	{
		obj_columncontent.style.height = 'auto';
		
		if((obj_header.offsetHeight + obj_columncontent.offsetHeight) < 420)
		{
			obj_columncontent.style.height = 420 - obj_header.offsetHeight + 'px';
		}	
	}
}

function ini_largeur()
{
	var obj_container = document.getElementById('container');

	if(obj_container)
	{
		obj_container.style.width = '100%';
		if(obj_container.offsetWidth < 750)
		{
			obj_container.style.width = 750 + 'px';
		}
		/*else if(obj_container.offsetWidth > 995)
		{
			obj_container.style.width = 995 + 'px';
		}*/
	}
}