function reposicionarmenu()
{
// Posicao do primeiro menu
var posicaohorizontal=(document.body.clientWidth/2)-395;
var posicaovertical=(document.body.clientHeight/2)-264;

// Posicao do segundo menu
var posicaohorizontal2=(document.body.clientWidth/2)-270;
var posicaovertical2=(document.body.clientHeight/2)-264;

// Posicao do terceiro menu
var posicaohorizontal3=(document.body.clientWidth/2)-75;
var posicaovertical3=(document.body.clientHeight/2)-264;

// Posicao do quarto menu
var posicaohorizontal4=(document.body.clientWidth/2)+140;
var posicaovertical4=(document.body.clientHeight/2)-264;

// Posicao do quinto menu
var posicaohorizontal5=(document.body.clientWidth/2)+47;
var posicaovertical5=(document.body.clientHeight/2)-264;



// Vamos posicionar os menus horizontalmente
document.getElementById('container').style.left=posicaohorizontal+'px';
document.getElementById('container2').style.left=posicaohorizontal2+'px';
document.getElementById('container3').style.left=posicaohorizontal3+'px';
document.getElementById('container4').style.left=posicaohorizontal4+'px';
document.getElementById('container5').style.left=posicaohorizontal5+'px';

// Vamos posicionar os menus verticalmente
if (document.body.clientHeight <= 590)
	{
	// Temos de definir as posições verticais fixas para quando o conteúdo
	// não couber verticalmente na janela (nao esquecer o 'px' no fim)
	document.getElementById('container').style.top='25px';
	document.getElementById('container2').style.top='25px';
	document.getElementById('container3').style.top='25px';
	document.getElementById('container4').style.top='25px';
	document.getElementById('container5').style.top='25px';

	}
else
	{
	document.getElementById('container').style.top=posicaovertical+'px';
	document.getElementById('container2').style.top=posicaovertical2+'px';
	document.getElementById('container3').style.top=posicaovertical3+'px';
	document.getElementById('container4').style.top=posicaovertical4+'px';
	document.getElementById('container5').style.top=posicaovertical5+'px';	
	}
}

sfHover = function()
{
var quantidade_menus=5;
for (var x=1; x <= quantidade_menus; x++)
	{
	if (x == 1)
		{
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		}
	else
		{
		var sfEls = document.getElementById("nav"+x).getElementsByTagName("LI");
		}

	for (var i=0; i < sfEls.length; i++)
		{
		sfEls[i].onmouseover=function()
			{
			this.className+=" sfhover";
			}

		sfEls[i].onmouseout=function()
			{
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}

if (window.attachEvent)
	{
	window.attachEvent("onload", sfHover);
	}


sfHover2 = function()
{
var sfEls = document.getElementById("nav2").getElementsByTagName("LI");

for (var i=0; i<sfEls.length; i++)
	{
	sfEls[i].onmouseover=function()
		{
		this.className+=" sfhover";
		}

	sfEls[i].onmouseout=function()
		{
		this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover2);



sfHover3 = function()
{
var sfEls = document.getElementById("nav3").getElementsByTagName("LI");

for (var i=0; i<sfEls.length; i++)
	{
	sfEls[i].onmouseover=function()
		{
		this.className+=" sfhover";
		}

	sfEls[i].onmouseout=function()
		{
		this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover3);


sfHover4 = function()
{
var sfEls = document.getElementById("nav4").getElementsByTagName("LI");

for (var i=0; i<sfEls.length; i++)
	{
	sfEls[i].onmouseover=function()
		{
		this.className+=" sfhover";
		}

	sfEls[i].onmouseout=function()
		{
		this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover4);



sfHover5 = function()
{
var sfEls = document.getElementById("nav5").getElementsByTagName("LI");

for (var i=0; i<sfEls.length; i++)
	{
	sfEls[i].onmouseover=function()
		{
		this.className+=" sfhover";
		}

	sfEls[i].onmouseout=function()
		{
		this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover5);





