function changeSearch(sel) {

	//declare all the arrays to hold the variable attributes of the different search forms
	var arrAction = new Array();
	var arrMethod = new Array();
	var arrSiteSearch = new Array();
	var arrTextFldName = new Array();
	var arrTextFldTitle = new Array();
	var arrTextFldVal = new Array();

	//Populate the arrays with the attributes for each form in the following order
	//Site | Section | AZ | Staff

	arrAction[0] = 'http://www.reading.ac.uk/search/public/search';
	arrAction[1] = 'http://www.reading.ac.uk/search/public/search';
	arrAction[2] = 'http://www.reading.ac.uk/internal/staffportal/atoz/sp-atoz-search.aspx';
	arrAction[3] = 'http://www.reading.ac.uk/search/search-index.aspx?url=http://www.extra.rdg.ac.uk/search/personresults.asp';

	arrMethod[0] = 'get';
	arrMethod[1] = 'get';
	arrMethod[2] = 'get';
	arrMethod[3] = 'post';

	arrSiteSearch[0] = '';
	arrSiteSearch[1] = '';
	arrSiteSearch[2] = '';
	arrSiteSearch[3] = '';

	arrTextFldName[0] = 'q';
	arrTextFldName[1] = 'q';
	arrTextFldName[2] = 'searchobj';
	arrTextFldName[3] = 'LastName';

	arrTextFldTitle[0] = '';
	arrTextFldTitle[1] = '';
	arrTextFldTitle[2] = '';
	arrTextFldTitle[3] = 'Enter your search text here';

	arrTextFldVal[0] = 'search Henley';
	arrTextFldVal[1] = 'search Reading';
	arrTextFldVal[2] = 'Enter your search text here';
	arrTextFldVal[3] = 'Enter a surname';

	//set the form attributes depending on the user selection

	elForm = document.getElementById('searchForm');
	elForm.action = arrAction[sel];
	elForm.method = arrMethod[sel];

	elSiteSearch = document.getElementById('sitesearch');
	elSiteSearch.value = arrSiteSearch[sel];

	elTextFld = document.getElementById('text');
	elTextFld.name = arrTextFldName[sel];
	elTextFld.title = arrTextFldTitle[sel];
	elTextFld.value = arrTextFldVal[sel];

} //function
