if (top-scrollTop+height>clientHeight) {
        top = top - ((top+height) - (scrollTop+clientHeight));
        this.div.style.top = top + "px";
    }