// Wyświetlanie zdjęć.
// Dla IE jest bajer z filtrem. Część "if"ów zabezpiecza przed błędami w innych przeglądarkach.

function PhotoChange(offset) {
 //if(!document.images['LstPhoto'].style.filter) document.images['LstPhoto'].style.filter='progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=30)';
 //if(document.images['LstPhoto'].filters) document.images['LstPhoto'].filters[0].apply();
 ActualPhoto += offset
 PhotoDisplay(ActualPhoto);
}
function PhotoDisplay(PhotoNumber) {
 if(NoOfPhotos <= 0) return;
 ActualPhoto = PhotoNumber;
 if(ActualPhoto > NoOfPhotos) {
  ActualPhoto = 1
 }
 if(ActualPhoto < 1) {
  ActualPhoto = NoOfPhotos
 }
 document.all.DisplayedPictureNo.value = ActualPhoto;
 document.images['LstPhoto'].src = Photos[ActualPhoto];
 document.images['LstPhoto'].alt = 'Zdjęcie ' + ActualPhoto + ' z ' + NoOfPhotos;  //transl
 if(document.all.PicInfo) document.all.PicInfo.innerHTML = 'Zdjęcie ' + ActualPhoto + ' z ' + NoOfPhotos + '&nbsp; '  //transl
 if(document.images['LstPhoto'].filters && document.images['LstPhoto'].style.filter)
         document.images['LstPhoto'].filters[0].play();
}

function ActivatePrevAndNext() {
 if(NoOfPhotos <= 1) return;
 document.all.PrevPic.href='javascript:PhotoChange(-1)';
 document.all.NextPic.href='javascript:PhotoChange(1)';
 document.images['PrevPicImg'].src = ImagesVirtDir + '/prevpage.gif';
 document.images['NextPicImg'].src = ImagesVirtDir + '/nextpage.gif';
}
function DeactivatePrevAndNext() {
 document.all.PrevPic.href='#';
 document.all.NextPic.href='#';
 document.images['PrevPicImg'].src = ImagesVirtDir + '/prevpage_inact.gif';
 document.images['NextPicImg'].src = ImagesVirtDir + '/nextpage_inact.gif';
}

