function print(txt)
{
	return document.writeln(txt);
}
/*------------------------------------------------------------------------------------
------------------------------MAIN MENU-------------------------------------------
---------------------------------------------------------------------------------------*/

// Declare and expand submenus as needed, follow the pattern
var submenu=new Array();
submenu[0] = '';
submenu[1] = '\
			<a href="/people-faculty.html" style="margin-left: 10px;">Faculty</a>\
			| <a href="/people-staff.html" >Staff</a>\
			| <a href="/people-gradstudents.html" >Graduate Students</a>\
			';
submenu[2] = '\
			<a href="/graduate-ma.html" style="margin-left: 70px; ">Masters</a>\
			| <a href="/graduate-phd.html">Ph.D.</a>\
			| <a href="/grad-activity.html" >Student Activity</a>\
			';
submenu[3] = '\
			<a href="/undergraduate-degreeplan.html" style="margin-left: 140px; ">Degree Plan</a>\
			| <a href="/undergraduate-minors.html" >Minors</a>\
			| <a href="/undergraduate-courses.html" >Courses</a>\
			| <a href="/undergraduate-forms.html">Forms</a>\
			';
submenu[4] = '\
			<a href="/news/" style="margin-left: 280px; ">News &amp; Events</a>\
			| <a href="/calendar.html" >Calendar</a>\
			| <a href="/sdp/index.html" >SDP</a>\
			';
submenu[5] = '\
			<a href="http://cushing.library.tamu.edu/collections/browse-major-collections/don-quixote-illustrated" target="_blank" style="margin-left: 200px;">Cervantes Project</a>\
			| <a href="http://ciney.tamu.edu/" target="_blank" >CineY</a>\
			| <a href="http://academiaeditorial.com/cms/index.php?page=anuario-de-estudios-cervantinos" target="_blank" >Anuario de Estudios Cervantinos</a>\
			| <a href="http://hisp.tamu.edu/hpr/" target="_blank">Hispanic Poetry Review</a>\
			| <a href="/publications.html" >Publications</a>\
			';
submenu[6] = '\
			<a href="/studyabroad/toledo/" style="margin-left: 400px;">Toledo</a>\
			| <a href="/studyabroad/cuernavaca/" >Cuernavaca</a>\
			| <a href="/studyabroad/camino/" >Camino del Santiago</a>\
			| <a href="/studyabroad/scholarship and prizes.html">Scholarships and Prizes</a>\
			';
submenu[7] = '';

//---------------------Functions to show/hide submenus---------------------------
//Menu to disapear after "delay_hide" millisecs
var delay_hide=1000;

function showit(which){
	clear_delayhide()
	thecontent=(which==-1)? "" : submenu[which]
	if (document.getElementById||document.all)
		menuobj.innerHTML=thecontent
	else if (document.layers){
		menuobj.document.write(thecontent)
		menuobj.document.close()
	}
}
function resetit(e){
	if (document.all&&!menuobj.contains(e.toElement))
		delayhide=setTimeout("showit(-1)",delay_hide)
	else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		delayhide=setTimeout("showit(-1)",delay_hide)
}
function clear_delayhide(){
	if (window.delayhide)
		clearTimeout(delayhide)
}
function contains_ns6(a, b) {
	while (b.parentNode){
		if ((b = b.parentNode) == a)
			return true;
		return false;
	}
}

/*------------------------------------------------------------------------------------
------------------------------SUBMENUS-------------------------------------------
Used on studyabroad.html and individual faculty pages (array located in the page)
---------------------------------------------------------------------------------------*/
//the following is to switch the content
function hidePage(a) {
	var ID = document.getElementById(a);
	ID.style.display = 'none';
	ID.style.visibility = 'hidden';
}
function hideAllPages() {
	for (i = 0; i < thePages.length; i++) {
		hidePage(thePages[i]);
	}
}
function showPage(p) {
	var ID = document.getElementById(p);
	hideAllPages();
	ID.style.display = 'block';
	ID.style.visibility = 'visible';
}