// A set of JavaScripts for site-wide use. Last update 20070814


// Top-of-page  Applied to item jumps to top of page
//  For use in either or both side margins of a page

function goTop()
	{
	window.scrollTo(0,0);
	return true;
	}

	// next declaration and function are for netscape navigator
	// they are not needed for internet explorer or icab

	document.onClick=nnGoTop;

function nnGoTop(evnt)
	{
	if (evnt.pageX < 32)
	window.scrollTo(0,0);
	return true;
	}

// end of Top-of-page


// E-mail masking: "who" = email name   "site" = domain name   "ext" = domain designator
//  "handle" is optional, if supplied it appears as the link text instead of the address
//    put "handle" and "who" as the same, to display (clickable) name without an address

var dot_ = new Array()
	dot_[0] = "";
	dot_[1] = ".org.uk";
	dot_[2] = ".org";
	dot_[3] = ".ac.uk";
	dot_[4] = ".co.uk";
	dot_[5] = ".com";


function contact(who,site,ext,handle)
	{
	if (handle != null)
		document.write("<a href=" + "mail" + "to:" + who + "@" + site + dot_[ext]+ ">" + handle + "<\/a>" )
	else
		document.write("<a href=" + "mail" + "to:" + who + "@" + site + dot_[ext]+ ">" + who + "@" + site + dot_[ext] + "<\/a>" )
	}

// end of E-mail masking
