includes/clientside/static/functions.js
changeset 704 077887be639d
parent 699 c7d737202d59
child 727 591562495e87
--- a/includes/clientside/static/functions.js	Sat Aug 23 16:03:13 2008 -0400
+++ b/includes/clientside/static/functions.js	Sat Aug 23 16:03:32 2008 -0400
@@ -452,10 +452,16 @@
     object.filter = "alpha(opacity=" + opacity + ")";
 }
 
-function getScrollOffset()
+function getScrollOffset(el)
 {
   var position;
-  if (self.pageYOffset)
+  var s = el || self;
+  el = el || document;
+  if ( el.scrollTop )
+  {
+    position = el.scrollTop;
+  }
+  else if (s.pageYOffset)
   {
     position = self.pageYOffset;
   }