<script type="text/javascript">
  function przygotujObrazy(prefiks)
  {
    if(!prefiks) return;
    var img = new Image();
    var imgs = document.getElementsByTagName("img");
    for(var i = 0; i < imgs.length; i++){
      if(imgs[i].className &&
         imgs[i].className.substr(0, prefiks.length) == prefiks){
        imgs[i].nazwaOn = imgs[i].className.slice(prefiks.length);
        imgs[i].nazwaOff = imgs[i].src;
        img.src = imgs[i].nazwaOn;
        imgs[i].onmouseover = function(){
          this.src = imgs[i].nazwaOn;
        }
        imgs[i].onmouseout = function(){
          this.src = imgs[i].nazwaOff;
        }
      }
    }
  }
</script>