
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);
}

		
for (var img_num=0; img_num < links.length; img_num++) {
	// Use img_num to determine:
	// - which images to display on and mouseout (note:  this is the same image that is displayed when the page initially loads).  
	// - alt text to display
	var page_to_link_to = links_url[img_num];
	var img_to_display_on_mouseout = out_images[img_num];
	var img_name = button_names[img_num];
	var alt_text = links_text[img_num];
	
	name_of_this_file = get_page_name();
	if (name_of_this_file != links[img_num])
		document.write ("<a href=" + "'" + page_to_link_to + "'"  + "onMouseOver='display_over_img(" + img_num + ")'" + "onMouseOut='display_out_img(" + img_num + ")'" +  ">" + "<img src=" + "'" + img_to_display_on_mouseout + "'" + " width=" + "'" + img_width + "'" + " height=" + "'" + img_height + "'" + " name=" + "'" + img_name + "'" + " border=" + "'" + img_border_size + "'" + " alt=" + "'" + alt_text + "'" + ">" + "</a>" + "<br>");				
}