var color = '';

function over(ly, id) {
    if (document.layers) {
        window.color = window.document.layers[ly].document.layers[id].bgColor;
	      window.document.layers[ly].document.layers[id].bgColor = '#999999';
    }
    else if (document.all) {
        window.color = window.document.all[id].style.background;
        window.document.all[id].style.background = '#999999';
    }
}

function out(ly, id) {
    if (document.layers)
        window.document.layers[ly].document.layers[id].bgColor = window.color;
    else if (document.all)
        window.document.all[id].style.background = '#ffec8b';
}





var active = 0;

function activate() {
	active = 1;
}

bOK = (document.all || document.layers || document.getElementById);

layerList = new Array();

layerList[0] = "ly01";
layerList[1] = "ly02";
layerList[2] = "ly03";
layerList[3] = "ly04";
layerList[4] = "ly05";
layerList[5] = "ly06";
var section = "home";
var actLayer = "none";


if (document.layers) {
	layerVar = "document.layers"; styleVar = ""; visVar = "show";
} else if (document.all) {
	layerVar = "document.all"; styleVar = ".style"; visVar = "visible";
}

function showLayer(num){
	if (bOK && active) {
		actLayer = layerList[num];
		hideAllLayers();
		if (document.all || document.layers) {
			eval(layerVar + '["' + layerList[num] + '"]' + styleVar + '.visibility="visible"');
		} else if (document.getElementById) {
			thisLayer = document.getElementById(layerList[num]);
			thisLayer.style.visibility = "visible";
		}
	}
}
     
function hideLayer(num){
	if (bOK && active) {
		if (document.all || document.layers) {
			eval(layerVar + '["' + layerList[num] + '"]' + styleVar + '.visibility="hidden"');
		} else if (document.getElementById) {
			thisLayer = document.getElementById(layerList[num]);
			thisLayer.style.visibility = "hidden";
		}
	}
}

function hideAllLayers() {
	if (bOK && active) {
		var actLayer = "none";
		for (i = 0; i < layerList.length; i++) hideLayer(i);
		clearTimeout(menuTimer);
	}
}

menuTimer = setTimeout("clearAll()",750);

function clearMenus() {
	menuTimer = setTimeout("clearAll()",750);
}

function clearAll() {
	var actLayer = "none";
	hideAllLayers();
}	
