W_contenu = 780;
border_width = 0;


x = Math.max(0, ((document.body.clientWidth - W_contenu) / 2));
y = Math.max(0, ((document.body.clientHeight - H_contenu) / 2));




ns4 = (document.layers)? true:false
ns6 = (document.getElementById && !document.all);
if (!ns4)
{
	document.write('<div id=blanco style="position: absolute;  width: 0; height: 0; border-style: solid; border-width: '+ border_width +'; border-color: white; visibility: hidden"></div>');

	document.write('<div onresize=cadre_ext_on_resize() id=cadre_ext style="position: absolute; left: '+ x +'; top: '+ y +';">');
}

if (ns6)
{
	cadre = document.getElementById("cadre_ext");
	cadre_blanc = document.getElementById("blanco");
}
else
{
	cadre = document.all.cadre_ext
	cadre_blanc = document.all.blanco
}

window.onresize = recadrer;
function recadrer()
{
	cadre.style.left = Math.max(0, ((document.body.clientWidth - W_contenu) / 2));
	cadre.style.top = Math.max(0, ((document.body.clientHeight - H_contenu) / 2));
	cadre_ext_on_resize();
}


cadre_ext_on_resize()




function cadre_ext_on_resize()
{
	if (ns6)
		add = 0;
	else
		add = border_width * 2;
	x = parseInt(cadre.style.left);
	y = parseInt(cadre.style.top);
	if (Math.min(x, y) > border_width)
	{
		cadre_blanc.style.left = x - border_width;
		cadre_blanc.style.top =  y - border_width;
		cadre_blanc.style.width =  W_contenu + add;
		cadre_blanc.style.height =  H_contenu + add;
		cadre_blanc.style.visibility = "visible";
	}
	else 
	{
		cadre_blanc.style.left = 0;
		cadre_blanc.style.top =  0;
		cadre_blanc.style.width =  0;
		cadre_blanc.style.height =  0;
		cadre_blanc.style.visibility = "hidden";
	}
}



function getPage(id)
{
	a = id
	wt = 750
	ht = 500
	leftPos = (screen.width-wt)/2 - 5
	topPos = (screen.height-ht)/2 - 20
	popWin1 = window.open(''+a,'_blank','toolbars=no,resizable=no,scrollbars=no,left='+leftPos+',top='+topPos+',width='+wt+',height='+ht) 
}

