context: 	function dynCalendar_show()	{		// Variable declarations to prevent globalisation		var month, year, monthnames, numdays, thisMonth, firstOfMonth;		var ret, row, i, cssClass, linkHTML, previousMonth, previousYear;		var nextMonth, nextYear, prevImgHTML, prevLinkHTML, nextImgHTML, nextLinkHTML;		var monthComboOptions, monthCombo, yearComboOptions, yearCombo, html;				this.currentMonth = month = arguments[0] != null ? arguments[0] : this.currentMonth;		this.currentYear  = year  = arguments[1] != null ? arguments[1] : this.currentYear;		monthnames = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');		numdays    = this._getDaysInMonth(month, year);		thisMonth    = new Date(year, month, 1);		firstOfMonth = thisMonth.getDay();		// First few blanks up to first day		ret = new Array(new Array());		for(i=0; i<firstOfMonth; i++){			ret[0][ret[0].length] = '<td>&nbsp;</td>';		}		// Main body of calendar		row = 0;		i   = 1;		while(i <= numdays){			if(ret[row].length == 7){				ret[++row] = new Array();			}			/**            * Generate this cells' HTML            */			cssClass = (i == this.date && month == this.month && year == this.year) ? 'dynCalendar_today' : 'dynCalendar_day';			linkHTML = '<a href="javascript: ' + this.callbackFunc + '(' + i + ', ' + (Number(month) + 1) + ', ' + year + '); ' + this.objName + '._hideLayer()">' + (i++) + '</a>';			ret[row][ret[row].length] = '<td align="center" class="' + cssClass + '">' + linkHTML + '</td>';		}		// Format the HTML		for(i=0; i<ret.length; i++){			ret[i] = ret[i].join('\n') + '\n';		}		previousYear  = thisMonth.getFullYear();		previousMonth = thisMonth.getMonth() - 1;		if(previousMonth < 0){			previousMonth = 11;			previousYear--;		}				nextYear  = thisMonth.getFullYear();		nextMonth = thisMonth.getMonth() + 1;		if(nextMonth > 11){			nextMonth = 0;			nextYear++;		}		//prevImgHTML  = '<img src="' + this.imagesPath + '/prev.gif" alt="<<" border="0" />';    prevImgHTML  = '&lt;&lt;';		prevLinkHTML = '<a href="javascript: ' + this.objName + '.show(' + previousMonth + ', ' + previousYear + ')">' + prevImgHTML + '</a>';		//nextImgHTML  = '<img src="' + this.imagesPath + '/next.gif" alt="<<" border="0" />';    nextImgHTML  = '&gt;&gt;';		nextLinkHTML = '<a href="javascript: ' + this.objName + '.show(' + nextMonth + ', ' + nextYear + ')">' + nextImgHTML + '</a>';		/**        * Build month combo        */		if (this.useMonthCombo) {			monthComboOptions = '';			for (i=0; i<12; i++) {				selected = (i == thisMonth.getMonth() ? 'selected="selected"' : '');				monthComboOptions += '<option value="' + i + '" ' + selected + '>' + monthnames[i] + '</option>';			}			monthCombo = '<select name="months" onchange="' + this.objName + '.show(this.options[this.selectedIndex].value, ' + this.objName + '.currentYear)">' + monthComboOptions + '</select>';		} else {			monthCombo = monthnames[thisMonth.getMonth()];		}				/**        * Build year combo        */		if (this.useYearCombo) {			yearComboOptions = '';			for (i = thisMonth.getFullYear() - this.yearComboRange; i <= (thisMonth.getFullYear() + this.yearComboRange); i++) {				selected = (i == thisMonth.getFullYear() ? 'selected="selected"' : '');				yearComboOptions += '<option value="' + i + '" ' + selected + '>' + i + '</option>';			}			yearCombo = '<select style="border: 1px groove" name="years" onchange="' + this.objName + '.show(' + this.objName + '.currentMonth, this.options[this.selectedIndex].value)">' + yearComboOptions + '</select>';		} else {			yearCombo = thisMonth.getFullYear();		}		html = '<table class="dynCalendar_table" cellspacing="0">';		html += '<tr><td class="dynCalendar_header">' + prevLinkHTML + '</td><td colspan="5" align="center" class="dynCalendar_header">' + monthCombo + ' ' + yearCombo + '</td><td align="right" class="dynCalendar_header">' + nextLinkHTML + '</td></tr>';		html += '<tr>';		html += '<td class="dynCalendar_dayname">Su</td>';		html += '<td class="dynCalendar_dayname">Mo</td>';		html += '<td class="dynCalendar_dayname">Tu</td>';		html += '<td class="dynCalendar_dayname">We</td>';		html += '<td class="dynCalendar_dayname">Th</td>';		html += '<td class="dynCalendar_dayname">Fr</td>';		html += '<td class="dynCalendar_dayname">Sa</td></tr>';		html += '<tr>' + ret.join('</tr>\n<tr>') + '</tr>';		html += '</table>';		this._setHTML(html);		if (!arguments[0] && !arguments[1]) {			this._showLayer();			this._setLayerPosition();		}	}
meta: 4931	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4931/29826c9ec48639e18e51b183116eec52acf9ce79/dynCalendarWidget.js/clean/calendar3/deployment/webadmin/webapp/resources/resources/dynCalendarWidget.js