window.onLoad = displayEvents();

function displayEvents(){
         var list = getList();
         for (var n = 0; n<list.length; n++){
             var line = list[n].split("+");
			 document.write("<tr><td><table class='tableborder2' cellspacing='0' cellpadding='2' border='0' width='100%'>");
			 for (var m = 0; m<line.length; m++){
			 	if (m == 0){
					document.write("<tr><td class='bottomdashed' id='"+ line[m+1] +"'><div class='title'>"+ line[m] +"</div></td></tr>");
				}
				else if (m > 1){
					document.write("<tr><td>"+ line[m] +"</td></tr>");
				}	
				else{
					continue;
				}
			 }
			 document.write("</table></td></tr>");
         }
}

function getList(){
		     /*Array Layout
		     "Event Title + Reference Number + Date + Time + Location + Any Additional Information Seperated by +'s"

                     The last event line must not have an ending comma or nothing displays.
                     */
         var list = new Array(
             //"DSCC Board Meeting+1+Dates: Every Wednesday+Time: 4:30 p.m.+Location: 203 Coffman Union+Make a difference on campus!  Be part of the DSCC!  The DSCC is a great place for people with and without disabilities to get involved in campus life.  The DSCC is also looking for new board members, so come to a meeting and check it out!  Moreover, there are two special member positions that are currently open: co-secretary and treasurer.+The duties of the co-secretary include taking notes at all the board meetings, sending them to all of the board members, and filing the minutes in the DSCC archives.  Co-secretary is a board position and as such requires a time commitment of five volunteer hours spent at the DSCC office per week and regular attendance at meetings.+The duties of the treasurer include assisting the finances co-director in bookkeeping, balancing and creating budgets, preparing monthly financial updates for the board, and helping to compile the annual student services fees request report.  The position of treasurer is also similar to an apprenticeship; the finaces co-director will train the treasurer on all of the DSCC's financial activities so that the treasurer can eventually become the finances co-director, which is a paid position.  Time commitment is five volunteer hours spent at the DSCC office per week and regular attendance at meetings.",
             //"Mental Disability and Human Rights: International Human Rights Advocacy for Persons with Disabilities and the UN Disabilities Rights Convention+2+Date: Friday, April 17, 2009+Time: 12:00 p.m.-1:30 p.m.+Location: Room 1-300 Mayo Building+Over the last 15 years, Mental Disability Rights International (MDRI) has investigated the living conditions and treatment of people with mental disabilities in dozens of countries in Europe, the Americas, and the Middle East and has worked with leaders in governments and disability communities to advance policy, practice and inclusive social changes consistent with recognition of the dignity, development, rights, and social openness to persons with mental disabilities. Eric Rosenthal, J.D., MDRI's Executive Director, will give a public lecture on MDRI's work to end human rights abuses against people with mental disabilities.  Co-sponsored by the Program in Human Rights and Health, University of Minnesota; Human Rights Minor Program, University of MN; Advocates for Human Rights; PeaceJam"
             //"D.A.M. Kick-off+3+Date: Friday, September 28th+Time: 11:30 a.m.-2:30 p.m.+Location: Northrop Plaza+Just how many student groups get to have a D.A.M. event like this one?  October is Disability Awareness Month (D.A.M.) and we're starting it off with a heck of a lot of fun!  Join us for a wheelchair basketball game and relay race (that YOU get to participate in) and other exciting activities.   Mark your calendars and meet us there!"
             //"Lunch and Learn+4+Date: Friday, May 4th+Time: 11:30AM - 1:00PM+Location: Coffman Union, Room 203"
             //"Spring Jam+5+Date: Wednesday, October 4th+Time: All Day+Location: Downtown Minneapolis+Lots of recruiters from across the country will be on hand for you to schmooze with.  Pre-registration is required.  Contact the DSCC for more information.",
             // "Lunch and Learn with AmeriCorps+3+Date: Friday, October 6th+Time: 11:30AM - 1:00PM+Location: DSCC Office, Coffman Union, Room 203+Ryan Kelley from AmeriCorps will be on hand to discuss volunteer opportunities.  Free food and ice cream."
        );
        return list;
}
