menuativo = "";
// PRELOAD DAS IMAGENS QUE VÃO APARECER NO MOUSEOVER
if (document.images){
	figura1 = new Image() ; figura1.src = "_img/imgMenuIntroductionOn.gif";
	figura2 = new Image() ; figura2.src = "_img/imgMenuFieldsOn.gif";
	figura3 = new Image() ; figura3.src = "_img/imgMenuTeamOn.gif";
	figura4 = new Image() ; figura4.src = "_img/imgMenuDocumentsOn.gif";
	figura5 = new Image() ; figura5.src = "_img/imgMenuContactOn.gif";
}
function trocaimg(imagem, caminho, item){
	if (menuativo != item) document.images[imagem].src = caminho;
}
// CAMINHOS DE TODAS AS IMAGENS DO MENU E RESPECTIVOS NOMES DE CADA UMA
function trocatodomenu(){
	trocaimg('Introduction', '_img/imgMenuIntroductionOff.gif');
	trocaimg('Fields', '_img/imgMenuFieldsOff.gif');
	trocaimg('Team', '_img/imgMenuTeamOff.gif');
	trocaimg('Documents', '_img/imgMenuDocumentsOff.gif');
	trocaimg('Contact', '_img/imgMenuContactOff.gif');
}
// FUNÇÃO QUE DEFINE A IMAGEM QUE APARECE NO MENU QUANDO ESTAMOS NA RESPECTIVA PÁGINA
function seleciona(item){
	trocatodomenu();
	menuativo = item;
	caminho = "_img/imgMenu" + item + "On2.gif";
	trocaimg(item, caminho);
}


function ativo(src,idlink)
{
	if (!src.contains(event.fromElement))
    {
    	src.bgColor = '#A7AFBC';
		document.all[idlink].style.color = "#FFFFFF";
	}
}

function inativo(src,idlink)
{
	if (!src.contains(event.toElement))
    {
    	src.bgColor = '#EEEEEE';
		document.all[idlink].style.color = "#0E1243";
	}
}

function Data()
{
	hoje = new Date()
	dia = hoje.getDate()
	dias = hoje.getDay()
	mes = hoje.getMonth()
	ano = hoje.getFullYear()
	if (dia < 10)
	dia = "0" + dia
	function CriaArray (n)
	{
		this.length = n
	}
	NomeDia = new CriaArray(7)
	NomeDia[0] = "Domingo"
	NomeDia[1] = "Segunda-feira"
	NomeDia[2] = "Ter&ccedil;a-feira"
	NomeDia[3] = "Quarta-feira"
	NomeDia[4] = "Quinta-feira"
	NomeDia[5] = "Sexta-feira"
	NomeDia[6] = "S&aacute;bado"
	NomeMes = new CriaArray(12)
	NomeMes[0] = "Janeiro"
	NomeMes[1] = "Fevereiro"
	NomeMes[2] = "Mar&ccedil;o"
	NomeMes[3] = "Abril"
	NomeMes[4] = "Maio"
	NomeMes[5] = "Junho"
	NomeMes[6] = "Julho"
	NomeMes[7] = "Agosto"
	NomeMes[8] = "Setembro"
	NomeMes[9] = "Outubro"
	NomeMes[10] = "Novembro"
	NomeMes[11] = "Dezembro"
	document.write ("<span class='data' id='10regular'>" + NomeDia[dias] + ", " + dia + " de " + NomeMes[mes] + " de " + ano + "</span>")
}

function DataEn()
{
	hoje = new Date()
	dia = hoje.getDate()
	dias = hoje.getDay()
	mes = hoje.getMonth()
	ano = hoje.getFullYear()
	if (dia < 10)
	dia = "0" + dia

	if (dia==1 || dia==11 || dia==21 || dia==31)
	{
		dia = dia + "st"
	}
	else if (dia==2 || dia==12 || dia==22 )
	{
		dia = dia + "nd"
	}
	else if (dia==3 || dia==13 || dia==23)
	{
		dia = dia + "rd"
	}
	else
	{
		dia = dia + "th"
	}

	function CriaArray (n)
	{
		this.length = n
	}
	NomeDia = new CriaArray(7)
	NomeDia[0] = "Sunday"
	NomeDia[1] = "Monday"
	NomeDia[2] = "Tuesday"
	NomeDia[3] = "Wednesday"
	NomeDia[4] = "Thursday"
	NomeDia[5] = "Friday"
	NomeDia[6] = "Saturday"
	NomeMes = new CriaArray(12)
	NomeMes[0] = "January"
	NomeMes[1] = "February"
	NomeMes[2] = "March"
	NomeMes[3] = "April"
	NomeMes[4] = "May"
	NomeMes[5] = "June"
	NomeMes[6] = "July"
	NomeMes[7] = "August"
	NomeMes[8] = "September"
	NomeMes[9] = "October"
	NomeMes[10] = "November"
	NomeMes[11] = "December"
	document.write ("<span class='data' id='10regular'>" + NomeDia[dias] + ", " + NomeMes[mes] + " " + dia + ", " + ano + "</span>")
}
