// Javascript script to manage events
// by Diane, last modified (aside from the events list) 8/20/07

// Instructions:
// The only part you modify is the events array.
// The events array is an array holding event objects.
// Each event has a date and time (arbitrary string), a description
// (another arbitrary string), a filename of a flyer (specify "none" if there
// is no flyer), and the name of a directory holding photos (specify "none"
// if there aren't any, should be default for upcoming events).
// Add new events to the END of the array, and the last three events in the
// array will be displayed on the main page.  The rest will be displayed
// on the Past Events page, in reverse order.

//Each event is...an event
function event(dt, d, f, p, y)
{
	this.dateAndTime=dt;
	this.description=d;
	this.flyerAddress=f;
	this.photos=p;
	this.year=y;
}

//Add new events to the END of the array!!
var events=new Array();
events[0]=new event("November 8", 
	"WiCS (first!) General Interest Meeting", "none", "fall06gim", 2006);
events[1]=new event("November 15", "Women in Computer Science panel",
	"none", "women_in_cs_panel", 2006);
events[2]=new event("Wednesday, February 14 @ 1pm",
		'WiCS Topic Review, "Love Your Computer", featuring Justin, our treasurer :) He will be giving a presentation on "how your computer works" and will cover such topics as Digital Logic Design. Good review for those of you studying for the Systems qual!', "feb14event.jpg", "love_your_computer", 2007);
events[3]=new event("Thursday, February 22 @ 7pm",
		"WiCS Movie Night, featuring Contact. Come on over to CS 2129 for good times and good snacks :)", "feb22event.pdf", "none", 2007);
events[4]=new event("Wednesday, February 28 @ 1pm",
		"Meet with SBCS and LUGSB (and obviously WiCS) in the Ping Pong Room (CS 1211) to discuss plans for the Roth Regatta.", "none", "none", 2007);
events[5]=new event("Wednesday, March 20 @ 7pm",
		"Meet with SBCS and LUGSB (and of course WiCS) in CS 1441 to finalize plans for the Roth Regatta.", "none", "none", 2007);	
events[6]=new event("Friday, April 13 @ 3:15pm",
		"WiCS is sponsoring this week's Donut Hour, to be held after the CSE 600 seminar. In this week's seminar, Shakeera Thomas will be leading a discussion on how to get a job. All are welcome. The talk will begin roughly at 2:15, with Donut Hour beginning approximately one hour after.", "none", "none", 2007);
events[7]=new event("Every weekday from now 'till April 27 @ 7:30",
		"WiCS is working with SBCS and LUGSB (surprise surprise) on building a boat for the Roth Regatta. Come participate! We meet in the basement of the Melville library; see <a href=images/boat_location.JPG>here</a> for a map to help you find us.", 
		"none", "none", 2007);
events[8]=new event("Wednesday, May 2nd at 2pm",
		"WiCS general body meeting! We will be having food and will be making plans for next year, as well as having elections for officer positions. The party is in CS 1211, the 'Ping Pong Room'.", "none", "none", 2007);
events[9]=new event("Friday, May 4 at noon",
		"The Roth Regatta! Come support WiCS et al at Roth Pond. Note: The original date for the Regatta was April 27. The Regatta was posponed a week due to the threat of thunderstorms on the 27th.", "none", "none", 2007);
events[10]=new event("Friday, May 4th at 4pm",
		"WiCS is hosting a special talk with Nancy Lynch of MIT! Come by for a casual chat with one of the leading ladies in Computer Science, as well as to participate in elections for next year and a t-shirt raffle!",
		"may04event.pdf", "lynch", 2007);
events[11]=new event("Tuesday, August 28, from 12 to 2pm",
		'Stop by our table during lunch at the graduate CS orientation for advice, advising, and friendly chit-chat :)  WiCS will be on-hand to help answer your questions, providing you guidance on a wide range of issues, from "How many quals do you recommend taking at once?" to "Where\'s the bathroom?"',
		"aug28event.pdf", "none", 2007);
events[12]=new event("Friday, September 7 at 4pm",
		"WiCS is sponsoring the first Donut Hour of the semester!  Come eat delicious donuts (yes, we're actually getting donuts) in the CS Lobby after this week's CSE 600 seminar.", "none", "none", 2007);
events[13]=new event("Wednesday, September 12 at 1pm",
		"Our Fall General Interest Meeting!  Come by CS 1211 (the Ping-Pong Room) to meet new people, enjoy free food, and learn all there is to know about WiCS.  We will be discussing events for the upcomming semester as well as ways for you to get involved.", "sept12event.gif", "none", 2007);
events[14]=new event("Great news!", 
	"As of September 2007, WiCS an official chapter of the ACM's Committee on Women in Computing (ACM-W)!  We're excited to be working together with the ACM to achieve our mutual goals.  More on this to follow.", "none", "none", 2007);
events[15]=new event("Tuesday, September 25 @ 4pm",
		"WiCS will be holding Free HUGS: a Haskell/functional programming tutorial!  Your lovely vice-president and webmaster, Diane, will be leading the tutorial which promises to be fun and educational.  It will be held in CS 1310 and refreshments will be served.", "sept25event.jpg", "none", 2007);
events[16]=new event("Thursday, September 27 @ 5:30pm",
		"Microsoft will be on campus recruiting as part of this year's Career Fair in the Wang Center, room 401.  Stop by to find out more about fulltime and internship positions in Seattle, and also for free food and prize raffles!", "sept27event.jpg", "none", 2007);
events[17]=new event("Wednesday, October 17 @ 12:50pm",
		"WiCS is working with SWE, LUGSB and SBCS to hold Firefox Day!  This is an event celebrating Mozilla Firefox with free food and possibly prize drawings.  Bring your laptop in so we can help you get Firefox installed, along with some of the more kick-ass plugins.  In CS 2129.", "oct17event.jpg", "none", 2007);
events[18]=new event("Friday, November 2 @ noon",
		"Come discover the truth about women in the computing industry and exclusive funding opportunities for women!  Katie Jogerst, a good friend of our president and recent college graduate, is holding down a stable industry job while working on her masters at <a href=http://www.jhu.edu>Johns Hopkins</a>.  You can learn all about her experiences in CS 1310, the Executive Conference Room.", "nov2event.png", "katie", 2007);
events[19]=new event("Wednesday, September 3 @ 5pm", "CS Volleyball and Lemonade party (WiCS + CSGSC event) &mdash; the best way to celebrate the beginning of new semester!",
		"none", "none", 2008);
events[20]=new event("Friday, September 19 @ 5-7pm",
		"Ice Cream Social &mdash; a joint event with SBCS and LUGSB. Come to have great ice cream and to meet us. Welcome to our first meeting this year!", "sept19event.pdf", "none", 2008);
events[21]=new event("Wednesday, October 8 @ TBA",
		"First WiCS meeting. Come to meet new WiCS members and to learn about our programs and plans. Free pizza & soda.", "none", "none", 2008);
events[22]=new event("Wednesday, February 18 @ CS 1306",
		"Resume workshop. Come to get usefull tips and critiques on your resumes. Don't forget to bring your resume!", "resume_workshop.pdf", "none", 2009);
events[23]=new event("Tuesday, March 24 @ CS 1211",
		"Interviewing Tips and Tricks & Social Mixer. Come and enjoy useful presentation, interesting conversations and a dessert bar!", "interview_flyer.pdf", "none", 2009);
events[24]=new event("Wednesday, November 3 @ CS 1211, 1-2pm",
		"First WiCS meeting. Come to meet new WiCS members and to learn about our programs and plans. Free pizza & soda.", "nov3flyer.pdf", "none", 2010);
events[25]=new event("Friday, December 3 @ CS Lobby, 3:30pm-5pm (during donut hour)",
		"Elections.", "dec3flyer.pdf", "none", 2010);
events[26]= new event("Tuesday, February 8 @ CS 1306/1307 (Ping-pong room), 4:30pm-6pm", 
		"Meet & Greet & Games. Come have milk and cookies and play games with us!", "none", "none", 2011); 

//No need to edit any code below THIS point!!

function displayEvent(index, display_year)
{
	if (display_year)
		document.write("<b>"+events[index].year+", </b>");
	document.write("<b>"+events[index].dateAndTime+": </b>");
	document.write(events[index].description);
	if (events[index].flyerAddress!="none")
	{
		document.write(' (<a href="flyers/');
		document.write(events[index].year + '/');
		document.write(events[index].flyerAddress);
		document.write('"/>flyer</a>)');
	}
	if (events[index].photos!="none")
	{
		document.write(' (<a href="photos/');
		document.write(events[index].photos+'/"/>');
		document.write("photos</a>)");
	}
	document.write("<br><br>");
}

function displayCurrentEvents()
{
	var i;
	for (i=events.length-1; i>events.length-3; i--)
	{
		displayEvent(i, false);
	}
}

function displayPastEvents()
{
	var i;
	for (i=events.length-3; i>=0; i--)
	{
		displayEvent(i, true);
	}
}

