var theRowBefor=0;
var theRowAfter=0;
function change_style(theRow, action, active, finish){
	theRow=theRow*1;
	theTd = document.getElementById("m_"+theRow);
	theLink=document.getElementById("l_"+theRow);
	
	theRowBefor=theRow-1;
	theRowBeforActive=active-1;
// || flag_active
	if(action=='over'){
		theTd.style.backgroundColor="#003C82";
		theLink.style.color="#ffffff";
		if(theRowBefor>=0){
			if(theRowBefor==active){
				document.getElementById('p_'+theRowBefor).src="i/menu/sep_a_finish.gif";
			}else{
				document.getElementById('p_'+theRowBefor).src="i/menu/sep_a_r.gif";
			}
		}
		if(theRow==theRowBeforActive || theRow==finish){
			document.getElementById('p_'+theRow).src="i/menu/sep_a_finish.gif";
		}else{
			document.getElementById('p_'+theRow).src="i/menu/sep_a_l.gif";
		}
		
	}else{
		theTd.style.backgroundColor="#E2F4FC";
		theLink.style.color="#D20F14";
		if(theRowBefor>=0){
			if(theRowBefor==active){
				document.getElementById('p_'+theRowBefor).src="i/menu/sep_a_l.gif";
			}else{
				document.getElementById('p_'+theRowBefor).src="i/menu/sep_mu.gif";
			}
		}
		if(theRow==theRowBeforActive || theRow==finish){
			document.getElementById('p_'+theRow).src="i/menu/sep_a_r.gif";
		}else{
			document.getElementById('p_'+theRow).src="i/menu/sep_mu.gif";
		}
	}
}
