rem: self.handleDiv.onmousedown = function() { Cal.dragElem = self }; 
add: self.handleDiv.onmousedown = function() { cosmo.app.dragItem = self }; 
context: function ResizeArea(id, handleId) {        var self = this;        this.id = id;    this.handleId = handleId;    this.contentDiv = null;    this.handleDiv = null;    this.direction = 'down';    this.size = 0;    this.dragLimit = 0;    this.origSize = 0;    this.dragSize = 0;    this.adjacentArea = [];    this.init = function(dir, off) {        self.contentDiv = document.getElementById(this.id);        self.handleDiv = document.getElementById(this.handleId);        self.handleDiv.onmousedown = function() { Cal.dragElem = self };        self.direction = dir ? dir : this.direction;        self.origSize = this.getHeight(this.contentDiv) +             self.getHeight(this.handleDiv);        self.dragSize = self.origSize;            };    this.addAdjacent = function(id) {        var div = document.getElementById(id);        var incr = this.adjacentArea.length;        this.adjacentArea[incr] = new ResizeAreaAdjacent(            div, this.getAbsTop(div), this.getHeight(div));    };    this.setDragLimit = function() {        this.dragLimit = this.adjacentArea[0].origPos +             this.adjacentArea[0].origSize - TOP_MENU_HEIGHT -             ALL_DAY_RESIZE_HANDLE_HEIGHT;    };    this.compareNumbers = function(a, b) { return a - b };    this.resize = function() {        var offset = this.contentDiv.offsetTop;        var pos = yPos - TOP_MENU_HEIGHT;        var size = (pos - offset);        var div = null;        if (pos > offset && pos < this.dragLimit) {            this.contentDiv.style.height = size + 'px';            this.dragSize = (size + ALL_DAY_RESIZE_HANDLE_HEIGHT);            this.handleDiv.style.top = pos + 'px';            for (var i = 0; i < this.adjacentArea.length; i++) {                div = this.adjacentArea[i].div;                div.style.top = (pos+8) + 'px';                div.style.height = (((this.adjacentArea[i].origPos-yPos) +                     this.adjacentArea[i].origSize) - 8) + 'px';            }        }    };    this.drop = function() {        // Do nothing        // This function is called when ResizeArea is the draggable        // So drop method must be defined here    };    this.getAbsTop = function(div) {        return div.offsetTop + Cal.top;    };    this.getHeight = function(div) {        return div.offsetHeight;    };    this.cleanup = function() {        self.contentDiv = null;        self.handleDiv.onmousedown = null;        self.handleDiv = null;        for (var i = 0; i < self.adjacentArea.length; i++) {            self.adjacentArea[i].div = null;        }    };}
meta: 1859	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1859/884ad7d297ababcad4568a0588390640427a44f3/resize_area.js/clean/src/main/webapp/js/cosmo/ui/resize_area.js