home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2004 December
/
PCWorld_2004-12_cd.bin
/
software
/
komercni
/
netgenium
/
NETGenium.msi
/
_B4A5F9DE730F039E0CBFC30C1A8A8467
/
_6102036D01FF452B993EC62D00B3A243
< prev
next >
Wrap
Text File
|
2004-10-01
|
1KB
|
46 lines
<PUBLIC:COMPONENT>
<PUBLIC:ATTACH EVENT="onmousedown" ONEVENT="fnDown()" />
<PUBLIC:ATTACH EVENT="onclick" ONEVENT="event.cancelBubble = true;" />
<PUBLIC:ATTACH EVENT="ondblclick" ONEVENT="event.cancelBubble = true;" />
<SCRIPT LANGUAGE="JScript">
function fnDown()
{
element.value_ = jsNumber(element.hf.value);
element.clientY_ = event.clientY;
event.srcElement.ondragstart = fnCancel;
window.document.attachEvent("onmousemove", fnMove);
window.document.attachEvent("onscroll", fnMove);
window.document.attachEvent("onmouseup", fnUp);
window.document.attachEvent("onselectstart", fnCancel);
}
function fnMove()
{
var n = element.value_ + event.clientY - element.clientY_;
if (n < 0) n = 0;
if (n > element.hf.max) n = element.hf.max;
element.hf.value = element.style.marginTop = n;
element.style.marginBottom = element.hf.max - n;
element.hf.fireEvent("onchange");
}
function fnUp()
{
window.document.detachEvent("onmousemove" , fnMove);
window.document.detachEvent("onscroll" , fnMove);
window.document.detachEvent("onmouseup" , fnUp);
window.document.detachEvent("onselectstart", fnCancel);
}
function fnCancel()
{
return false;
}
</SCRIPT>
</PUBLIC:COMPONENT>