var mainbg = '#7e9ff8';
var changebg = '#334880';

var tableData = new Array('zero','one','two','three','four','five');
var spanNum = new Array('spanZero','spanOne','spanTwo','spanThree','spanFour','spanFive');

function showLinks(num) {
    // setting layers
    var indexZa = 1;
	    
    if (is_ie)
    {
        // IE
		if(num == 0) {
	        spanZero.style.visibility = "visible";
	        spanZero.style.zIndex = indexZa;
			zero.style.backgroundColor = changebg;
		} else if(num == 1) {
	        spanOne.style.visibility = "visible";
	        spanOne.style.zIndex = indexZa;
			one.style.backgroundColor = changebg;
		}  else if(num == 2) {
	        spanTwo.style.visibility = "visible";
	        spanTwo.style.zIndex = indexZa;
			two.style.backgroundColor = changebg;
		}  else if(num == 3) {
	        spanThree.style.visibility = "visible";
	        spanThree.style.zIndex = indexZa;
			three.style.backgroundColor = changebg;
		}  else if(num == 4) {
	        spanFour.style.visibility = "visible";
	        spanFour.style.zIndex = indexZa;
			four.style.backgroundColor = changebg;
		}  else {
	        spanFive.style.visibility = "visible";
	        spanFive.style.zIndex = indexZa;
			five.style.backgroundColor = changebg;
		}
    } else if(is_nav)
    {
		document.getElementById(tableData[num]).style.backgroundColor = changebg;
        if(is_nav4)
        {
            // NN4
            document.layers[spanNum[num]].visibility = "show";
            document.layers[spanNum[num]].zIndex = indexZa;
        }
        else
        {
            // NN6
            document.getElementById(spanNum[num]).style.visibility = "visible";
            document.getElementById(spanNum[num]).style.zIndex = indexZa;
        }
    }
}

function hideLinks(num) {
    // setting layers
    var indexZb = -1;

    if (is_ie)
    {
        // IE
		if(num == 0) {
	        spanZero.style.visibility = "hidden";
	        spanZero.style.zIndex = indexZb;
			zero.style.backgroundColor = mainbg;
		} else if(num == 1) {
	        spanOne.style.visibility = "hidden";
	        spanOne.style.zIndex = indexZb;
			one.style.backgroundColor = mainbg;
		}  else if(num == 2) {
	        spanTwo.style.visibility = "hidden";
	        spanTwo.style.zIndex = indexZb;
			two.style.backgroundColor = mainbg;
		}  else if(num == 3) {
	        spanThree.style.visibility = "hidden";
	        spanThree.style.zIndex = indexZb;
			three.style.backgroundColor = mainbg;
		}  else if(num == 4) {
	        spanFour.style.visibility = "hidden";
	        spanFour.style.zIndex = indexZb;
			four.style.backgroundColor = mainbg;
		}  else {
	        spanFive.style.visibility = "hidden";
	        spanFive.style.zIndex = indexZb;
			five.style.backgroundColor = mainbg;
		}
    } else if(is_nav)
    {
		document.getElementById(spanNum[num]).style.backgroundColor = mainbg;
        if(is_nav4)
        {
            // NN4
            setTimeout("document.layers[spanNum[num]].visibility = 'hide'",2500);
            //document.layers[spanNum[num]].visibility = "hide";
            document.layers[spanNum[num]].zIndex = indexZb;
        }
        else
        {
            // NN6
            document.getElementById(spanNum[num]).style.visibility = "hidden";
            document.getElementById(spanNum[num]).style.zIndex = indexZb;
        }
    }
}

function changeColor(num)
{
	if(is_ie) {
		if(num == 0) {
			zero.style.backgroundColor = changebg;
		} else if(num == 1) {
			one.style.backgroundColor = changebg;
		} else if(num == 2) {
			two.style.backgroundColor = changebg;
		} else if(num == 3) {
			three.style.backgroundColor = changebg;
		} else if(num == 4) {
			four.style.backgroundColor = changebg;
		} else {
			five.style.backgroundColor = changebg;
		}
	} else {
		document.getElementById(tableData[num]).style.backgroundColor = changebg;
	}
}

function changeBack(num)
{
	if(is_ie) {
		if(num == 0) {
			zero.style.backgroundColor = mainbg;
		} else if(num == 1) {
			one.style.backgroundColor = mainbg;
		} else if(num == 2) {
			two.style.backgroundColor = mainbg;
		} else if(num == 3) {
			three.style.backgroundColor = mainbg;
		} else if(num == 4) {
			four.style.backgroundColor = mainbg;
		} else {
			five.style.backgroundColor = mainbg;
		}
	} else {
		document.getElementById(tableData[num]).style.backgroundColor = mainbg;
	}
}
