public/javascripts/yui/calendar/calendar.js
function() {
        var cssClose = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,
            cssLinkClose = this.Style.CSS_LINK_CLOSE,
            DEPR_CLOSE_PATH = "us/my/bn/x_d.gif",
            
            lnk = Dom.getElementsByClassName(cssLinkClose, "a", this.oDomContainer)[0],
            strings = this.cfg.getProperty(DEF_CFG.STRINGS.key),
            closeStr = (strings && strings.close) ? strings.close : "";

        if (!lnk) {
            lnk = document.createElement("a");
            Event.addListener(lnk, "click", function(e, cal) {
                cal.hide(); 
                Event.preventDefault(e);
            }, this);
        }

        lnk.href = "#";
        lnk.className = cssLinkClose;

        if (Calendar.IMG_ROOT !== null) {
            var img = Dom.getElementsByClassName(cssClose, "img", lnk)[0] || document.createElement("img");
            img.src = Calendar.IMG_ROOT + DEPR_CLOSE_PATH;
            img.className = cssClose;
            lnk.appendChild(img);
        } else {
            lnk.innerHTML = '<span class="' + cssClose + ' ' + this.Style.CSS_CLOSE + '">' + closeStr + '</span>';
        }
        this.oDomContainer.appendChild(lnk);

        return lnk;
    }
function() {
        var cssClose = YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,
            cssLinkClose = this.Style.CSS_LINK_CLOSE,
            DEPR_CLOSE_PATH = "us/my/bn/x_d.gif",
            
            lnk = Dom.getElementsByClassName(cssLinkClose, "a", this.oDomContainer)[0],
            strings = this.cfg.getProperty(DEF_CFG.STRINGS.key),
            closeStr = (strings && strings.close) ? strings.close : "";

        if (!lnk) {
            lnk = document.createElement("a");
            Event.addListener(lnk, "click", function(e, cal) {
                cal.hide(); 
                Event.preventDefault(e);
            }, this);
        }

        lnk.href = "#";
        lnk.className = cssLinkClose;

        if (Calendar.IMG_ROOT !== null) {
            var img = Dom.getElementsByClassName(cssClose, "img", lnk)[0] || document.createElement("img");
            img.src = Calendar.IMG_ROOT + DEPR_CLOSE_PATH;
            img.className = cssClose;
            lnk.appendChild(img);
        } else {
            lnk.innerHTML = '<span class="' + cssClose + ' ' + this.Style.CSS_CLOSE + '">' + closeStr + '</span>';
        }
        this.oDomContainer.appendChild(lnk);

        return lnk;
    }
function ( ) { var cssClose = YAHOO . widget . CalendarGroup . CSS_2UPCLOSE , cssLinkClose = this . Style . CSS_LINK_CLOSE , DEPR_CLOSE_PATH = "us/my/bn/x_d.gif" , lnk = Dom . getElementsByClassName ( cssLinkClose , "a" , this . oDomContainer ) [ 0 ] , strings = this . cfg . getProperty ( DEF_CFG . STRINGS . key ) , closeStr = ( strings && strings . close ) ? strings . close : "" ; if ( ! lnk ) { lnk = document . createElement ( "a" ) ; Event . addListener ( lnk , "click" , function ( e , cal ) { cal . hide ( ) ; Event . preventDefault ( e ) ; } , this ) ; } lnk . href = "#" ; lnk . className = cssLinkClose ; if ( Calendar . IMG_ROOT !== null ) { var img = Dom . getElementsByClassName ( cssClose , "img" , lnk ) [ 0 ] || document . createElement ( "img" ) ; img . src = Calendar . IMG_ROOT + DEPR_CLOSE_PATH ; img . className = cssClose ; lnk . appendChild ( img ) ; } else { lnk . innerHTML = '<span class="' + cssClose + ' ' + this . Style . CSS_CLOSE + '">' + closeStr + '</span>' ; } this . oDomContainer . appendChild ( lnk ) ; return lnk ; }
Creates the close button HTML element and adds it to Calendar container DIV

@method createCloseButton
@return The close HTML element created
Creates the close button HTML element and adds it to Calendar container DIV