- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
function ChangePhoto(num, photo)
{
if (photo.className != 'photo_selected')
{
var image1 = document.getElementById("ctl00_MainContent_ProductInfo1_ctl00_AlternativePictures_Image1");
var image2 = document.getElementById("ctl00_MainContent_ProductInfo1_ctl00_AlternativePictures_Image2");
var image3 = document.getElementById("ctl00_MainContent_ProductInfo1_ctl00_AlternativePictures_Image3");
var image4 = document.getElementById("ctl00_MainContent_ProductInfo1_ctl00_AlternativePictures_Image4");
var image5 = document.getElementById("ctl00_MainContent_ProductInfo1_ctl00_AlternativePictures_Image5");
var image6 = document.getElementById("ctl00_MainContent_ProductInfo1_ctl00_AlternativePictures_Image6");
if (image1 != null) image1.className = 'photo_notselected';
if (image2 != null) image2.className = 'photo_notselected';
if (image3 != null) image3.className = 'photo_notselected';
if (image4 != null) image4.className = 'photo_notselected';
if (image5 != null) image5.className = 'photo_notselected';
if (image6 != null) image6.className = 'photo_notselected';
photo.className = 'photo_selected';
Hide(0);
setTimeout("ChangeSrc("+num+")", 300);
setTimeout("ShowPhoto()", 400);
}
}
Чо мне ща сказал? Цыклы мне ща сказал? Какие тенна цыклы, ыдисюданна!
Строчки 22, 23 активируют какое-то хитрожопое многопоточное отображение фоток со взаимными блокировками и ожиданием друг друга по таймеру с интервалами в 10 мс.
Все остальное - довольно традиционно
два evala, тоже банально