rem: if ( (e_t - c_h) > w_t ) this.positionCalendarDiv(true); }.bindAsEventListener(this), 1); 
add: if ( (e_t - c_h) > w_t ) this.positionCalendarDiv(true); } }.bindAsEventListener(this), 1); 
context:   initialize: function(target_element, options) {    // initialize the date control    this.options = $H({      embedded: false,      time: false,      buttons: true,      year_range: 10,      calendar_div: nil,      close_on_click: nil,      minute_interval: 5,      onchange: nil    }).merge(options || {});        this.target_element = $(target_element); // make sure it's an element, not a string    this.selection_made = $F(this.target_element)!="";        if (this.target_element.calendar_date_select)    {      this.target_element.calendar_date_select.close();      return false;    }    this.target_element.calendar_date_select = this;        this.calendar_div = $(this.options['calendar_div']);    if (!this.target_element) { alert("Target element " + target_element + " not found!"); return false;}        this.parseDate();        // by default, stick it by the target element (if embedded, that's where we'll want it to show up)    if (this.calendar_div == nil) { this.calendar_div = $( this.options.embedded ? this.target_element.parentNode : document.body ).build('div'); }    if (!this.options.embedded) {      this.calendar_div.style.position = "absolute";      this.positionCalendarDiv();    }        this.calendar_div.addClassName("calendar_date_select");        if (this.options["embedded"]) this.options["close_on_click"]=false;    // logic for close on click    if (this.options['close_on_click']===nil )    {      if (this.options['time'])        this.options["close_on_click"] = false;      else        this.options['close_on_click'] = true;    }        // set the click handler to check if a user has clicked away from the document    if(!this.options["embedded"]) Event.observe(document.body, "mousedown", this.bodyClick_handler=this.bodyClick.bindAsEventListener(this));        this.initFrame();    if(!this.options["embedded"]) setTimeout(function(){      c_h = this.calendar_div.getDimensions().height; w_t = window.f_scrollTop();       if (( parseInt(this.calendar_div.style.top) + c_h ) > (w_t + window.f_height()))        e_t = Position.cumulativeOffset(this.target_element)[1];        if ( (e_t - c_h) > w_t ) // will it stay below the top of the window          this.positionCalendarDiv(true);      }.bindAsEventListener(this), 1);  },
meta: 9859	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9859/30d8af330dbaa292886956d853cafc7bb092fddb/calendar_date_select.js/buggy/public/javascripts/calendar_date_select.js