/*
*************************************************************************************
* Title:		aryNav.js
* Description:
*
*************************************************************************************
* Called From:	KB results page (kb_results.a4d).
* Call Sequence:	
* Requires:		
* Returns:
* Queries from:	
*************************************************************************************
* Creation Date:	
* Mods History:
* Date	Name	Line #	Marker
*
*	31 July 2006 KAB	596; 873; 1121
*	Located and modified kbreport function to process index values for each 
*	KB reporting option in kb_results.a4d
*
*************************************************************************************
*/


if (document.images) {	

	//main nav images

	industryon = new Image();
	industryon.src = "/images/nav/industry_roll.gif";
	industryoff = new Image();
	industryoff.src = "/images/nav/industry.gif";
	
	abouton = new Image();
	abouton.src = "/images/nav/about_roll.gif";
	aboutoff = new Image();
	aboutoff.src = "/images/nav/about.gif";
	
	serviceson = new Image();
	serviceson.src = "/images/nav/services_roll.gif";
	servicesoff = new Image();
	servicesoff.src = "/images/nav/services.gif";
	
	eventson = new Image();
	eventson.src = "/images/nav/events_roll.gif";
	eventsoff = new Image();
	eventsoff.src = "/images/nav/events.gif";
	
	facultyon = new Image();
	facultyon.src = "/images/nav/faculty_roll.gif";
	facultyoff = new Image();
	facultyoff.src = "/images/nav/faculty.gif";
	
	libraryon = new Image();
	libraryon.src = "/images/nav/library_roll.gif";
	libraryoff = new Image();
	libraryoff.src = "/images/nav/library.gif";
	
	//descriptions
	
	industry = new Image();
	industry.src = "/images/nav/description_industry.gif";
	
	about = new Image();
	about.src = "/images/nav/description_about.gif";
	
	services = new Image();
	services.src = "/images/nav/description_services.gif";
	
	events = new Image();
	events.src = "/images/nav/description_events.gif";
	
	faculty = new Image();
	faculty.src = "/images/nav/description_faculty.gif";
	
	library = new Image();
	library.src = "/images/nav/description_library.gif";
	

}

function kbreport(url) {
	
	if(document.kbreportform.kbreports.options.selectedIndex > 2){
		document.kbreportform.action = document.kbreportform.kbreports.options[document.kbreportform.kbreports.options.selectedIndex].value;
		document.kbreportform.submit();
	}
	else{
	top.winRef = window.open(url,'kbreport','width=940,height=786,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1');
	}

}

function revert (){

   document.advanced_search_form.reset();
  return false;
}

function clearFields (advanced){

	if(advanced){
		document.advanced_search_form.faculty_name.value = "";
		document.advanced_search_form.faculty_dlc.value = "";
		document.advanced_search_form.faculty_codlc.checked = false;
		document.advanced_search_form.faculty_title.value = "";
		document.advanced_search_form.faculty_bio.value = "";
		document.advanced_search_form.faculty_related.value = "";
	
		document.advanced_search_form.project_title.value = "";
		document.advanced_search_form.project_investigator.value = ""; 
		document.advanced_search_form.project_coinvestigator.checked =false; 
		document.advanced_search_form.project_dlc.value = ""; 	
		document.advanced_search_form.project_codlc.checked = false;
		document.advanced_search_form.project_abstract.value = ""; 	
		document.advanced_search_form.project_todate.value = ""; 	
		document.advanced_search_form.project_fromdate.value = ""; 
	
		document.advanced_search_form.pub_title.value = ""; 	
		document.advanced_search_form.pub_author.value = ""; 
		document.advanced_search_form.pub_abstract.value = ""; 	
		document.advanced_search_form.pub_fromdate.value = "";	
		document.advanced_search_form.pub_todate.value = "";	
		document.advanced_search_form.pub_nonmitauthor.checked =false;	
	
		 document.advanced_search_form.dlc_name.value = "";	
		 document.advanced_search_form.dlc_overview.value = "";
		 document.advanced_search_form.dlc_related.value = "";	 
		 document.advanced_search_form.dlc_code.value = "";	 
}	 
else{
	document.kb_search_form.searchString.value = "";
	document.kb_search_form.project.checked = false;
	document.kb_search_form.department.checked = false;
	document.kb_search_form.publications.checked = false;
	document.kb_search_form.facultyName.checked = false;
	document.kb_search_form.kb_extendedsearch.checked = false;
	
		
	
}
	return false;
}