function watchTop(top) {
      if (top >= fixTop) {
        var bottom = docHeight - doc.documentElement.scrollTop - fixHeight
        if (bottom <= footerHeight) {
          oFix.style.position = 'absolute'
          oFix.style.top = 'auto'
          oFix.style.bottom = footerHeight + 'px'
        } else {
          oFix.style.position = 'fixed'
          oFix.style.top = 0
          oFix.style.left = fixLeft
          oFix.style.width = fixWidth + 'px'
          oFix.style.height = fixHeight + 'px'
        }
      } else {
        oFix.style.position = 'static'
      }
    }
// watch scrolltop to fixed or not
watch scrolltop to fixed or not
watch scrolltop to fixed or not
function watchTop(top) {
      if (top >= fixTop) {
        var bottom = docHeight - doc.documentElement.scrollTop - fixHeight
        if (bottom <= footerHeight) {
          oFix.style.position = 'absolute'
          oFix.style.top = 'auto'
          oFix.style.bottom = footerHeight + 'px'
        } else {
          oFix.style.position = 'fixed'
          oFix.style.top = 0
          oFix.style.left = fixLeft
          oFix.style.width = fixWidth + 'px'
          oFix.style.height = fixHeight + 'px'
        }
      } else {
        oFix.style.position = 'static'
      }
    }
function watchTop ( top ) { if ( top >= fixTop ) { var bottom = docHeight - doc . documentElement . scrollTop - fixHeight if ( bottom <= footerHeight ) { oFix . style . position = 'absolute' oFix . style . top = 'auto' oFix . style . bottom = footerHeight + 'px' } else { oFix . style . position = 'fixed' oFix . style . top = 0 oFix . style . left = fixLeft oFix . style . width = fixWidth + 'px' oFix . style . height = fixHeight + 'px' } } else { oFix . style . position = 'static' } }
watch scrolltop to fixed or not
watch scrolltop to fixed or not