	/*
	  Setup the calendar.
	*/
	function makeCalendar(yearEntered,monthEntered,linkList) {
        // monthEntered is not zero based. It is based on Jan = 1 and Dec = 12
		// not Jan = 0 and Dec = 11
		var output = " ";
	    var whatIsIt = "JanFebMarAprMayJunJulAugSepOctNovDec";
    	var theSetDate = new Date(); 
		var today = new Date();
		var thisDay;
	    var monthDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
		if (yearEntered > -1 && monthEntered > -1) {
          theSetDate.setFullYear(yearEntered,monthEntered-1);
		}
	    year=theSetDate.getFullYear(); 
		thisDay = theSetDate.getDate();

		// Check for leap year
	    if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
    	    monthDays[1] = 29; 

		nDays = monthDays[theSetDate.getMonth()];
    	IsitNow = theSetDate; 
		IsitNow.setDate(1); 
		FindOut = IsitNow.getDate();

	    if (FindOut == 2) 
		    IsitNow.setDate(0); 

		startDay = IsitNow.getDay();
    	output += "<table border=0 bgcolor=white class=calendar>";
	    output += "<tr><td colspan=7 align=center><b>";
    	output += whatIsIt.substring(theSetDate.getMonth() * 3, (theSetDate.getMonth() + 1) * 3);
	    output += " "; 
		output += year;
	    output += "</b></td></tr><tr class=tableH><th>Sun</th><th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th></tr>";
    	output += "<tr>";
	    column = 0; 
		for (i=0; i<startDay; i++) {
    		output += "<td width=35 bgcolor=white>";
	    	column++;
		}
        
		if (today.getMonth() > theSetDate.getMonth())
		    thisDay = nDays+1;

		for (i=1; i<=nDays; i++) {
		    var dateLookFor = new Date();
			dateLookFor.setFullYear(year,theSetDate.getMonth(),i);
			var dms = dateLookFor.setHours(0,0,0,0);

			// Activate the date if it is there is an entry for it.
			var activate = 32;
			if (linkList != null) {
				for (listIdx=0; listIdx < linkList.length; listIdx++) {
	    	       if (linkList[listIdx].name == i) {
    	    	       activate = linkList[listIdx].name;
        			   break;
				   }
				}
			}

    		output += "</td><td width=35 bgcolor=white>";
   			if (i == activate)
    		    output += "<a href=\"javascript:location.replace('#"+activate+"');\">";
        	if (i == thisDay)
    	    	output +="<font color=\"red\"><b>";
	        output += i;
	    	if (i == thisDay)
    	    	output +="</b></font>";
			if (i == activate) 
		        output += "</a>";
			column++;
			if (column == 7) {
				output += "</td></tr></tr>"; 
				column = 0;
			}
		}
		output += "</tr></table>";
        return output;
	}
