b090e775a94315cf1fe9baab62e847a89c47eed6
tdreszer
  Thu Aug 4 17:34:04 2011 -0700
Restricted dragScroll to within the north-south boundaries and used the desired grabbing hands cursors.
diff --git src/hg/js/utils.js src/hg/js/utils.js
index d930bba..ad3cb90 100644
--- src/hg/js/utils.js
+++ src/hg/js/utils.js
@@ -935,34 +935,37 @@
 { // Sets up the waitMask to block page manipulation until cleared
 
     // Find or create the waitMask (which masks the whole page)
     var  waitMask = $('#waitMask');
     if( waitMask == undefined || waitMask.length != 1) {
         // create the waitMask
         $("body").append("<div id='waitMask' class='waitMask');'></div>");
         waitMask = $('#waitMask');
         // Special for IE, since it takes so long, make mask obvious
         if ($.browser.msie)
             $(waitMask).css({opacity:0.4,backgroundColor:'gray'});
     }
     $(waitMask).css('display','block');
 
     // Things could fail, so always have a timeout.
-    if(timeOutInMs == undefined || timeOutInMs <=0)
+    if(timeOutInMs == undefined || timeOutInMs ==0)
         timeOutInMs = 30000; // IE can take forever!
 
+    if (timeOutInMs > 0)
     setTimeout('waitMaskClear();',timeOutInMs); // Just in case
+
+    return waitMask;  // The caller could add css if they wanted.
 }
 
 function _launchWaitOnFunction()
 { // should ONLY be called by waitOnFunction()
   // Launches the saved function
     var func = gWaitFunc;
     gWaitFunc = null;
     var funcArgs = gWaitFuncArgs;
     gWaitFuncArgs = [];
 
     if(func == undefined || !jQuery.isFunction(func))
         warn("_launchWaitOnFunction called without a function");
     else {
         if(funcArgs.length == 0)
             func();