function pokaz(obecny){
  if (obecny == 1) { poprzedni = 2; nastepny = 3 }
  if (obecny == 2) { poprzedni = 1; nastepny = 3 }
  if (obecny == 3) { poprzedni = 1; nastepny = 2 }
  if (document.getElementById('h'+obecny).getAttribute('class') != null){
    if(document.getElementById('h'+obecny).getAttribute('class')=='pasywny'){
      document.getElementById('h'+nastepny).setAttribute('class','pasywny');
      document.getElementById('h'+poprzedni).setAttribute('class','pasywny');
      document.getElementById('h'+obecny).setAttribute('class','aktywny');
    }
  }
  else {
    if(document.getElementById('h'+obecny).getAttribute('className')=='pasywny'){
      document.getElementById('h'+nastepny).setAttribute('className','pasywny');
      document.getElementById('h'+poprzedni).setAttribute('className','pasywny');
      document.getElementById('h'+obecny).setAttribute('className','aktywny');
    }
  }
  if(document.getElementById('m'+obecny).style.display=='none'){
    document.getElementById('m'+nastepny).style.display='none';
    document.getElementById('m'+poprzedni).style.display='none';
    document.getElementById('m'+obecny).style.display='';
  }
}