/*==================================================*
 $Id: slideshow.js,v 1.16 2003/10/14 12:39:00 pat Exp $
 Copyright 2000-2003 Patrick Fitzgerald
 http://slideshow.barelyfitz.com/

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *==================================================*/

// There are two objects defined in this file:
// "slide" - contains all the information for a single slide
// "slideshow" - consists of multiple slide objects and runs the slideshow

// =============================================================================

// Create objects containing tour data

// =============================================================================

// Declare and initialize global variable SLIDES
SLIDES = new slideshow("SLIDES");
// List Office stufffunction showOffice (){	var officestuff = document.getElementById("officestuff");	var footer = document.getElementById("footer");	var gradgreek = document.getElementById("gradgreek");		var office = getVar("office");		if (office == "grad")	{		officestuff.innerHTML = "<a href=\"http://www.iit.edu/graduate_admission/\">Graduate Admission</a> | <a href=\"http://iitgradenroll.typepad.com/\">Graduate Enrollment Blog</a><br /><br /><sub><em>Virtual Tour courtesy of IIT's Office of Undergraduate Admission</em></sub>";		footer.innerHTML = "&copy; 2009 Illinois Institute of Technology - Office of Graduate and Professional Enrollment<br />10 W. 33rd Street, Perlstein Hall Room 203, Chicago, IL 60616-3793<br />Tel 312.567.3020 | Fax 312.567.3138 | Toll Free 866.472.3448";		gradgreek.innerHTML = "";	}}function goToURL (url){	var office = getVar("office");	if (office == "grad")		url = url + "&office=grad";	window.location = url;}
// Call getSlideshow() function to load default slideshow images
getSlideshow();

// Get the building text description and place it on the page
//getBuildingText(strBuilding);
window.onload = getBuildingText();

function getSlideshow ()
{
	var strBuilding = getVar('building');
	
	if (strBuilding == '')
		strBuilding = "mtcc";
	
	var tempSLIDES = new slideshow("SLIDES");

	switch (strBuilding)
	{
		case "3424":
			tempSLIDES.add_slide(new slide("images/3424/I04006_1356.jpg", "#"));
			break;
		case "alumni":
			tempSLIDES.add_slide(new slide("images/Alumni/DSC_7933.jpg", "#"));
			break;
		case "crown":
			tempSLIDES.add_slide(new slide("images/Crown/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/04.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/05.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/06.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/07.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/08.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/09.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/10.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/12.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/13.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/14.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/15.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/HDR3.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/16.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Crown/17.jpg", "#"));
			break;
		case "e1":
			tempSLIDES.add_slide(new slide("images/E1/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/E1/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/E1/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/E1/04.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/E1/I04046_0752.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/E1/I04006_1543.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/E1/I04006_1545.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/E1/I04006_1589.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/E1/I04006_1506.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/E1/I04006_1795.jpg", "#"));
			break;
		case "farr":
			tempSLIDES.add_slide(new slide("images/Farr/05.jpg", "#"));
			break;
		case "galvin":
			tempSLIDES.add_slide(new slide("images/Galvin/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Galvin/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Galvin/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Galvin/04.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Galvin/05.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Galvin/06.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Galvin/07.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Galvin/08.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Galvin/I04046_0236.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Galvin/I04006_2386.jpg", "#"));
			break;
		case "greek":
			tempSLIDES.add_slide(new slide("images/Greek/I04046_0628.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Greek/I04046_0633.jpg", "#"));
			break;
		case "hermann":
			tempSLIDES.add_slide(new slide("images/HUB/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/04.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/05.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/06.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/07.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/08.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/09.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/10.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/11.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/12.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/I04046_0707.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/I04046_0715.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/HUB/I04046_0733.jpg", "#"));
			break;
		case "keating":
			tempSLIDES.add_slide(new slide("images/Keating/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Keating/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Keating/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Keating/04.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Keating/15.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Keating/17.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Keating/I04046_0983.jpg", "#"));
			break;
		case "life":
			tempSLIDES.add_slide(new slide("images/LS/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/LS/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/LS/I04006_1413.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/LS/I04046_0312.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/LS/I04006_2777.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/LS/I04006_1404.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/LS/I04006_2009.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/LS/I04006_2500.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/LS/I04006_2517.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/LS/IMG_1487.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/LS/JASN1697.jpg", "#"));
			break;
		case "machinery":
			tempSLIDES.add_slide(new slide("images/Machinery/P1010239.jpg", "#"));
			break;
		case "main":
			tempSLIDES.add_slide(new slide("images/Main/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Main/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Main/05.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Main/06.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Main/mbspring2.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Main/P1010251.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Main/DSC_8646.jpg", "#"));
			break;
		case "msv":
			tempSLIDES.add_slide(new slide("images/MSV/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/04.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/05.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/I04006_2559.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/DSC_8616.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/DSC_8618.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/PB100108.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/PB100111.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/PB100116.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/PB100112.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MSV/PB100117.jpg", "#"));
			break;
		case "mtcc":
			tempSLIDES.add_slide(new slide("images/MTCC/15.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/04.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/05.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/06.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/07.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/08.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/09.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/10.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/11.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/12.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/13.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/16.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/I04006_1421.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/I04006_1448.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/CHE_3547.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/DSC_2550.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/DSC_2561.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/MTCC/DSC_8054.jpg", "#"));
			break;
		case "minerals":
			tempSLIDES.add_slide(new slide("images/Minerals/11.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Minerals/I04006_1248.jpg", "#"));
			break;
		case "perlstein":
			tempSLIDES.add_slide(new slide("images/Perlstein/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Perlstein/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Perlstein/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Perlstein/04.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Perlstein/05.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Perlstein/CHE_9637.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Perlstein/DSC_5579.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Perlstein/P1010199.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Perlstein/DSC_8632.jpg", "#"));
			break;
		case "redgreen":
			tempSLIDES.add_slide(new slide("images/redgreen/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/04.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/I04006_0430.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/I04006_0424.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/I04006_0436.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/P6300233.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/P6300235.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/P6300239.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/P6300241.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/redgreen/P6300243.jpg", "#"));
			break;
		case "siegel":
			tempSLIDES.add_slide(new slide("images/Siegel/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Siegel/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Siegel/05.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Siegel/06.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Siegel/I04046_0178.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Siegel/I04046_0186.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Siegel/I04046_0746.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Siegel/AA-male-2.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Siegel/I04006_0409.jpg", "#"));
			break;
		case "ssv":
			tempSLIDES.add_slide(new slide("images/SSV/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/PB100106.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/05.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/06.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/08.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/07.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/I04006_1055.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/I04006_1115.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/I04006_1135.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/I04006_0349.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/PB100098.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/PB100099.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/PB100103.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/SSV/PB100104.jpg", "#"));
			break;
		case "stuart":
			tempSLIDES.add_slide(new slide("images/Stuart/I04046_0002.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Stuart/I04046_0022.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Stuart/I04046_0032.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Stuart/I04046_0055.jpg", "#"));
			break;
		case "utp":
			tempSLIDES.add_slide(new slide("images/UTP/I04046_0434.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/UTP/HDR4.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/UTP/IMG_1588.jpg", "#"));
			break;
		case "vandercook":
			tempSLIDES.add_slide(new slide("images/VanderCook/_MG_5541.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/VanderCook/Seminar2476.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/VanderCook/SeniorDay3163.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/VanderCook/SeniorDay3217.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/VanderCook/Strings0306.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/VanderCook/Students0269.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/VanderCook/Students2204.jpg", "#"));
			break;
		case "wishnick":
			tempSLIDES.add_slide(new slide("images/Wishnick/01.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Wishnick/02.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Wishnick/03.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Wishnick/HK4Z9500.jpg", "#"));
			tempSLIDES.add_slide(new slide("images/Wishnick/DSC_3715.jpg", "#"));
			break;
		default:
    }
	
	// Set the global SLIDES equal to tempSLIDES and update the current slideshow
	// to display the new images
	SLIDES = tempSLIDES;
	SLIDES.update();
}

// Call getBuildingText() function to load text descriptions
// Text is loaded into the <span id="buildingtext"> tag
// Any current text is replaced
function getBuildingText()
{
	var strBuilding = getVar('building');
	
	if (strBuilding == '')
		strBuilding = "mtcc";
	
	// Check if buildingtext element has been loaded
	// If not, exist the function
	if ( document.getElementById("buildingtext") )
	{     }
	else
	{
		return 0;
    }
	
	var objBuildingText = document.getElementById("buildingtext");

	switch (strBuilding)
	{
		case "3424":			objBuildingText.innerHTML = "<h1>3424</h1><p>(text coming soon)</p>";			break;
		case "alumni":			objBuildingText.innerHTML = "<h1>Alumni Hall</h1><p>Alumni Hall was Mies van der Rohe's first classroom building on campus, and is home to the <a href=\"http://www.iit.edu/engineering/cae/\">Department of Civil, Architectural, and Environmental Engineering</a>. The building has a large computer-aided design (CAD) software-equipped computer lab on the second floor, which students can use whenever class is not in session. On the first floor, there are several round tables where students can study. There are also many labs to accommodate the different courses offered, including concrete, materials, and steel testing labs.</p><p>The CAEE department sponsors many student organizations, including <a href=\"http://www.iit.edu/~haiti/\">IIT Haiti Outreach</a>, which works toward creating a new water-distribution system for Haiti. <a href=\"http://www.iit.edu/~ewb-iit/\">Engineers Without Borders</a> hopes to create a new high school in Haiti. Another club the CAEE department sponsors is the <a href=\"http://asce.iit.edu/\">American Society of Civil Engineers</a>. Feel free to check out the websites to get more information about these clubs and to learn how to get involved.</p>";
			break;
		case "e1":			objBuildingText.innerHTML = "<h1>Engineering 1</h1><p>Engineering 1 (or E1 as it is better known) is the home of the <a href=\"http://www.iit.edu/csl/am/\">Department of Applied Mathematics</a>, <a href=\"http://www.iit.edu/engineering/bme/\">Department of Biomedical Engineering</a>, and <a href=\"http://www.iit.edu/engineering/mmae/\">Department of Mechanical, Materials, and Aerospace Engineering</a>. The first and second floors are primarily classrooms, office space, and study lounges. In the rear of the building is the Engineering Measurements Laboratory as well as the <a href=\"http://fdrc.iit.edu/\">Fluid Dynamics Research Center</a>, which operates, among other instruments, the world's largest university-owned subsonic wind tunnel. The basement of E1 holds even more classrooms and a computer lab.</p>";			break;
		case "farr":			objBuildingText.innerHTML = "<h1>Farr Hall and Farr Field</h1><p>Farr Hall is on the east side of campus, sitting on 33rd Street and Michigan Avenue. Farr Hall hosts the <a href=\"http://www.iit.edu/~arotc/\">IIT Army ROTC</a> detachment offices and the IIT mosque.  The IIT mosque is run by the <a href=\"http://msa.iit.edu/\">Muslim Student Association</a> and offers daily prayer times.</p><p>Farr Field sits west of Farr Hall and is a popular recreational field. Homecoming, Greek Week, Ultimate Frisbee, and <a href=\"http://omega.cs.iit.edu/~navyhawk/website/\">Lacrosse Club</a> events are common sights. In the winter, IIT erects an open-air ice rink, and skates can be rented in <a href=\"http://www.iit.edu/mtcc/\">The McCormick Tribune Campus Center</a>.</p>";			break;
		case "greek":			objBuildingText.innerHTML = "<h1>Greek Housing</h1><p>IIT hosts seven national fraternities (Alpha Sigma Phi, Phi Kappa Sigma, Pi Kappa Phi, Sigma Phi Epsilon, Delta Tau Delta, Omega Delta, and Triangle), one national sorority (Alpha Sigma Alpha), and two local sororities (Kappa Phi Delta and Zeta Phi Omega) on its Main Campus. These Greek organizations have a long history at the university; the oldest is the Alpha Epsilon chapter of Phi Kappa Sigma, which was founded in 1898, and Kappa Phi Delta, founded in 1904, is the oldest sorority in the city of Chicago. Since IIT's early years, fraternities and sororities have played an active role in campus life. Members have held roles in the <a href=\"http://sga.iit.edu/\">Student Government Association</a>, faculty research groups, and <a href=\"http://athletics.iit.edu/index.php\">IIT sports</a>. They participate in numerous student organizations, the Union Board, and work as Student Ambassadors for the <a href=\"http://www.iit.edu/undergrad_admission\">Office of Undergraduate Admission</a> and as orientation counselors. Greeks also organize intramural games and participate in the annual Greek Week, where chapters square off in everything from tug-of-war to a dance-off.</p><p>Philanthropy is a priority for members of the Greek community. Members participate in chapter philanthropy projects in addition to Greek wide philanthropy projects. Through Greek organizations members have several leadership opportunities to develop their leadership skills for life after college. Additionally, the Greek community has had a higher average GPA than the general campus population for several years.</p><p>All the Greeks, except Zeta Phi Omega and Omega Delta, operate their own chapter houses. This allows members to add even more valuable experiences to college life with responsibilities such as managing a $200,000 chapter budget, programming meals for 40 members, and coordinating with living IIT Greek alumni.</p>";			break;
		case "hermann":			objBuildingText.innerHTML = "<h1>Hermann Hall and Field</h1><p>Hermann Hall is one of the first buildings students become acquainted with on campus. Because it has large open areas, it is perfect for department fairs and events for large groups, and many orientations and <a href=\"http://www.inventingthefuture.iit.edu/journal/2008/7/29/open-houses-and-ipro-days.html\">open houses</a> take place in this building.</p><p>The first floor of Hermann Hall also houses the <a href=\"http://omss.iit.edu/index.php\">Office of Multicultural Student Services (OMSS)</a>, which serves underrepresented students of color, women, LGBT students, and other diverse populations through educational and social programming for personal development, retention, and success of all students. Parts of this office include <a href=\"http://www.iit.edu/~wsde/\">Women's Services and Diverity Education (WSDE)</a>. Also located on the first floor is the <a href=\"http://arc.iit.edu/\">Academic Resource Center (ARC)</a>, which recently moved from <a href=\"http://library.iit.edu/\">Paul V. Galvin Library</a>. The ARC is for students who would like a helping hand on homework or in preparing for upcoming exams. It provides group study sessions, and students with high grade point averages in their respective majors work there to tutor other students. Additionally, Hermann Hall has an <a href=\"http://www.einsteinbros.com/\">Einstein Bros. Bagels</a>, and on display from the ceiling are a number of flags exemplifying the countries and coultures represented at IIT.</p><p>In the basement of Hermann Hall is the <a href=\"http://bog.iit.edu/\">Bog</a>, a social attraction for students at IIT. The Bog features an eight-lane bowling alley, and traditional pool tables and ping pong tables can be found near Xbox 360s and Nintendo Wii consoles. Past the bowling and all the other games, the Bog boasts a stage and a bar. Small bands play there, and karaoke night is a student favorite. The bar sells hamburgers, hot dogs, pizza, and other snacks.</p><p>Outside of Hermann Hall is the Rock, one of the oldest objects on campus. It sits in layers upon layers of paint after being coated hundreds of times by different student organizations, mainly fraternities and sororities, to display their letters.</p><p>In the small field nestled between Perlstein, Wishnick, and Hermann Hall sits <em>Man on a Bench</em>, a sculpture by George Segal, which IIT commissioned in commemoration of the centennial of Mies van der Rohe's birthday. <em>Man on a Bench</em> has been known to sport a mortarboard at commencement, fraternity shirts during rush week, and was even once transported from his bench to President Emeritus Lew Collens' desk chair in 2000.</p>";			break;
		case "keating":			objBuildingText.innerHTML = "<h1>Keating Sports Center and Ed Glancy Field</h1><p>Keating Sports Center is the home of the volleyball and swimming and diving teams (more information about each team can be found on the <a href=\"http://athletics.iit.edu/index.php\">athletics website</a>). Intramural sports will often be located here. Keating provides racquetball courts, basketball courts, an Olympic-size pool, and a weight room, all available for student use. The weight room is fully equipped with many treadmills, ellipticals, stationary bicycles, weight machines, and free weights. Open until late evening, Keating is usually full of life with students and faculty taking advantage of all it has to offer.</p><p>Ed Glancy Field is located directly outside of Keating, and is used by the baseball team. The annual <a href=\"http://www.iit.edu/publications/iittoday/archive.php?id=4040&page=26&totalrows=3398&PHPSESSID=590762a571b2fba39fb3c39a5adfa5da\">IIT Pumpkin Launch</a> competition is held here.</p><p>The IIT men's and women's track and field teams use a track located directly north of Ed Glancy Field. The track is also available for use by all students and faculty.</p>";			break;
		case "life":			objBuildingText.innerHTML = "<h1>Life Sciences</h1><p>Life Sciences is one of the larger academic buildings on campus. It sits on the southwest corner of the intersection of 31st Street and State Street. The first floor contains the offices of the <a href=\"http://www.iit.edu/csl/bcps/\">Department of Biological, Chemical, and Physical Sciences</a>, classrooms, and a lecture hall. The lecture hall is famous around campus as a general-education classroom. If you peek in at any given time, you can see classes in Mechanics, Electricity and Magnetism, Modern Physics, Chemistry 1 and 2, Organic Chemistry, or Human Biology. The second floor is home to the <a href=\"http://www.iit.edu/psych/\">Institute of Psychology</a> and hosts biology and chemistry laboratories, such as the developmental biology research laboratory of <a href=\"http://www.iit.edu/csl/bio/faculty/zhang_chunbo.shtml\">Chunbo Zhang</a>. The third floor continues with laboratories, including the bio-metallic interface chemistry work of <a href=\"http://www.iit.edu/csl/che/faculty/bishnoi_sandra.shtml\">Sandra Whaley Bishnoi</a> and the biochemistry labs of <a href=\"http://www.iit.edu/csl/bio/faculty/menhart_nick.shtml\">Nick Menhart</a>. The basement of Life Sciences hosts the <a href=\"http://leadershipacademy.iit.edu/\">Leadership Academy</a>, as well as physics laboratories, where professors such as <a href=\"http://www.iit.edu/csl/phy/faculty/segre_carlo.shtml\">Carlo Segre</a> work with students to perform supercooling and electromagnetic research.</p>";			break;
		case "machinery":			objBuildingText.innerHTML = "<h1>Machinery Hall</h1><p>One of the original buildings of Armour Institute, one of IIT's predecessors, Machinery Hall sits next to Main Building on the west side of campus. Originally built to house dynamos and other large equipment, Machinery Hall is the home of the Department of <a href=\"http://facilities.iit.edu/\">Facilities Maintenance Management</a>, simply referred to as Facilities. Facilities is in charge of maintaining campus buildings (such as residence halls) and landscaping, salting walkways and coordinating construction and renovation efforts. The Facilities staff are distinctly identifiable by their gray workshirts and the fleet of vehicles they drive around campus, including three all-electric vehicles. Machinery Hall is also the home of the <a href=\"http://www.iit.edu/sustainability/\">Office of Campus Energy and Sustainability</a>, which is working to make IIT a greener university. To the north of Machinery Hall is the Armour Laboratory building. Armour Lab is the base of operations for the IIT chapter of the <a href=\"http://sae.iit.edu/\">Society of Automotive Engineers</a>, a student organization that designs, builds, and races conceptual and alternative-energy vehicles.</p>";			break;
		case "main":			objBuildingText.innerHTML = "<h1>Main Building</h1><p>Main Building, better known as just \"Main,\" is one of the original Armour Institute buildings. Main houses most of the administrative offices in the university, including the <a href=\"http://www.iit.edu/financial_aid/\">Office of Financial Aid</a>, the <a href=\"http://www.iit.edu/~psyccrs/careermotiv8.htm\">Office of Career and Educational Services</a>, the <a href=\"http://registrar.iit.edu/\">Office of the Registrar</a>, the <a href=\"http://www.enrollment.iit.edu/bursar/\">Office of the Bursar</a>, and the <a href=\"http://www.iit.edu/~internat/index.php\">International Center</a>. Main has large stained-glass windows, wide corridors, and marble floors. The entrance archway is engraved with \"Armour Institute of Technology,\" a reminder of IIT's long history in Chicago. Main is the oldest building on campus; it has a neoromansque design that contrasts with the Mies van der Rohe buildings. At the attic level of Main Building is the <a href=\"http://www.iit.edu/~itmr.org/\">IIT Model Railroad</a> club, in which students, alums and others participate.</p>";			break;
		case "msv":			objBuildingText.innerHTML = "<h1>McCormick Student Village</h1><p>McCormick Student Village (MSV) is one of the student resident halls on campus. There are six halls, or wings, that house about 700 students in what is referred to as \"communal style living\" meaning that each floor shares the restrooms. Every person entering the building must enter through the central doors, which are guarded 24 hours a day by community desk assistants. Students must use their student IDs both to enter through the front door and proceed past the front desk, which ensures security for the occupants of the building. There are laundry facilities in the basement below almost every wing. In the basement of the East Hall is a large computer lab with access to many programs students need for various courses for various majors. Each residents' room is about the same size, except in Fowler Hall, which has substantially bigger rooms allotted for upperclassmen; the tradeoff of the bigger rooms is that there is no air conditioning. Most rooms are set up as doubles, with two desks, two chairs, two beds, four dressers, and two T3 Internet connections. The rooms also have cable. Each floor has a resident advisor who organizes social and academic programming, follows up with students regarding academic concerns, enforces residence hall policies, and serves as a general resource for residents. Full-time Residence Life and Housing staff are available on call 24/7.</p>";			break;
		case "minerals":			objBuildingText.innerHTML = "<h1>Minerals and Materials</h1><p>The Minerals and Materials Building has been undergoing changes recently. The building is divided into a north and south section, and over the past few years third-year undergraduate architecture students have been sharing their occupancy with a design/build studio as well as a few faculty offices on the second floor. The space has been equipped with desks for students, as well as lockers and pin-up boards for them to display their work. The building will be undergoing more changes in the near future, with the possibility of the two model shops for architecture students, which currently reside in S. R. Crown Hall and 3410 S. State Street, being moved to Minerals and Materials; this will create a much larger shop area and allow the <a href=\"http://www.iit.edu/arch/\">College of Architecture</a> to host more students at Crown and 3410.</p><p>Design/build is a cornerstone of the architecture program. Projects include the Ragdale studio project, for which the <a href=\"http://www.ragdale.org/\">Ragdale Foundation</a> partnered with a College of Architecture Design/Build class to rebuild the Foundation's now-defunct Meadow Studio. Details about the project can be read in the <a href=\"http://www.iit.edu/publications/iittoday/archive.php?id=4239&page=53&totalrows=4841&PHPSESSID=29f1015a5a99cffb200debf0fcf5bab2\">IIT Today news archives</a>.</p>";			break;				case "galvin":			objBuildingText.innerHTML = "<h1>Paul V. Galvin Library</h1><p><a href=\"http://www.gl.iit.edu/\">Paul V. Galvin Library</a> is a favorite place for students who need to study. It's a quiet place to work and provides private study rooms for those who want silence and freedom from all distractions, as well as soft Fatboy bean bags for relaxing with a book. Many of <a href=\"http://www.shimer.edu/\">Shimer College</a>'s books are located in Galvin, along with government publications, bound journals, thousands of volumes, and even some best sellers. There are numerous workstations around the library, electrical sockets all along the outer edge of the building, vending machines in the lower level, and several works of art. Galvin Library is also home to Kemper Room Art Gallery, which hosts regular <a href=\"http://www.iit.edu/art/\">art@iit</a> exhibitions.</p><p>During finals week, Galvin stays open 24 hours to accommodate students with all sorts of studying habits. Also housed in Galvin is the <a href=\"http://www.cdc.iit.edu/\">Career Management Center</a>, which prepares students for their career search after graduation by providing such activities as etiquette training and resume advice.</p>";			break;
		case "perlstein":			objBuildingText.innerHTML = "<h1>Perlstein Hall</h1><p>Perlstein Hall is the home of the <a href=\"http://www.iit.edu/engineering/chbe/\">Department of Chemical and Biological Engineering (ChBE)</a>, as well as the offices of <a href=\"http://www.iit.edu/graduate_admission/\">Graduate Admission</a>, <a href=\"http://www.iit.edu/undergrad_admission/\">Undergraduate Admission</a> and the <a href=\"http://www.iit.edu/president/index.shtml\">President</a>. It contains an auditorium, a lounge and study area featuring Mies van der Rohe-designed Barcelona chairs, and two \"smart\" classrooms, PH108 and PH109, outfitted with webcams for Internet and closed-circuit TV classes. There is also a computer lab on the second floor exclusively for ChBE students, with monitors built into the desks. This room is usually used for classes in reactor systems design and modeling, where real-time computer simulations are helpful. Finally, the recently renovated and rededicated <a href=\"http://www.iit.edu/engineering/chbe/photos/gallery_2008Oldshue.shtml\">Oldshue Laboratory</a> offers a variety of real-life unit operations to undergraduate students. These include salt mixing, particle separations, fluidized particle beds, electrochemical separations, fermentations, and macromolecular separations.</p><p>Prospective students interested in taking an in-person campus tour can schedule one <a href=\"http://www.iit.edu/undergrad_admission/visit/\">online</a>, and/or drop by the Office of Undergraduate Admission (PH101) in Perlstein Hall.</p>";			break;
		case "redgreen":			objBuildingText.innerHTML = "<h1>Red and Green Lines</h1><p>There are two elevated train (\"L\") stops on IIT Main Campus. The Green Line's 35th-Bronzeville-IIT stop is right behind State Street Village. Students use this line primarily to get into the Chicago Loop area. The trains run every 5-10 minutes from 6 am to 2 am.</p><p>The Red Line's Sox-35th stop is in the middle of the I90/I94 expressway, half a block west of campus. It offers service every 3-8 minutes to Chicago's north and south sides. Popular Red Line stops include Addison to see the Chicago Cubs at Wrigley Field, North/Clybourn for the nightlife, and the east-side stops in the Loop for Michigan Avenue shopping.</p><p>IIT students receive a pass (U-Pass) that provides unlimited rides on the L and Chicago Transit Authority (CTA) buses during the academic year.</p>";			break;				case "crown":			objBuildingText.innerHTML = "<h1>S. R. Crown Hall</h1><p>Home of the <a href=\"http://www.iit.edu/arch/\">College of Architecture</a>, S. R. Crown Hall is a building with a pedigree. It was designed by Mies van der Rohe in 1950, and exemplifies Mies' emphasis on clear structural expression. Crown is widely regarded as one of the most architecturally significant buildings of the twentieth century; the building is an open, 120' x 220' column-free space, with an 18' ceiling. Support is provided by four external columns, from which hangs the roof. Crown Hall is a National Historic Landmark that <a href=\"http://www.time.com/time/\"><em>Time</em> magazine</a> called \"one of the world's most influential, inspiring, and astonishing structures.\"</p><p>The first floor of the building is architecture studio space where students are assigned personal drafting desks. There are also lockers for storing drafting supplies and personal items. Architecture students are known around campus for spending copious amounts of time in Crown, often throwing impromptu drafting parties in the middle of the night. The center of the first floor hosts architecture symposia and lectures. In the basement of Crown are the offices of the College of Architecture, graduate studio space, a woodshop, a lounge, and the <a href=\"http://www.gl.iit.edu/grc/\">Graham Resource Center (GRC)</a>, a branch of <a href=\"http://library.iit.edu/\">Paul V. Galvin Library</a>, which serves as the architecture library and a repository of design examples.</p>";			break;
		case "siegel":			objBuildingText.innerHTML = "<h1>Siegel Hall and Field</h1><p>Siegel Hall is one of the original <a href=\"http://www.mies.iit.edu/\">Mies van der Rohe</a>-designed buildings on Main Campus. It is home to the <a href=\"http://www.iit.edu/engineering/ece/\">Department of Electrical and Computer Engineering</a>, the <a href=\"http://www.iit.edu/csl/socs/\">Department of Social Sciences</a>, and the <a href=\"http://www.iit.edu/csl/hum/\">Lewis Department of Humanities</a>. The Department of Humanities manages the <a href=\"http://www.iit.edu/csl/hum/resources/writing_center.shtml\">IIT Writing Center</a>, which helps students proof and edit essays and term papers. There is a large lecture hall on the first floor that holds classes like ECE211 &ndash; Circuit Design and ECE218 &ndash; Digital Logic. Siegel Hall hosts several large computer labs for university use, including the math programming laboratories used in Calculus I and II.</p><p>Siegel Hall is the first building on campus to be part of IIT's <a href=\"http://www.iit.edu/perfect_power/\">Perfect Power</a>, a unique campus-wide project that will will move IIT to a sustainable energy system based on smart microgrids.</p><p>Siegel Field is just east of Siegel Hall. It is one of the recreational fields on campus, and is where the Inter-Greek Football Season and many <a href=\"http://www.iit.edu/arch/\">College of Architecture</a> term projects all take place.</p>";			break;
		case "ssv":			objBuildingText.innerHTML = "<h1>State Street Village</h1><p>State Street Village (SSV) is the newest residence hall at IIT. The building was designed by Helmut Jahn, a German-American architect of <a href=\"http://www.murphyjahn.com/english/frameset_intro.htm\">Murphy/Jahn Architects</a> and who studied at IIT, and was completed in 2003. It consists of three five-story buildings that face State Street. The buildings contain 367 beds in two suite-style buildings and one apartment-style building. Suite-style means that two students share a room, and they share the bathroom with two other students. There is a fifth-floor lounge in each building, plus two fifth-floor outdoor terraces that offer million-dollar views of downtown Chicago. Each SSV building is equipped with a 24-hour security door guard, and extensive audio/visual displays in the main lounges that feature a 50\" HDTV plasma display, surround sound, DVD player, carousel CD player, and terrace speakers. Each individual room contains temperature controls per suite and a complete furniture package including bed, desk, dresser, and desk chair. Each floor has a laundry room and small kitchen with a stove, oven, refrigerator, and microwave.</p>";			break;
		case "stuart":			objBuildingText.innerHTML = "<h1>Stuart Building and Stuart Field</h1><p>Stuart Building is on the far north side of campus. It is the home of the <a href=\"http://www.iit.edu/csl/cs/\">Department of Computer Science</a>, the <a href=\"http://ots.iit.edu/\">Office of Technology Services</a>, and the <a href=\"http://afrotc.iit.edu/\">Air Force</a> and <a href=\"http://nrotc.iit.edu/\">Navy ROTC</a> programs. The first floor contains one large lecture hall, two smaller senate-style lecture halls, and two computer classrooms. There is also a large computer lab equipped with all the mathematics and programming software required for IIT students. The second floor is mostly classroom space. Most of these are smart classrooms; they stream lectures over the Internet and have interactive audio/visual technology, which allows students to see how programming and design works in real-time. West of Stuart is the IIT Stuart Soccer Field, where commencement is held.</p>";			break;				case "mtcc":			objBuildingText.innerHTML = "<h1>The McCormick Tribune Campus Center</h1><p>The McCormick Tribune Campus Center (MTCC) was designed by Rem Koolhaas, a Pritzker Architecture Prize winner and one of <a href=\"http://www.time.com/time/specials/2007/article/0,28804,1733748_1733752_1735981,00.html\"><em>Time</em> magazine's 2008 World's 100 Most Influential People</a>. He designed it after examining the paths taken by students over the ground where the building now lies, leaving the most common pathways clear for students to use on their way to class.</p><p>The MTCC is where students living on campus eat. Most students enjoy their meals at the <a href=\"http://www.iit.edu/~sodexho/locations.html\">Commons</a>, which offers a large variety of choices every day, including pizza, hamburgers, chicken sandwiches, pasta, salad, and much more. The cooks also take formal requests from students and have special days, such as a lunch with a mountain of chicken wings. <a href=\"http://www.iit.edu/~sodexho/locations.html#cc\">Center Court</a> is another dining option for students, where they can grab a quick, pre-packaged snack. Its convenient location in the center of the MTCC allows students to stop there on their way to class. Finally, the Pritzker Club is a full-service restaurant for students, parents, faculty and guests.</p><p>South of Center Court is the <a href=\"http://iit.bkstore.com\">IIT Bookstore</a>, Global Grounds, and a <a href=\"http://www.7-eleven.com/\">7-Eleven</a>. The bookstore sells all the books and supplies a student will need for his or her courses. Global Grounds cafe sells coffee and coffee-related drinks for students at an affordable price. 7-Eleven is a convenience mart and a favorite of students who want a soft drink, a warm taquito, or any common necessities like Tylenol or Visine. Also located in the MTCC are the offices of <a href=\"http://www.iit.edu/student_affairs/\">Student Affairs</a> and <a href=\"http://www.iit.edu/student_life/\">Student Life</a>, which manage all student organizations. The MTCC houses a post office, too, where students can pick up their packages. Students living in State Street Village pick up all their mail here.</p><p>In addition to all the services listed above, the MTCC is a fun location for students to hang out. There are video game machines, ping pong tables, lockers, study spaces, and TVs. <a href=\"http://radio.iit.edu/\">WIIT 88.9 FM</a>, IIT's own non-commercial radio station, is located in the MTCC, and the \"MTCC bridge\" is a site of meeting spaces, such as Taste of IIT, an annual event where IIT's many international student groups prepare foods from their native countries.</p>";			break;
		case "utp":			objBuildingText.innerHTML = "<h1>University Technology Park</h1><p>University Technology Park (UTP) is IIT's research park, housed in a group of buildings with rentable space for various startup and commercial companies, laboratories, and product development and testing. UTP companies often hire IIT students to work for them. The <a href=\"http://www.iit.edu/~shc/\">Student Health Center</a> and the <a href=\"http://www.iit.edu/~cc/index.html\">Counseling Center</a> have recently moved into the IIT Tower (10 W. 35th Street, Suite 3D9-1) at UTP. The Student Health Center is a primary care clinic, run by Nurse Practitioner Kathleen Morgan and assisted by Consulting Physician Dr. Charles Lawler. Students can order vaccinations, get exams, and have prescriptions written for them there. Student Counseling Services has a staff of full-time psychologists and a part-time psychiatrist. Here, students can receive free, confidential counseling for test anxiety, personal issues, and any other problems that might interfere with studies. Across the street from UTP is a <a href=\"http://www.starbucks.com/\">Starbucks Coffee</a>, <a href=\"http://www.fedex.com/us/office/\">FedEx/Kinko's</a>, and a <a href=\"http://www.jimmyjohns.com/\">Jimmy John's Gourmet Sandwiches</a>.</p>";			break;
		case "vandercook":			objBuildingText.innerHTML = "<h1>VanderCook and Morton Park</h1><p><a href=\"http://www.vandercook.edu/\">VanderCook College of Music</a>, located in a Mies van der Rohe building on the IIT campus, is an independent liberal-arts college solely dedicated to training music educators. It is the only college in the country that does this. VanderCook was founded in 1909, and its connection to IIT goes back to the friendship between Hale A. VanderCook, the school's founder, and George L. Tenney, a vocal music instructor at then-Lewis Institute, one of IIT's predecessors. VanderCook students share living and dining facilities with IIT students, and students from each institution can take courses at the other.</p><p>To the east of VanderCook is Morton Park, where outdoor activities such as frisbee golf and picnics, take place.</p>";			break;
		case "wishnick":			objBuildingText.innerHTML = "<h1>Wishnick Hall</h1><p>Wishnick Hall, a newly renovated Mies van der Rohe building, is mainly a research and laboratory building. The first floor has smart classroom space and is equipped with webcams, Internet feeds, and interactive audio/visual equipment. It is used by all departments, particularly <a href=\"http://www.iit.edu/engineering/chbe/\">Chemical and Biological Engineering</a> and the <a href=\"http://www.iit.edu/csl/bcps/\">Department of Biological, Chemical, and Physical Sciences</a>. The first floor also hosts the Center for Excellence in Polymer Science Engineering, a research group that studies the formation, setting, mechanical, and thermodynamic properties of plastics and gels. The second floor has newly renovated laboratories for organic, inorganic, analytical, and physical chemistry. Here students get to try their hands at analytical techniques such as gas chromatography/mass spectrometry, nuclear magnetic resonance, Fourier-transformed infrared spectroscopy, and ultraviolet/visible spectroscopy. Students get personal space in the organic chemistry laboratory, maintaining their own fume hoods and equipment for the final semester. The third floor holds research laboratory space for the <a href=\"http://www.iit.edu/engineering/bme/\">Department of Biomedical Engineering</a>, as well as the undergraduate animal physiology laboratory.</p>";			break;
		default:
    }
	return 1;
}
//==================================================
// slide object
//==================================================
function slide(src,link,text,target,attr) {
  // This is the constructor function for the slide object.
  // It is called automatically when you create a new slide object.
  // For example:
  // s = new slide();

  // Image URL
  this.src = src;

  // Link URL
  this.link = link;

  // Text to display
  this.text = text;

  // Name of the target window ("_blank")
  this.target = target;

  // Custom duration for the slide, in milliseconds.
  // This is an optional parameter.
  // this.timeout = 3000

  // Attributes for the target window:
  // width=n,height=n,resizable=yes or no,scrollbars=yes or no,
  // toolbar=yes or no,location=yes or no,directories=yes or no,
  // status=yes or no,menubar=yes or no,copyhistory=yes or no
  // Example: "width=200,height=300"
  this.attr = attr;

  // Create an image object for the slide
  if (document.images) {
    this.image = new Image();
  }

  // Flag to tell when load() has already been called
  this.loaded = false;

  //--------------------------------------------------
  this.load = function() {
    // This method loads the image for the slide

    if (!document.images) { return; }

    if (!this.loaded) {
      this.image.src = this.src;
      this.loaded = true;
    }
  }

  //--------------------------------------------------
  this.hotlink = function() {
    // This method jumps to the slide's link.
    // If a window was specified for the slide, then it opens a new window.

    var mywindow;

    // If this slide does not have a link, do nothing
    if (!this.link) return;

    // Open the link in a separate window?
    if (this.target) {

      // If window attributes are specified,
      // use them to open the new window
      if (this.attr) {
        mywindow = window.open(this.link, this.target, this.attr);
  
      } else {
        // If window attributes are not specified, do not use them
        // (this will copy the attributes from the originating window)
        mywindow = window.open(this.link, this.target);
      }

      // Pop the window to the front
      if (mywindow && mywindow.focus) mywindow.focus();

    } else {
      // Open the link in the current window
      location.href = this.link;
    }
  }
}

//==================================================
// slideshow object
//==================================================
function slideshow( slideshowname ) {
  // This is the constructor function for the slideshow object.
  // It is called automatically when you create a new object.
  // For example:
  // ss = new slideshow("ss");

  // Name of this object
  // (required if you want your slideshow to auto-play)
  // For example, "SLIDES1"
  this.name = slideshowname;

  // When we reach the last slide, should we loop around to start the
  // slideshow again?
  this.repeat = true;

  // Number of images to pre-fetch.
  // -1 = preload all images.
  //  0 = load each image is it is used.
  //  n = pre-fetch n images ahead of the current image.
  // I recommend preloading all images unless you have large
  // images, or a large amount of images.
  this.prefetch = -1;

  // IMAGE element on your HTML page.
  // For example, document.images.SLIDES1IMG
  this.image;

  // ID of a DIV element on your HTML page that will contain the text.
  // For example, "slides2text"
  // Note: after you set this variable, you should call
  // the update() method to update the slideshow display.
  this.textid;

  // TEXTAREA element on your HTML page.
  // For example, document.SLIDES1FORM.SLIDES1TEXT
  // This is a depracated method for displaying the text,
  // but you might want to supply it for older browsers.
  this.textarea;

  // Milliseconds to pause between slides.
  // Individual slides can override this.
  this.timeout = 1500;

  // Hook functions to be called before and after updating the slide
  // this.pre_update_hook = function() { }
  // this.post_update_hook = function() { }

  // These are private variables
  this.slides = new Array();
  this.current = 0;
  this.timeoutid = 0;

  //--------------------------------------------------
  // Public methods
  //--------------------------------------------------
  this.add_slide = function(slide) {
    // Add a slide to the slideshow.
    // For example:
    // SLIDES1.add_slide(new slide("s1.jpg", "link.html"))
  
    var i = this.slides.length;
  
    // Prefetch the slide image if necessary
    if (this.prefetch == -1) {
      slide.load();
    }

    this.slides[i] = slide;
  }

  //--------------------------------------------------
  this.play = function(timeout) {
    // This method implements the automatically running slideshow.
    // If you specify the "timeout" argument, then a new default
    // timeout will be set for the slideshow.
  
    // Make sure we're not already playing
    this.pause();
  
    // If the timeout argument was specified (optional)
    // then make it the new default
    if (timeout) {
      this.timeout = timeout;
    }
  
    // If the current slide has a custom timeout, use it;
    // otherwise use the default timeout
    if (typeof this.slides[ this.current ].timeout != 'undefined') {
      timeout = this.slides[ this.current ].timeout;
    } else {
      timeout = this.timeout;
    }

    // After the timeout, call this.loop()
    this.timeoutid = setTimeout( this.name + ".loop()", timeout);
  }

  //--------------------------------------------------
  this.pause = function() {
    // This method stops the slideshow if it is automatically running.
  
    if (this.timeoutid != 0) {

      clearTimeout(this.timeoutid);
      this.timeoutid = 0;

    }
  }

  //--------------------------------------------------
  this.update = function() {
    // This method updates the slideshow image on the page

    // Make sure the slideshow has been initialized correctly
    if (! this.valid_image()) { return; }
  
    // Call the pre-update hook function if one was specified
    if (typeof this.pre_update_hook == 'function') {
      this.pre_update_hook();
    }

    // Convenience variable for the current slide
    var slide = this.slides[ this.current ];

    // Determine if the browser supports filters
    var dofilter = false;
    if (this.image &&
        typeof this.image.filters != 'undefined' &&
        typeof this.image.filters[0] != 'undefined') {

      dofilter = true;

    }

    // Load the slide image if necessary
    slide.load();
  
    // Apply the filters for the image transition
    if (dofilter) {

      // If the user has specified a custom filter for this slide,
      // then set it now
      if (slide.filter &&
          this.image.style &&
          this.image.style.filter) {

        this.image.style.filter = slide.filter;

      }
      this.image.filters[0].Apply();
    }

    // Update the image.
    this.image.src = slide.image.src;

    // Play the image transition filters
    if (dofilter) {
      this.image.filters[0].Play();
    }

    // Update the text
    this.display_text();

    // Call the post-update hook function if one was specified
    if (typeof this.post_update_hook == 'function') {
      this.post_update_hook();
    }

    // Do we need to pre-fetch images?
    if (this.prefetch > 0) {

      var next, prev, count;

      // Pre-fetch the next slide image(s)
      next = this.current;
      prev = this.current;
      count = 0;
      do {

        // Get the next and previous slide number
        // Loop past the ends of the slideshow if necessary
        if (++next >= this.slides.length) next = 0;
        if (--prev < 0) prev = this.slides.length - 1;

        // Preload the slide image
        this.slides[next].load();
        this.slides[prev].load();

        // Keep going until we have fetched
        // the designated number of slides

      } while (++count < this.prefetch);
    }
  }

  //--------------------------------------------------
  this.goto_slide = function(n) {
    // This method jumpts to the slide number you specify.
    // If you use slide number -1, then it jumps to the last slide.
    // You can use this to make links that go to a specific slide,
    // or to go to the beginning or end of the slideshow.
    // Examples:
    // onClick="myslides.goto_slide(0)"
    // onClick="myslides.goto_slide(-1)"
    // onClick="myslides.goto_slide(5)"
  
    if (n == -1) {
      n = this.slides.length - 1;
    }
  
    if (n < this.slides.length && n >= 0) {
      this.current = n;
    }
  
    this.update();
  }


  //--------------------------------------------------
  this.goto_random_slide = function(include_current) {
    // Picks a random slide (other than the current slide) and
    // displays it.
    // If the include_current parameter is true,
    // then 
    // See also: shuffle()

    var i;

    // Make sure there is more than one slide
    if (this.slides.length > 1) {

      // Generate a random slide number,
      // but make sure it is not the current slide
      do {
        i = Math.floor(Math.random()*this.slides.length);
      } while (i == this.current);
 
      // Display the slide
      this.goto_slide(i);
    }
  }


  //--------------------------------------------------
  this.next = function() {
    // This method advances to the next slide.

    // Increment the image number
    if (this.current < this.slides.length - 1) {
      this.current++;
    } else if (this.repeat) {
      this.current = 0;
    }

    this.update();
  }


  //--------------------------------------------------
  this.previous = function() {
    // This method goes to the previous slide.
  
    // Decrement the image number
    if (this.current > 0) {
      this.current--;
    } else if (this.repeat) {
      this.current = this.slides.length - 1;
    }
  
    this.update();
  }


  //--------------------------------------------------
  this.shuffle = function() {
    // This method randomly shuffles the order of the slides.

    var i, i2, slides_copy, slides_randomized;

    // Create a copy of the array containing the slides
    // in sequential order
    slides_copy = new Array();
    for (i = 0; i < this.slides.length; i++) {
      slides_copy[i] = this.slides[i];
    }

    // Create a new array to contain the slides in random order
    slides_randomized = new Array();

    // To populate the new array of slides in random order,
    // loop through the existing slides, picking a random
    // slide, removing it from the ordered list and adding it to
    // the random list.

    do {

      // Pick a random slide from those that remain
      i = Math.floor(Math.random()*slides_copy.length);

      // Add the slide to the end of the randomized array
      slides_randomized[ slides_randomized.length ] =
        slides_copy[i];

      // Remove the slide from the sequential array,
      // so it cannot be chosen again
      for (i2 = i + 1; i2 < slides_copy.length; i2++) {
        slides_copy[i2 - 1] = slides_copy[i2];
      }
      slides_copy.length--;

      // Keep going until we have removed all the slides

    } while (slides_copy.length);

    // Now set the slides to the randomized array
    this.slides = slides_randomized;
  }


  //--------------------------------------------------
  this.get_text = function() {
    // This method returns the text of the current slide
  
    return(this.slides[ this.current ].text);
  }


  //--------------------------------------------------
  this.get_all_text = function(before_slide, after_slide) {
    // Return the text for all of the slides.
    // For the text of each slide, add "before_slide" in front of the
    // text, and "after_slide" after the text.
    // For example:
    // document.write("<ul>");
    // document.write(s.get_all_text("<li>","\n"));
    // document.write("<\/ul>");
  
    all_text = "";
  
    // Loop through all the slides in the slideshow
    for (i=0; i < this.slides.length; i++) {
  
      slide = this.slides[i];
    
      if (slide.text) {
        all_text += before_slide + slide.text + after_slide;
      }
  
    }
  
    return(all_text);
  }


  //--------------------------------------------------
  this.display_text = function(text) {
    // Display the text for the current slide
  
    // If the "text" arg was not supplied (usually it isn't),
    // get the text from the slideshow
    if (!text) {
      text = this.slides[ this.current ].text;
    }
  
    // If a textarea has been specified,
    // then change the text displayed in it
    if (this.textarea && typeof this.textarea.value != 'undefined') {
      this.textarea.value = text;
    }

    // If a text id has been specified,
    // then change the contents of the HTML element
    if (this.textid) {

      r = this.getElementById(this.textid);
      if (!r) { return false; }
      if (typeof r.innerHTML == 'undefined') { return false; }

      // Update the text
      r.innerHTML = text;
    }
  }


  //--------------------------------------------------
  this.hotlink = function() {
    // This method calls the hotlink() method for the current slide.
  
    this.slides[ this.current ].hotlink();
  }


  //--------------------------------------------------
  this.save_position = function(cookiename) {
    // Saves the position of the slideshow in a cookie,
    // so when you return to this page, the position in the slideshow
    // won't be lost.
  
    if (!cookiename) {
      cookiename = this.name + '_slideshow';
    }
  
    document.cookie = cookiename + '=' + this.current;
  }


  //--------------------------------------------------
  this.restore_position = function(cookiename) {
  // If you previously called slideshow_save_position(),
  // returns the slideshow to the previous state.
  
    //Get cookie code by Shelley Powers
  
    if (!cookiename) {
      cookiename = this.name + '_slideshow';
    }
  
    var search = cookiename + "=";
  
    if (document.cookie.length > 0) {
      offset = document.cookie.indexOf(search);
      // if cookie exists
      if (offset != -1) { 
        offset += search.length;
        // set index of beginning of value
        end = document.cookie.indexOf(";", offset);
        // set index of end of cookie value
        if (end == -1) end = document.cookie.length;
        this.current = parseInt(unescape(document.cookie.substring(offset, end)));
        }
     }
  }


  //--------------------------------------------------
  this.noscript = function() {
    // This method is not for use as part of your slideshow,
    // but you can call it to get a plain HTML version of the slideshow
    // images and text.
    // You should copy the HTML and put it within a NOSCRIPT element, to
    // give non-javascript browsers access to your slideshow information.
    // This also ensures that your slideshow text and images are indexed
    // by search engines.
  
    $html = "\n";
  
    // Loop through all the slides in the slideshow
    for (i=0; i < this.slides.length; i++) {
  
      slide = this.slides[i];
  
      $html += '<P>';
  
      if (slide.link) {
        $html += '<a href="' + slide.link + '">';
      }
  
      $html += '<img src="' + slide.src + '" ALT="slideshow image">';
  
      if (slide.link) {
        $html += "<\/a>";
      }
  
      if (slide.text) {
        $html += "<BR>\n" + slide.text;
      }
  
      $html += "<\/P>" + "\n\n";
    }
  
    // Make the HTML browser-safe
    $html = $html.replace(/\&/g, "&amp;" );
    $html = $html.replace(/</g, "&lt;" );
    $html = $html.replace(/>/g, "&gt;" );
  
    return('<pre>' + $html + '</pre>');
  }


  //==================================================
  // Private methods
  //==================================================

  //--------------------------------------------------
  this.loop = function() {
    // This method is for internal use only.
    // This method gets called automatically by a JavaScript timeout.
    // It advances to the next slide, then sets the next timeout.
    // If the next slide image has not completed loading yet,
    // then do not advance to the next slide yet.

    // Make sure the next slide image has finished loading
    if (this.current < this.slides.length - 1) {
      next_slide = this.slides[this.current + 1];
      if (next_slide.image.complete == null || next_slide.image.complete) {
        this.next();
      }
    } else { // we're at the last slide
      this.next();
    }
    
    // Keep playing the slideshow
    this.play( );
  }


  //--------------------------------------------------
  this.valid_image = function() {
    // Returns 1 if a valid image has been set for the slideshow
  
    if (!this.image)
    {
      return false;
    }
    else {
      return true;
    }
  }

  //--------------------------------------------------
  this.getElementById = function(element_id) {
    // This method returns the element corresponding to the id

    if (document.getElementById) {
      return document.getElementById(element_id);
    }
    else if (document.all) {
      return document.all[element_id];
    }
    else if (document.layers) {
      return document.layers[element_id];
    } else {
      return undefined;
    }
  }
  

  //==================================================
  // Deprecated methods
  // I don't recommend the use of the following methods,
  // but they are included for backward compatibility.
  // You can delete them if you don't need them.
  //==================================================

  //--------------------------------------------------
  this.set_image = function(imageobject) {
    // This method is deprecated; you should use
    // the following code instead:
    // s.image = document.images.myimagename;
    // s.update();

    if (!document.images)
      return;
    this.image = imageobject;
  }

  //--------------------------------------------------
  this.set_textarea = function(textareaobject) {
    // This method is deprecated; you should use
    // the following code instead:
    // s.textarea = document.form.textareaname;
    // s.update();

    this.textarea = textareaobject;
    this.display_text();
  }

  //--------------------------------------------------
  this.set_textid = function(textidstr) {
    // This method is deprecated; you should use
    // the following code instead:
    // s.textid = "mytextid";
    // s.update();

    this.textid = textidstr;
    this.display_text();
  }
}

// Used to retrive a variable from the URL string
// Use the GET method
// Input: name  -- Variable name as given in the URL string
function getVar(name)
{
  get_string = document.location.search;         
  return_value = '';
         
  do 
  { //This loop is made to catch all instances of any get variable.
    name_index = get_string.indexOf(name + '=');
            
    if(name_index != -1)
    {
      get_string = get_string.substr(name_index + name.length + 1, get_string.length - name_index);
              
      end_of_value = get_string.indexOf('&');
      
      if(end_of_value != -1)                
        value = get_string.substr(0, end_of_value);                
      else                
        value = get_string;                
                
      if(return_value == '' || value == '')
        return_value += value;
      else
        return_value += ', ' + value;
    }
  } while(name_index != -1)
            
  //Restores all the blank spaces.
  space = return_value.indexOf('+');
  
  while(space != -1)
  { 
    return_value = return_value.substr(0, space) + ' ' + 
                   return_value.substr(space + 1, return_value.length);
							 
    space = return_value.indexOf('+');
  }
          
  return(return_value);        
}
