function arrangeLayer()
{
	valx = document.body.offsetWidth;
	valx = valx/2;

	valy = document.body.offsetHeight;
	valy = valy/2;

	if(navigator.appName != "Netscape")
	{
		position = document.body.scrollTop;
	}
	else
	{
		position = window.pageYOffset;
		valx = window.innerWidth;
		valx = valx/2;
	}

	if(navigator.appName != "Netscape")
	{
		//AQUI CONTROLA A LAYER NO IE
		if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) {
			var ieversion = new Number(RegExp.$1)
			
			if (ieversion >= 8) { // IE 8+
				aplicaStyle('apDiv1', 'left', parseInt(valx-350)+"px");
				aplicaStyle(('apDiv1'), 'top', parseInt(valy+150)+"px");

			}
			else if (ieversion>=7) { // IE 7
				aplicaStyle('apDiv1', 'left', parseInt(valx-350)+"px");
				aplicaStyle(('apDiv1'), 'top', parseInt(valy-170)+"px");


			}
			else if (ieversion>=6) { // IE 6
				aplicaStyle('apDiv1', 'left', parseInt(valx-350)+"px");
				aplicaStyle(('apDiv1'), 'top', parseInt(valy+150)+"px");


			}
		}
	}
	else
	{
		//AQUI CONTROLA A LAYER EM OUTROS NAVEGADORES
		aplicaStyle(('apDiv1'), 'left', parseInt(valx-350)+"px");
		aplicaStyle(('apDiv1'), 'top', parseInt(valy+150)+"px");


	}
}



function aplicaStyle(nome, posicao, valor) {
	if(document.getElementById(nome))
	{
		if(posicao == 'left') {
			document.getElementById(nome).style.left = valor;
		}
		else if (posicao == 'top') {
			document.getElementById(nome).style.top = valor;
		}
	}
}
