function todayViewScroll(height) {

   var obj = document.getElementById('innerTodayViewLayer');   
   var top = parseInt(obj.style.top) + height;

   if((height<0)&&(obj.offsetHeight<=Math.abs(top)))  return false;
   else if(height>0&&(top>0)) return false;

   obj.style.top = top + 'px';

}

function initQuickmenu(layerId, marginTop) {

   this.obj = document.getElementById(layerId);
   this.Body = null;
   this.timer = null;
   this.marginTop = marginTop ? marginTop : 0;
   this.top = marginTop ? marginTop : 0;
   this.saveTop = this.obj.offsetTop;

   var This = this;

   $(window).scroll(function() {

      var objTop = This.obj.style.top ? parseInt(This.obj.style.top) : parseInt(This.obj.offsetTop);
      var bodyTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + This.marginTop;
      var moveY = Math.abs(objTop-bodyTop);

      if(bodyTop>objTop) This.obj.style.top = (objTop + moveY) + 'px';
      else This.obj.style.top = (objTop - moveY) + 'px'; 

   });

}
