this.setX( Math.round( ( this.parent.width - this.getTextWidth())/2.0) - 2); this.setWidth (this.getTextWidth()+2); this.parent.monthtitleshdw.setWidth (this.getTextWidth()+2); parent.setVisible( true ); var now = new Date(); this.setMonthAndYear(now.getMonth(), now.getFullYear()); parent.fadeUp.doStart(); this.enddate) return null; // to deal with daylight savings and such, we find an // approximate date and then refine it by looking at // the start and end of the dayviews var d = Math.round((t.getTime() - this.startdate.getTime()) / 86400000); // NOTE: 86400000 represents one day in miliseconds if (d >= this.subviews.length) d = this.subviews.length - 1 if (d < 0) d = 0; var dv = this.subviews[d]; while (dv.startdate > t) { d--; dv = this.subviews[d]; } while (dv.enddate <= t) { d++; dv = this.subviews[d]; } return dv; ]]> var prvmonth = this.month - 1; var prvyear = this.year; if (this.month == 0) { prvmonth = 11; prvyear -= 1; } this.setMonthAndYear(prvmonth,prvyear); var nxtmonth = this.month + 1; var nxtyear = this.year; if (this.month == 11) { nxtmonth = 0; nxtyear += 1; } var t = getTimer(); this.setMonthAndYear(nxtmonth,nxtyear); if (global['mytext'] != null) mytext.setText( getTimer() -t ); gridlayout.doanimation = false; this.setWidth(this.parent.width - 208); gridlayout.doanimation = false; this.setWidth(this.parent.width); //This method is a helper for setDates this.month) { this.enddate.setTime(this.enddate.getTime() - 86400000); //step back a day this.gridlayout.setAttribute('rows',5); } else { this.enddate.setTime(this.enddate.getTime() + 86400000*6); //set for next sat this.gridlayout.setAttribute('rows',6); } ]]> slideInTopPanel.doStart(); // make the top panel slide in loadingView.destroy();