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]=270; i_files[1]='DSC_15777_w600_1.jpg'; i_names[1]='spbroofs #'; i_id[2]=309; i_files[2]='DSC_23656_w600_1.jpg'; i_names[2]='***'; i_id[3]=283; i_files[3]='DSC_29580_small_1.jpg'; i_names[3]='spbroofs #'; i_id[4]=402; i_files[4]='DSC_37502_1_w600.jpg'; i_names[4]='***'; i_id[5]=272; i_files[5]='DSC_20439_w600_1.jpg'; i_names[5]='spbroofs #'; var current=5; i_id[6]=310; i_files[6]='DSC_18667_w600_1_1.jpg'; i_names[6]='***'; i_id[7]=311; i_files[7]='DSC_21601_w600_1.jpg'; i_names[7]='***'; i_id[8]=290; i_files[8]='DSC_21088_w600_1.jpg'; i_names[8]='spbroofs #'; i_id[9]=279; i_files[9]='DSC_20428_w600_1.jpg'; i_names[9]='spbroofs #'; i_id[10]=269; i_files[10]='DSC_15719_w600_1.jpg'; i_names[10]='spbroofs #'; i_id[11]=317; i_files[11]='DSC_43452_w600.jpg'; i_names[11]='***'; i_id[12]=312; i_files[12]='DSC_26575_w600_1.jpg'; i_names[12]='***'; i_id[13]=277; i_files[13]='DSC_16135_w600_1.jpg'; i_names[13]='spbroofs #'; i_id[14]=271; i_files[14]='DSC_17914_w600_1.jpg'; i_names[14]='spbroofs #'; i_id[15]=284; i_files[15]='DSC_32183_w600_1.jpg'; i_names[15]='spbroofs #'; i_id[16]=289; i_files[16]='DSC_13567_w600_2.jpg'; i_names[16]='spbroofs #'; i_id[17]=276; i_files[17]='DSC_15663_w600_1.jpg'; i_names[17]='Восхождение'; i_id[18]=274; i_files[18]='DSC_29337_w600_1.jpg'; i_names[18]='spbroofs #'; i_id[19]=280; i_files[19]='DSC_20494_w600.jpg'; i_names[19]='spbroofs #'; i_id[20]=282; i_files[20]='DSC_29516_small_1.jpg'; i_names[20]='spbroofs #'; i_id[21]=318; i_files[21]='DSC_38237_w600.jpg'; i_names[21]='***'; i_id[22]=281; i_files[22]='DSC_29514_w600_1.jpg'; i_names[22]='spbroofs #'; i_id[23]=467; i_files[23]='DSC_121825_small.jpg'; i_names[23]='***'; i_id[24]=486; i_files[24]='DSC_26168_w600.jpg'; i_names[24]='***'; 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'; } }