var identity = new Array(4);
identity[0]= char(64) + "Im" + char(97) + "g" + char(101) + "n-Bi" + char(111) + "t" + char(101) + char(99) + "h." + char(99) + char(111) + "m";
identity[1]= char(73) + "nfo";
identity[2]="R" + char(111) + "d.B" + char(101) + "ns" + char(111) + "n";
identity[3]="G" + char(97) + "r" + char(101) + "th.Griffiths";
var ObjMenuPos=window.top.document.getElementById("MenuPos");

function IgnoreError(message,url,line){
return true;
}

function char(pNum){
	return String.fromCharCode(pNum);
}

function ContextMenu(pEvent){
	if (!pEvent) var pEvent=window.event;
	thislink = (pEvent.target) ? pEvent.target: pEvent.srcElement;
	if (!confirm("If you are using Internet Explorer and an older version of office then we recommend you select to save these example files rather than open them directly from the website because older versions of Excel will open within Internet Explorer which is particularly confusing." + char(13) + char(13) + "You should also note that Internet Explorer pre-version 8 does not give you the choice to save the file; instead, the file will open in a new browser window." + char(13) + char(13) + "Therefore if you are using a pre-office 2007 Excel and pre-version 8 Internet Explorer, push the Cancel button below and then right click the link and select 'Save Target As...' from the context menu.")) return false;
	return true;
}

function GetEmailAddress(pID){
	thislink=document.getElementById(pID);
	if (thislink.id=="Admin") Num=1;
	if (thislink.id=="Admin2") Num=1;
	if (thislink.id=="Rmail") Num=2;
	if (thislink.id=="Gmail") Num=3;
	operation="m" + char(97) + "ilt" + char(111) + ":";
	thislink.href=operation + identity[Num] + identity[0];
}

function ClearMenus(){
	StopScroll();
	if (ObjMenuPos.innerHTML!=""){
		OldObj=window.top.document.getElementById(ObjMenuPos.innerHTML); 
		a=findchild(OldObj,"#text");
		a.nodeValue="";
		a=findchild(OldObj,"A");
		a.style.display="inline";
	}
}

function StopScroll(){
	window.top.document.getElementById("ScrollFlag").innerHTML="false";
}

window.onerror=IgnoreError;
if (link=document.getElementById("Rmail")) link.innerHTML=identity[2] + identity[0];
if (link=document.getElementById("Gmail")) link.innerHTML=identity[3] + identity[0];
if (link=document.getElementById("Admin")) link.innerHTML=identity[1] + identity[0];
if (parent.frames.length==0) window.location="index.html?" + window.location.pathname + "#" + document.getElementById("MenuPos").innerHTML

function findchild(obj,tag){
	cn=obj.childNodes;
	for (k=0; k<cn.length; k++){
		if (cn[k].nodeName==tag) return cn[k];
	}
	return false;
}
