var current = 1;

function section(x){
	current = x;
}

function mOver(x){
	if(x == current){
		return;
	}
	if(x > 1){
		document.getElementById('mi' + (x-1)).className = "bhighlight";
	}
	if(x < 8){
		document.getElementById('mi' + (x+1)).className = "bhighlight";
	}
	document.getElementById('mi' + x).className = "ihighlight";
	document.getElementById('mia' + x).className = "ahighlight";
}

function mOut(x){
	if(x == current){
		return;
	}
	else{
		if(x > 1){
			if((x-2) == current){
				document.getElementById('mi' + (x-1)).className = "bselected";
			}
			else{
				document.getElementById('mi' + (x-1)).className = "bnormal";
			}
		}
		if(x < 8){
			if((x+2) == current){
				document.getElementById('mi' + (x+1)).className = "bselected";
			}
			else{
				document.getElementById('mi' + (x+1)).className = "bnormal";
			}
		}
		document.getElementById('mi' + x).className = "inormal";
		document.getElementById('mia' + x).className = "";
	}
}