// JavaScript Document
function centralizaDivLT(id)
{

	if (document.compatMode && document.compatMode != "BackCompat")
	{
		var width		= document.documentElement.clientWidth;
		var height		= document.documentElement.clientHeight;
		var scrolltop	= document.documentElement.scrollTop;
		var scrollleft	= document.documentElement.scrollLeft;
	}
	else
	{
		var width 		= document.body.clientWidth;
		var height 		= document.body.clientHeight;
		var scrollleft	= document.body.scrollLeft;
		var scrolltop	= document.body.scrollTop;
	}


	var div = document.getElementById(id);

	div.style.position='absolute';

	div.style.top  = parseInt(height / 2) - parseInt(div.offsetHeight / 2) + parseInt(scrolltop)  + "px" ;
	div.style.left = parseInt(width / 2)  - parseInt(div.offsetWidth  / 2) + parseInt(scrollleft) + "px";


}


function centralizaDivLR(id)
{

	if (document.compatMode && document.compatMode != "BackCompat")
	{
		var width		= document.documentElement.clientWidth;
		var scrollleft	= document.documentElement.scrollLeft;
	}
	else
	{
		var width 		= document.body.clientWidth;
		var scrollleft	= document.body.scrollLeft;
	}


	var div = document.getElementById(id);

	div.style.position='absolute';

	div.style.left = parseInt(width / 2)  - parseInt(div.offsetWidth  / 2) + parseInt(scrollleft) + "px";


}

