home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 December
/
Chip_2001-12_cd1.bin
/
internet
/
archeo
/
reportaze
/
scrollbar.js
< prev
Wrap
Text File
|
2001-10-02
|
2KB
|
54 lines
if (iens6){
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
}
else if (ns4){
var crossobj=document.nscontainer.document.nscontent
var contentheight=crossobj.clip.height
}
scShift=(400-54)/(contentheight/speed);
scShift=Math.floor(scShift);
function movedown()
{
if (parseInt(document.getElementById('scrol').style.top)<384-54)
{
document.getElementById('scrol').style.top=parseInt(document.getElementById('scrol').style.top)+scShift;
}
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",100)
}
function moveup()
{
if (parseInt(document.getElementById('scrol').style.top)>16)
{
document.getElementById('scrol').style.top=parseInt(document.getElementById('scrol').style.top)-scShift;
}
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed
else if (ns4&&crossobj.top<=0)
crossobj.top+=speed
moveupvar=setTimeout("moveup()",100)
}
function moveDownBySC()
{
event.clientY
if (iens6&&parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed
}
function getcontent_height(){
if (iens6)
contentheight=crossobj.offsetHeight
else if (ns4)
document.nscontainer.document.nscontent.visibility="show"
}
window.onload=getcontent_height