function preloadImages(){
	for(i=0;i<imgArray.length;i++){
		newImage[i] = new Image();
		newImage[i].src = imgArray[i];
	}
}

function showMenu(index){
	var tempL = document.getElementById("linkL"+index);
	var tempClass = document.getElementById("link"+index);
	var tempR = document.getElementById("linkR"+index);	
	tempL.src = "images/nav_onL.png";
	tempClass.className = "navOn";
	tempR.src = "images/nav_onR.png";	
}

function hideMenu(index){
	var tempL = document.getElementById("linkL"+index);
	var tempClass = document.getElementById("link"+index);
	var tempR = document.getElementById("linkR"+index);	
	tempL.src = "images/nav_offL.png";
	tempClass.className = "navOff";
	tempR.src = "images/nav_offR.png";	
}


var oldIndex = "";
function showSection(index){
	var newId = document.getElementById(index);

	if(newId.className == "showBlock")
		newId.className = "hideBlock";
	else
		newId.className = "showBlock";
			

	if(oldIndex != "")
		document.getElementById(oldIndex).className = "hideBlock";

	oldIndex = (oldIndex != "" && oldIndex == index) ? "" : index;
}
