<script> pic_arr=[[] ,[1,"/pictures/big/8/1/7/817e31ed04d465bdddac7aa82607afe5.jpg",548,500,"Большая картинка"] ,[2,"/pictures/big/2/2/f/22f421b3b3f402762e963f9704ea0a54.jpg",501,500,"Большая картинка"] ,[3,"/pictures/big/8/c/7/8c7e2fdd91fdc32787bd0626ae65d10b.jpg",387,500,"Большая картинка"] ,[4,"/pictures/big/8/9/3/893200a9610d3e35fde83c8883a96d5d.jpg",405,500,"Большая картинка"] ,[5,"/pictures/big/1/a/1/1a1be3e8f9cf324090124899684ee02a.jpg",288,350,"Большая картинка"] ,[6,"/pictures/big/f/2/b/f2b3190fa506d2097786fed4713ea2e8.jpg",525,500,"Большая картинка"] ]; function checkIt(string){ return navigator.userAgent.toLowerCase().indexOf(string) + 1; } function next_pic(){ if (checkIt('opera')) { table_pic=document.frames('name_lot_pic').document.getElementById('table_pic'); }else{ table_pic=document.getElementById('lot_pic').contentWindow.document.getElementById('table_pic'); } all_td=table_pic.getElementsByTagName('td'); for (i=0; i<=all_td.length; i=i+2){ if(all_td[i].className=='active'){ all_td[i].className=''; all_td[i+2].className='active'; document.getElementById('big_pic').childNodes[0].src=pic_arr[all_td[i+2].childNodes[0].childNodes[0].id][1]; document.getElementById('big_pic').childNodes[0].width=pic_arr[all_td[i+2].childNodes[0].childNodes[0].id][2]; document.getElementById('big_pic').childNodes[0].height=pic_arr[all_td[i+2].childNodes[0].childNodes[0].id][3]; document.getElementById('big_pic').childNodes[0].alt=pic_arr[all_td[i+2].childNodes[0].childNodes[0].id][4]; document.getElementById('lot_pic').contentWindow.change_scroll_pl(); if(i==0){ document.getElementById('prev').innerHTML='[cut]PGEgY2xhc3M9ImJsdWUiIHN0eWxlPSJjdXJzb3I6cG9pbnRlciIgb25jbGljaz0icHJldl9waWMoKTsiPtCf0YDQtdC00YvQtNGD0YnQtdC1INGE0L7RgtC+PC9hPg==[/cut]' } if(i+2==all_td.length-1){ document.getElementById('next').innerHTML='Следующее фото' } break; } } } function prev_pic(){ if (checkIt('opera')){ table_pic=document.frames('name_lot_pic').document.getElementById('table_pic'); }else{ table_pic=document.getElementById('lot_pic').contentWindow.document.getElementById('table_pic'); } all_td=table_pic.getElementsByTagName('td'); for (i=0;i<=all_td.length;i=i+2){ if(all_td[i].className=='active'){ all_td[i].className=''; all_td[i-2].className='active'; document.getElementById('big_pic').childNodes[0].src=pic_arr[all_td[i-2].childNodes[0].childNodes[0].id][1]; document.getElementById('big_pic').childNodes[0].width=pic_arr[all_td[i-2].childNodes[0].childNodes[0].id][2]; document.getElementById('big_pic').childNodes[0].height=pic_arr[all_td[i-2].childNodes[0].childNodes[0].id][3]; document.getElementById('big_pic').childNodes[0].alt=pic_arr[all_td[i-2].childNodes[0].childNodes[0].id][4]; document.getElementById('lot_pic').contentWindow.change_scroll_m(); if (i==all_td.length-1){ document.getElementById('next').innerHTML='[cut]PGEgY2xhc3M9ImJsdWUiIHN0eWxlPSJjdXJzb3I6cG9pbnRlciIgb25jbGljaz0ibmV4dF9waWMoKTsiPtCh0LvQtdC00YPRjtGJ0LXQtSDRhNC+0YLQvjwvYT4=[/cut]' } if (i-2==0) { document.getElementById('prev').innerHTML='Предыдущее фото' } break; } } } </script>