// vlti.org
// Rollover menus

// menu_area images
if (document.images) {
    home_on = new Image();
	home_on.src = "/imagens/menus/home_on.png";
    home_off = new Image();
	home_off.src = "/imagens/menus/home_off.png";	

    project_on = new Image();
	project_on.src = "/imagens/menus/project_on.png";
    project_off = new Image();
	project_off.src = "/imagens/menus/project_off.png";	

    events_on = new Image();
	events_on.src = "/imagens/menus/events_on.png";
    events_off = new Image();
	events_off.src = "/imagens/menus/events_off.png";

    outreach_on = new Image();
	outreach_on.src = "/imagens/menus/outreach_on.png";
    outreach_off = new Image();
	outreach_off.src = "/imagens/menus/outreach_off.png";	
}

// Função para activar as imagens - mouseover
function imgOn(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "_on.src");
        }
}

// Função para desactivar as imagens - mouseout
function imgOff(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "_off.src");
        }
}

// Função para mostrar um DIV
function showLayer(LayerID) {
	if (document.getElementById) {
		// this is the way the standards work
		var Layerstyle = document.getElementById(LayerID).style;
		Layerstyle.display = "block";
	}
	else if (document.all) {
		// this is the way old msie versions work
		var Layerstyle = document.all[LayerID].style;
		Layerstyle.display =  "block";
	}
	else if (document.layers) {
		// this is the way nn4 works
		var Layerstyle = document.layers[LayerID].style;
		Layerstyle.display =  "block";
	}
}

// Função para esconder um DIV
function hideLayer(LayerID) {
	if (document.getElementById) {
		// this is the way the standards work
		var Layerstyle = document.getElementById(LayerID).style;
		Layerstyle.display  = "none";
	}
	else if (document.all) {
		// this is the way old msie versions work
		var Layerstyle = document.all[LayerID].style;
		Layerstyle.display  = "none";
	}
	else if (document.layers) {
		// this is the way nn4 works
		var Layerstyle = document.layers[LayerID].style;
		Layerstyle.display =  "none";
	}
}

// Função para mostrar/esconder DIVs -> baseia-se nas funções hideLayer e showLayer
function switchLayer(showObj,hideObj) {
	hideLayer (hideObj);
	showLayer(showObj);
}