recordsToDiplay = 2;
CalEvent = [
	['Sept 20, 2011', 'September 20th, 2011','6th Annual Fall Ethics Symposium: Dimensions of Ethics in Research', '8:30am-4:30pm, Ballroom III, University Union, Sacramento State'], 
	['October 14, 2011', 'October 14th, 2011', 'Workshop: Introducing Ethics Through Case Study', 'Noon - 1:30pm, Center for Teaching and Learning, Library 4026, Sacramento State'],
	['November 2, 2011', 'November 2nd, 2011', 'Death with Dignity, Screening and Panel Discussion', '2:00-5:00pm, Orchard Suite, University Union, Sacramento State'],
	['November 2, 2011', 'November 2nd, 2011', '"Genocide and Other Extensive Evils: Enablers, Perpetrators, Resisters", Dr. Elizabeth Minnich, AAC&U', '4:00-5:30pm, Ballroom I, University Union, Sacramento State'],
	['November 21, 2011', 'November 21st, 2011', 'Dr. Joseph Lynch, Cal Poly San Luis Obispo', 'God and Animal Zombies', '1:30-2:45pm, Forest Suite, University Union'],
	['February 7, 2012', 'February 7th, 2012', 'Dr. Peggy Lemaux, University of California Division of Agriculture and Natural Resources Biotechnology Workgroup', 'How Much Did You Spend on Your Lunch Today?', '1:30-2:45pm, Orchard Suite, University Union'],
	['February 21, 2012', 'February 21st, 2012', 'Dr. Marina Oshana, University of California, Davis', 'A Commitment to Autonomy Is a Commitment to Feminism', '1:30-2:45pm, Hinde Auditorium, University Union'],
	['March 6, 2012', 'March 6th, 2012', 'Dr. Michael Austin, Eastern Kentucky University', 'A Sound Mind in a Sound Body: Sports for the Sake of the Soul','1:30-2:45pm, Hinde Audirotium, University Union'],
	[],
	[],
	[]
	
];


var i = 0;
var j = 0;
var today = new Date();
var myDate;

while(i < CalEvent.length) {

	if(j >= recordsToDiplay) { break; }

	myDate = new Date(CalEvent[i][0]);
	
	// add one day (for display on the day of the event)
	myDate.setDate(myDate.getDate() + 1);
	
	if(myDate > today) {
		
		document.writeln("<li class=\"calendarStyle\">");
		document.writeln("<div class=\"calendarDate\">" + CalEvent[i][1] + "</div>");
		document.writeln("<a href=\"campus_events.htm#" + [i+1] + "\">");
		document.writeln("<div class=\"calendarInfo\">" + "<i>" +CalEvent[i][2] + "</i>" + "</div>");
		document.writeln("<div class=\"calendarInfo\">" + CalEvent[i][3] + "</div>");
		document.writeln("</a>");
		document.writeln("</li>");
		
		j++;

	}

	i++;
		
}
