var total_show=10; var shift_size=3; var i_id=new Array(); var i_files=new Array(); var i_names=new Array(); i_id[1]=415; i_files[1]='DSC_123347_w700.jpg'; i_names[1]='***'; i_id[2]=302; i_files[2]='DSC_37736_small2.jpg'; i_names[2]='***'; i_id[3]=380; i_files[3]='DSC_100288_w700.jpg'; i_names[3]='***'; i_id[4]=315; i_files[4]='DSC_107449_w700.jpg'; i_names[4]='***'; i_id[5]=350; i_files[5]='DSC_110130_w700.jpg'; i_names[5]='***'; i_id[6]=321; i_files[6]='DSC_42418_w700.jpg'; i_names[6]='***'; i_id[7]=461; i_files[7]='DSC_121124_small.jpg'; i_names[7]='***'; var current=7; i_id[8]=219; i_files[8]='DSC_13358_w600.jpg'; i_names[8]='***'; i_id[9]=234; i_files[9]='DSC_2813_w600.jpg'; i_names[9]='***'; i_id[10]=213; i_files[10]='DSC_27743_w600.jpg'; i_names[10]='***'; i_id[11]=218; i_files[11]='DSC_4845_w600.jpg'; i_names[11]='Дама с собачкой'; i_id[12]=405; i_files[12]='DSC_40388_w700.jpg'; i_names[12]='***'; i_id[13]=408; i_files[13]='DSC_40415_w700.jpg'; i_names[13]='***'; i_id[14]=406; i_files[14]='DSC_40400_w700.jpg'; i_names[14]='***'; i_id[15]=479; i_files[15]='DSC_116537_small.jpg'; i_names[15]='***'; i_id[16]=478; i_files[16]='DSC_116835_small.jpg'; i_names[16]='***'; i_id[17]=477; i_files[17]='DSC_116874_small.jpg'; i_names[17]='***'; var i; var start=((current-Math.floor(total_show/2))<1)?1:(current-Math.floor(total_show/2)); var end=((start+total_show)1)?(end-total_show):1; } function show_tn(start, end) { var text=''; for (i=start;i'; } tumbs=document.getElementById('thumbs'); tumbs.innerHTML=text; document.getElementById('moveLeft').className=(start>1)?'moveLeftA':'moveLeft'; document.getElementById('moveRight').className=(endi_id.length)?i_id.length:(end+shift_size); start=((end-total_show)<1)?1:(end-total_show); show_tn(start, end); } if (direction=='left') { start=((start-shift_size))<1?1:(start-shift_size); end=((start+total_show)>i_id.length)?i_id.length:(start+total_show); show_tn(start, end); } } show_tn(start, end); function toggleInfo2(id) { $info=document.getElementById('info'+id); if ($info.style.display=='none') { $info.style.display='block'; } else { $info.style.display='none'; } } function toggleInfo(id, trigger) { $info=document.getElementById('info'+id); if (trigger) { $info.style.display='block'; $img=document.getElementById('imgSrc'+id); if ($info.offsetWidth>150) $info.style.width=150+'px'; $info.style.marginLeft=Math.round(($img.width-$info.offsetWidth)/2)+'px'; $info.style.marginTop=($img.height-$info.offsetHeight-10)+'px'; } else { $info.style.display='none'; } }