grazie mille... funziona facendo:

var sly=parseInt(document.documentElement.scrollTop);
eccetera. grazie