function displaycalendar (display) {
	document.getElementById('calendar').innerHTML=display;

	//Stylistic Info
	var cells = document.getElementById('calendar').getElementsByTagName('td');
	var length = cells.length;
	for (i=0;i<length;i++) {
		var a = cells[i].getElementsByTagName('a');
		if ( a.length == 1 ) {
			cells[i].style.backgroundColor="orange";
		}
	}

	return false;
}

start = "<div class='cinfo'>";
back = "<p><a href='' onclick='return displaycalendar(ctable)'>Back to Calendar</a></p></div>";

c = new Array();

c[3] = start;
c[3] = c[3] + "<p>Wed. March 3 at 12:00 PM<br />";
c[3] = c[3] + "Christian the Magician at the City Museum<br />";
c[3] = c[3] + back;

c[5] = start;
c[5] = c[5] + "<p>Fri. March 5 at 8:00 PM<br />";
c[5] = c[5] + "Circus Harmony Performers at the City Museum<br />";
c[5] = c[5] + "&nbsp;<br />";
c[5] = c[5] + "12:00 PM<br />";
c[5] = c[5] + "Christian the Magician at the City Museum<br />";
c[5] = c[5] + back;

c[6] = start;
c[6] = c[6] + "<p>Sat. March 6 at 1:00 &amp; 3:00 PM<br />";
c[6] = c[6] + "Saint Louis Arches at the City Museum<br />";
c[6] = c[6] + back;

c[7] = start;
c[7] = c[7] + "<p>Sun. March 7 at 1:00 &amp; 3:00 PM<br />";
c[7] = c[7] + "Youth Circus Showcase at the City Museum<br />";
c[7] = c[7] + back;

c[10] = start;
c[10] = c[10] + "<p>Wed. March 10 at 12:00 PM<br />";
c[10] = c[10] + "Christian the Magician at the City Museum<br />";
c[10] = c[10] + back;

c[12] = start;
c[12] = c[12] + "<p>Fri. March 12 at 8:00 PM<br />";
c[12] = c[12] + "Circus Harmony Performers at the City Museum<br />";
c[12] = c[12] + "&nbsp;<br />";
c[12] = c[12] + "12:00 PM<br />";
c[12] = c[12] + "Christian the Magician at the City Museum<br />";
c[12] = c[12] + back;

c[13] = start;
c[13] = c[13] + "<p>Sat. March 13 at 1:00 &amp; 3:00 PM<br />";
c[13] = c[13] + "Saint Louis Arches at the City Museum<br />";
c[13] = c[13] + back;

c[14] = start;
c[14] = c[14] + "<p>Sun. March 14 at 1:00 &amp; 3:00 PM<br />";
c[14] = c[14] + "Youth Circus Showcase at the City Museum<br />";
c[14] = c[14] + back;

c[15] = start;
c[15] = c[15] + "<p>Mon. March 15 at 12:00 &amp; 2:00 PM<br />";
c[15] = c[15] + "Christian the Magician at the City Museum<br />";
c[15] = c[15] + back;

c[16] = start;
c[16] = c[16] + "<p>Tues. March 16 at 12:00 &amp; 2:00 PM<br />";
c[16] = c[16] + "Magic by Steve Corbitt at the City Museum<br />";
c[16] = c[16] + back;

c[17] = start;
c[17] = c[17] + "<p>Wed. March 17 at 12:00 &amp; 2:00 PM<br />";
c[17] = c[17] + "Christian the Magician at the City Museum<br />";
c[17] = c[17] + back;

c[18] = start;
c[18] = c[18] + "<p>Thurs. March 18 at 12:00 &amp; 2:00 PM<br />";
c[18] = c[18] + "Magic by Steve Corbitt at the City Museum<br />";
c[18] = c[18] + back;

c[19] = start;
c[19] = c[19] + "<p>Fri. March 19 at 8:00 PM<br />";
c[19] = c[19] + "Circus Harmony Performers at the City Museum<br />";
c[19] = c[19] + "&nbsp;<br />";
c[19] = c[19] + "12:00 &amp; 2:00 PM<br />";
c[19] = c[19] + "Christian the Magician at the City Museum<br />";
c[19] = c[19] + back;

c[20] = start;
c[20] = c[20] + "<p>Sat. March 20 at 1:00 &amp; 3:00 PM<br />";
c[20] = c[20] + "Saint Louis Arches at the City Museum<br />";
c[20] = c[20] + back;

c[21] = start;
c[21] = c[21] + "<p>Sun. March 21 at 1:00 &amp; 3:00 PM<br />";
c[21] = c[21] + "Youth Circus Showcase at the City Museum<br />";
c[21] = c[21] + back;

c[22] = start;
c[22] = c[22] + "<p>Mon. March 22 at 2:00 PM<br />";
c[22] = c[22] + "Youth Circus Showcase at the City Museum<br />";
c[22] = c[22] + "&nbsp;<br />";
c[22] = c[22] + "12:00 PM<br />";
c[22] = c[22] + "Christian the Magician at the City Museum<br />";
c[22] = c[22] + back;

c[23] = start;
c[23] = c[23] + "<p>Tues. March 23 at 12:00 &amp; 2:00 PM<br />";
c[23] = c[23] + "Magic by Steve Corbitt at the City Museum<br />";
c[23] = c[23] + back;

c[24] = start;
c[24] = c[24] + "<p>Wed. March 24 at 2:00 PM<br />";
c[24] = c[24] + "Youth Circus Showcase at the City Museum<br />";
c[24] = c[24] + "&nbsp;<br />";
c[24] = c[24] + "12:00 PM<br />";
c[24] = c[24] + "Christian the Magician at the City Museum<br />";
c[24] = c[24] + back;

c[25] = start;
c[25] = c[25] + "<p>Thurs. March 25 at 12:00 &amp; 2:00 PM<br />";
c[25] = c[25] + "Magic by Steve Corbitt at the City Museum<br />";
c[25] = c[25] + back;

c[26] = start;
c[26] = c[26] + "<p>Fri. March 26 at 2:00 PM<br />";
c[26] = c[26] + "Youth Circus Showcase at the City Museum<br />";
c[26] = c[26] + "&nbsp;<br />";
c[26] = c[26] + "12:00 PM<br />";
c[26] = c[26] + "Christian the Magician at the City Museum<br />";
c[26] = c[26] + "&nbsp;<br />";
c[26] = c[26] + "8:00 PM<br />";
c[26] = c[26] + "Circus Harmony Performers at the City Museum<br />";
c[26] = c[26] + back;

c[27] = start;
c[27] = c[27] + "<p>Sat. March 27 at 1:00 &amp; 3:00 PM<br />";
c[27] = c[27] + "Saint Louis Arches at the City Museum<br />";
c[27] = c[27] + back;

c[28] = start;
c[28] = c[28] + "<p>Sun. March 28 at 1:00 &amp; 3:00 PM<br />";
c[28] = c[28] + "Youth Circus Showcase at the City Museum<br />";
c[28] = c[28] + back;

c[29] = start;
c[29] = c[29] + "<p>Mon. March 29 at 12:00 PM<br />";
c[29] = c[29] + "Christian the Magician at the City Museum<br />";
c[29] = c[29] + back;

c[31] = start;
c[31] = c[31] + "<p>Wed. March 31 at 12:00 PM<br />";
c[31] = c[31] + "Christian the Magician at the City Museum<br />";
c[31] = c[31] + back;

ctable = "<table><tr><td colspan='7'>March, 2010</td></tr>";
ctable = ctable + "<tr><td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td></tr>";
ctable = ctable + "<tr><td>&nbsp;</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td></tr>"; 
ctable = ctable + "<tr><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td><td>13</td></tr>"; 
ctable = ctable + "<tr><td>14</td><td>15</td><td>16</td><td>17</td><td>18</td><td>19</td><td>20</td></tr>"; 
ctable = ctable + "<tr><td>21</td><td>22</td><td>23</td><td>24</td><td>25</td><td>26</td><td>27</td></tr>"; 
ctable = ctable + "<tr><td>28</td><td>29</td><td>30</td><td>31</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>";
ctable = ctable + "</table>";


		for(i=1;i<=31;i++) {
			if(c[i]) {
				var td = "<td>" + i + "</td>"
				var tda = "<td><a href='' onclick='return displaycalendar(c[" + i + "])'>" + i + "</a></td>";
				var ctable = ctable.replace(td, tda);
			}
		}

displaycalendar(ctable);