function showgrad(){
 //Define and populate the array 
 var bsugrad = new Array;
 bsugrad[0]="skarie";
 bsugrad[1]="bowe";
 bsugrad[2]="berne";
 bsugrad[3]="tieben"; 
 
 var gradquote = new Array;
 gradquote[0]="<p>&quot\;My education steered me toward that type of lifestyle and awareness. It obviously changed me for the better -- being aware of your surroundings, the world around you, how to absorb it, and make something of it.&quot\;<\/p><p>- John Skarie, Class of 1993<\/p>";
 gradquote[1]="<p>&quot\;I had an opportunity here to do a real research project -- funded and likely published.&quot\;<\/p><p>- Shane Bowe, Class of 2004<\/p>";
 gradquote[2]="<p>&quot\;My BSU friends and colleagues instilled in me the belief that I could do anything I set my mind to, despite any limitations I may have.&quot\;<\/p><p>- Berne Christiansen, Class of 2007<\/p>";
 gradquote[3]="<p>&quot\;The leadership roles I've been put into have helped me realize what I really want to do. I couldn't imagine a better place to spend my undergraduate years.&quot\;<\/p><p>- Katherine Tieben, Class of 2007<\/p>";

 //Generate a random number then display the image from that array index
 rdmImage = Math.floor(Math.random()*bsugrad.length);
 document.write('<div id=\"adm-bsu-grad\"><img border=\"0\" class=\"gradpic\" height=\"163\" alt=\"Photo of student\" src=\"\/admissions\/undergrad\/images\/bsugradpics\/bsugrad-' + bsugrad[rdmImage] + '.gif\" width=\"89\"\/><h3><span class=\"png\" style=\"background: transparent url(\/primarytemplatefiles\/admissions\/images\/bsu-grad-h3.gif) no-repeat scroll 0pt 50%\; position: absolute\; width: 106px\; height: 10px\;\">\. <\/span><\/h3>' + gradquote[rdmImage] + '<\/div>');
 
}


var lastCustomer = null;
var lastitem = null;

function showThis(custer){
 var d = document.getElementById(custer);
 if (lastCustomer)
 lastCustomer.style.display = "none";
 d.style.display = "block";
 lastCustomer = d;

}

function hideThem(lastCustomer){
 if (lastCustomer)
 lastCustomer.style.display = "none";
}

function hideThis(custe){
 var c = document.getElementById(custe);
if (custe)
 c.style.display = "none";
}

function showWarning(warning){

var warn = document.getElementById(warning);
var TheForm;
TheForm = document.visitform;

if (TheForm.DayofVisit.value=="Saturday")
	warn.style.display = "block";

}

function showTimeWarning(warning){

var warn2 = document.getElementById(warning);
var TheForm;
TheForm = document.visitform;

if (TheForm.TimeofVisit.value=="11am")
	warn2.style.display = "block";
	
}



function highlight_tabs() { 
	// cur_url -- usually set to window.location.href;
	//var cur_url = "http://www.bemidjistate.edu/admissions/explore/academics/overview";
	var cur_url = window.location.href;

	var nav = document.getElementById('navigation');
//	alert(nav);
	var nav_uls = nav.getElementsByTagName('ul');
//	alert(nav_uls);
	var main_ul_selected = false;
	

	
	//alert(nav_uls.length);
	
	for( var j=0; j<nav_uls.length; j++) {

		if (nav_uls[j].getAttribute && nav_uls[j].getAttribute('class') != 'sub' && nav_uls[j].getAttribute('className') != 'sub') {

			
			// we now have each of the main uls.
			var main_ul = nav_uls[j];
			var main_li	= main_ul.firstChild;
			var main_a = main_li.firstChild;

			if ( cur_url.match(main_a.getAttribute('href')) == main_a.getAttribute('href') && main_ul_selected == false) {
				main_ul.setAttribute('class','current');
				main_ul.setAttribute('className','current');
				if (main_ul.getElementsByTagName) {
					var sub_divs = main_ul.getElementsByTagName('div');						
					for(var k=0; k<sub_divs.length; k++) {
						// we are now in the secondary nav div (containing a ul)
						var sub_div = sub_divs[k];
						if (sub_div.getElementsByTagName) {
							sub_div.setAttribute('class','select_sub show');
							sub_div.setAttribute('className','select_sub show');
							var lis = sub_div.getElementsByTagName('li');
							var num_selected =0;
							for ( var el = lis.length-1; el > -1; el--) { // reverse order since the least specific url in a list is first.
								var li = lis[el];  // we now cycle through the lis in the sub_nav
								var li_selected = false;
								if (li.getElementsByTagName){
									var links = lis[el].getElementsByTagName('a');
									for (var i=0; i<links.length; i++) { 
										var link = links[i];
										if (link.getAttribute){
											if (cur_url.match(link.getAttribute('href') )){
												li_selected = true;
												sub_ul_selected = true;
												main_ul_selected = true;
												num_selected++;
											}
										}
									}
									if (li_selected && num_selected == 1) {
										li.setAttribute('class','sub_show');
										li.setAttribute('className','sub_show');
									}
								}
							}
						}
					}
					// end of working through the sub_ul.
				}	
				main_ul_select = true;					
			}
		}
	}
}







