rem: function NavButtonSet(id, leftHandler, rightHandler) { 
add: cosmo.ui.button.NavButtonSet = function(id, leftHandler, rightHandler) { 
context: function NavButtonSet(id, leftHandler, rightHandler) {    var self = this;    // Private method to create the button-set table    var doButtonTable = function() {        var nbTable = document.createElement('table');        var nbTBody = document.createElement('tbody');        var nbRow = document.createElement('tr');        var nbDivider = null;        nbTable.style.width = '45px';        nbTable.style.height = '18px';        nbTable.cellPadding = '0px'; // Note camelCaps here, fun!! :)        nbTable.cellSpacing = '0px'; // More camelCaps, yay!        nbTable.appendChild(nbTBody);        nbTBody.appendChild(nbRow);        // Left endcap        nbRow.appendChild(doButtonSetCap('Left', leftHandler));        // Left arrow        nbRow.appendChild(doButtonSetCenter('Left', leftHandler));        // Divider cell        nbDivider = document.createElement('td');        nbDivider.id = id + 'ButtonDivider';        nbDivider.style.width = '1px';        nbDivider.style.height = '18px';        nbDivider.style.lineHeight = '1px';        nbDivider.style.background = '#aaaaaa';        nbRow.appendChild(nbDivider);        // Right arrow        nbRow.appendChild(doButtonSetCenter('Right', rightHandler));        // Right endcap        nbRow.appendChild(doButtonSetCap('Right', rightHandler));        return nbTable;    }    // Private method to make the endcaps    var doButtonSetCap = function(side, clickHandler) {        var nbData = document.createElement('td');        var lowerCaseSide = side.toLowerCase();        nbData.id = id + side;        nbData.style.width = '9px';        nbData.style.height = '18px';        nbData.style.lineHeight = '18px';        nbData.style.cursor = 'pointer';        nbData.style.background = 'url(' + BUTTON_DIR_PATH +            'button_' + lowerCaseSide + '_sm.gif)';        nbData.onmouseover = function() { self.rolloverHandler(side, 'lit'); }        nbData.onmouseout = function() { self.rolloverHandler(side, ''); }        nbData.onclick = clickHandler;        return nbData;    }    // Private method to make the center arrow cells    var doButtonSetCenter = function(side, clickHandler) {        var nbData = document.createElement('td');        var nbImg = document.createElement('img');        var lowerCaseSide = side.toLowerCase();        nbData.id = id + 'Center' + side;        nbData.style.width = '13px';        nbData.style.height = '18px';        nbData.style.lineHeight = '18px';        nbData.style.textAlign = lowerCaseSide;        nbData.style.background = 'url(' + BUTTON_DIR_PATH +            'button_center_sm.gif)';        nbData.style.backgroundRepeat = 'repeat-x';        nbData.style.cursor = 'pointer';        nbImg.src = BUTTON_DIR_PATH + 'nav_arrow_' +            lowerCaseSide + '.gif';        nbData.appendChild(nbImg);        nbData.onmouseover = function() { self.rolloverHandler(side, 'lit'); }        nbData.onmouseout = function() { self.rolloverHandler(side, ''); }        nbData.onclick = clickHandler;        return nbData;    }    // Main properties and methods    // ========    this.id = id;    this.domNode = doButtonTable();    this.rolloverHandler = function(side, state) {        // Do the rollover for the entire button set together        // Doing just one side at a time looks freaky        this.doRollover(side, state);    };    this.doRollover = function(side, state) {        var btnSide = side.toLowerCase();        var btnState = state ? '_' + state : '';        var dividerColor = state == 'lit' ? '#000000' : '#aaaaaa';        document.getElementById(this.id + 'Center' + side).style.background =            'url(' + BUTTON_DIR_PATH + 'button_center' + btnState + '_sm.gif)';        document.getElementById(this.id + side).style.background =            'url(' + BUTTON_DIR_PATH + 'button_' + btnSide + btnState + '_sm.gif)';        document.getElementById(this.id + 'ButtonDivider').style.background = dividerColor;    };}
meta: 1859	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1859/22e60a56b01dc4984a78fe5844e4803b8d843b0e/button.js/clean/src/main/webapp/js/cosmo/ui/button.js