// This file cycles through an array of links.  If the link references the current page, we display the text



// of the item only.  Otherwise, we display a link to the item.



var links_text = new Array ("Home", "Directions", "Hotels", "Activities", "Policies", "Let's Read!", "Guestbook", "Greensboro Weather", "A&T's Home Page");



var links = new Array ("index", "memories", "hotels", "activities", "policies", "read", "guestbook", "Greensboro.html", "index.html");



var links_url = new Array ("http://www.ncat.edu/events/homecoming/2003/index.html", "http://www.ncat.edu/events/homecoming/2003/memories.html", "http://www.ncat.edu/events/homecoming/2003/hotels.html", "http://152.8.105.10:8080/examples/jsp/robinsfiles/home2003/J21work/activities.jsp", "http://www.ncat.edu/events/homecoming/2003/policies.html", "http://www.ncat.edu/events/homecoming/2003/read.html", "http://www.ncat.edu/events/homecoming/2003/guestbook.html", "http://www.wunderground.com/US/NC/Greensboro.html", "http://www.ncat.edu/index.html");



var links_title = new Array ("Homecoming 2003!", "Directions", "Hotels", "Activities", "Policies", "Let's Read!", "Guest Book", "Greensboro Weather", "A&T's Home Page");











function get_page_name () {



// Get URL of current page.  Convert it from object to string so we can work with it.



var loc = String (this.location); 



// loc is now http://alumband/indexnew.html







// Replace slashes in URL with commas.  Also create an array that has each of the sections



// of the URL in one slot in the array.



loc=loc.split("/"); 



// loc is now http:,,www.ncat.edu,~alumband,indexnew.html 



// Also:







// loc[0] = http:



// loc[1] = 



// loc[2] = www.ncat.edu



// loc[3] = ~alumband



// loc[4] = indexnew.html







// Set loc to the last item in the array.



loc = loc[loc.length-1];



// loc is now indexnew.html







// Create an array that splits indexnew and html apart from each other.



loc = loc.split(".");



// loc is now indexnew, html



// loc[0] - indexnew



// loc[1] = html







loc=loc[loc.length-2]; 



return (loc);



}





function write_image (img_num) {

	// Each of the buttons is represented by a number.  This function writes the image that

	// corresponds to the number that was passed in.

	switch (img_num) {
			case 0:
  				document.write ("<a href='http://www.ncat.edu/events/homecoming/2003/index.html' onMouseOver='mouse_over_img(homeover.src)' onMouseOut='mouse_out_img(homeout.src)'><img src='images/homeout.jpg' width='97' height='45' name='home' border='0' alt='Homecoming 2003 Main Page'></a>");
				break;
				
			case 1:
  				document.write ("<a href='http://www.ncat.edu/events/homecoming/2003/memories.html' onMouseOver='mouse_over_img(directover.src)' onMouseOut='mouse_out_img(directout.src)'><img src='images/directout.jpg' width='97' height='45' name='direct' border='0' alt='Homecoming Photo Gallery'></a>");
				break;
				
		//	case 2:
 		//		document.write ("<a href='http://www.ncat.edu/events/homecoming/2003/hotels.html' onMouseOver='mouse_over_img(hotelsover.src)' onMouseOut='mouse_out_img(hotelsout.src)'><img src='images/hotelsout.jpg' width='97' height='45' name='hotels' border='0' alt='Homecoming Hotels'></a>");
			//	break;
				
		//	case 3:
 		//		document.write ("<a href='http://www.ncat.edu/events/homecoming/2003/activities.html' onMouseOver='mouse_over_img(activitiesover.src)' onMouseOut='mouse_out_img(activitiesout.src)'><img src='images/activitiesout.jpg' width='97' height='45' name='activities' border='0' alt='Schedule of Activities'></a>");
		//		break; 

		//	case 4:
 		//		document.write ("<a  href='http://www.ncat.edu/events/homecoming/2003/policies.html' onMouseOver='mouse_over_img(ticketsover.src)' onMouseOut='mouse_out_img(ticketsout.src)'><img  src='images/ticketsout.jpg' width='97' height='45' name='tickets' border='0' alt='Policies'></a>");
		//		break;
				
		//	case 5:
 		//		document.write ("<a href='http://www.ncat.edu/events/homecoming/2003/read.html' onMouseOver='mouse_over_img(duboisover.src)' onMouseOut='mouse_out_img(duboisout.src)'><img src='images/duboisout.jpg' width='97' height='45' name='dubois' border='0' alt='Read!'></a>");
		//		break;
				
			case 6:
 				document.write ("<a href='http://www.ncat.edu/events/homecoming/2003/guestbook.html' onMouseOver='mouse_over_img(guestbookover.src)' onMouseOut='mouse_out_img(guestbookout.src)'><img src='images/guestbookout.jpg' width='97' height='45' name='guestbook' border='0' alt='Read and Sign our Guestbook!'></a>");
				break;

		//	case 7:
  		//		document.write ("<a href='http://www.wunderground.com/US/NC/Greensboro.html' onMouseOver='mouse_over_img(weatherover.src)' onMouseOut='mouse_out_img(weatherout.src)'><img src='images/weatherout.jpg' width='97' height='45' name='weather' border='0' alt='Greensboro Weather'></a>");
		//		break;
			
			case 8:
  				document.write ("<a href='http://www.ncat.edu/index.html' onMouseOver='mouse_over_img(athomeover.src)' onMouseOut='mouse_out_img(athomeout.src)'><img src='images/athomeout.jpg' width='97' height='45' name='athome' border='0' alt='AT Home'></a>");
				break;
				

	}

}



function display_menu_items() {



	// Cycle through the links array.  If the name of the file in the array cell is the current page, just



	// write the text of the filename.  Otherwise, write a link to the page.



	var name_of_this_file;



	name_of_this_file = get_page_name();

	for(var i=0; i < links.length; i++) {  
  		if (name_of_this_file != links[i]) {			
		//	document.write ("[ " + "<font face='Arial' size='2'>" + "<a href= '" + links_url[i] + "'>" + links_text[i] + "</a>" + "</font>" + " ] ");
			write_image (i);
		}
	}
}

function generate_menu() {

 	display_menu_items();



}







generate_menu();



// document.write('<table class="explorer_active" onmouseover="this.className=&#39;:explorer_active&#39;:;return true" onmouseout="this.className=&#39;:explorer_active&#39;:;return true" onmousedown="this.className=&#39;:explorer_active&#39;:;return true" onclick="location.href=&#39;:&#39;: + links_url[i] + &#39;:&#39;:"><tr><td><a href="&#39;: + links_url[i] + &#39;:" class="menu">&#39;: + links_text[i] + &#39;: <b>»</b></a></td></tr></table>'); 



