var up=0; var big_img; var big_title; var photo; function sl_start() { if(sl_on)return; sl_on=true; var k=2; var tmp=document.getElementById('div_photo'); tmp.style['top']="0px"; tmp=document.getElementById('etc_1'); tmp.style.display="none"; up=document.getElementById("center_photo_info").clientHeight; photo=document.getElementById('div_photo'); document.getElementById('big_photo_img').style.cursor="pointer"; sl_moveup(); if(typeof(sl_timer)!="undefined") clearTimeout(sl_timer); big_img=document.getElementById("big_photo_img"); big_title=document.getElementById("big_title"); sl_timer=setTimeout("sl_loop()",1000*sl_interval); } function sl_moveup() { y=parseInt(photo.style["top"]); y-=(up+y)*(-y)/(up)+1; photo.style['top']=y+"px"; if(y>-up) { setTimeout("sl_moveup()",50); } else { document.getElementById("center_photo_info").style['display']="none"; photo.style['top']="0px"; } } function sl_stop() { sl_on=false; sl_timer=setTimeout("sl_loop()",1000*3); clearTimeout(sl_timer); window.location=sl_list[npos]['url']; } function sl_change_interval() { sl_interval=document.getElementById("update_interval").value; if(sl_on) { clearTimeout(sl_timer); sl_timer=setTimeout("sl_loop()",1000*sl_interval); } } function sl_loop() { if(sl_on) { npos++; if(npos==sl_list_count)npos=0; big_img.src=sl_list[npos]['src']; big_img.alt=sl_list[npos]['name']; big_img.title=sl_list[npos]['name']; big_title.innerHTML=sl_list[npos]['name']; sl_timer=setTimeout("sl_loop()",1000*sl_interval); } }