1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- var speed = 5;
- var currentpos=1;
- var timer;
- function img_zoom(e, o) //ͼƬÊó±ê¹öÂÖËõ·Å
- {
- var zoom = parseInt(o.style.zoom, 10) || 100;
- zoom += event.wheelDelta / 12;
- if (zoom > 0) o.style.zoom = zoom + '%';
- return false;
- }
- function setSpeed()
- {
- speed = parseInt(scrollspeed.value);
- if (speed < 1 || speed > 10){
- speed=5;
- scrollspeed.value=5;
- }
-
- }
- function stopScroll()
- {
- clearInterval(timer);
- }
- function beginScroll()
- {
- timer=setInterval("scrolling()",250/speed);
- }
- function scrolling()
- {
- //currentpos=document.documentElement.scrollTop;
- currentpos=document.body.scrollTop;
- window.scroll(0,++currentpos);
- //if(currentpos!=document.documentElement.scrollTop) clearInterval(timer);
- if(currentpos!=document.body.scrollTop) clearInterval(timer);
- }
- function saveSet()
- {
-
- parent.txtcolor1=txtcolor.selectedIndex;
- parent.fontsize1=fontsize.selectedIndex;
- parent.scrollspeed1=scrollspeed.value;
- }
- function loadSet()
- {
-
- txtcolor.selectedIndex=parent.txtcolor1;
- fontsize.selectedIndex=parent.fontsize1;
- if(parent.scrollspeed1!=undefined)
- scrollspeed.value=parent.scrollspeed1;
- else scrollspeed.value=5;
- setSpeed();
- //document.bgColor=bgcolor.options[bgcolor.selectedIndex].value;
- document.fgColor=txtcolor.options[txtcolor.selectedIndex].value;
- document.all.content.style.fontSize=fontsize.options[fontsize.selectedIndex].value;
- }
- document.onmousedown=stopScroll;
- document.ondblclick=beginScroll;
- loadSet();
|