function hide(fidd){  
	elem = document.getElementById(fidd); 
	elem.style.display='none'; 
} 

function hideall(fidd, total){
	for(i=1; i<= total; i++){
		hide(fidd+i);
	}
}

function show(fidd, num, total){
  showed=0;
  elem = document.getElementById(fidd+num); 
  if(elem.style.display=='block')showed=1;
  hideall(fidd, total);
  elem = document.getElementById(fidd+num); 
  if(showed!=1)elem.style.display='block';
}