//

var time = 3000;
var numofitems = 8;

//enable deletion of specified newsletters

function Form0_Submit(sFileName)
{

window.document.forms[0].MyFileName.value=sFileName;
window.document.forms[0].submit();

}

//menu constructor

function menu(allitems,thisitem,startstate)
{ 
	callname= "gl"+thisitem;
	divname="subglobal"+thisitem;  
	this.numberofmenuitems = allitems;
	this.caller = document.getElementById(callname);
	this.thediv = document.getElementById(divname);
	this.thediv.style.visibility = startstate;
}
				 
//menu methods

function ehandler(event,theobj)
{
	for (var i=1; i<= theobj.numberofmenuitems; i++){
		var shutdiv =eval( "menuitem"+i+".thediv");
    	shutdiv.style.visibility="hidden";
	}
	theobj.thediv.style.visibility="visible";
}
				
function closesubnav(event)
{
  	if ((event.clientY <110)||(event.clientY > 170)){
    	for (var i=1; i<= numofitems; i++){
      		var shutdiv =eval('menuitem'+i+'.thediv');
			shutdiv.style.visibility='hidden';
		}  
	}
}

//display an image in a separate closeable window

function imagewin(winurl,winwidth,winheight)
{
	 newwindoc = window.open ("", "", "width=" + winwidth + ",height=" + winheight);
	 newwindoc.document.open("text/html");
	 newwindoc.document.bgColor="white";
	 newwindoc.document.fgColor="white";
	 newwindoc.document.write("<html lang=" + '"' + "eng" + '"' + ">");
	 newwindoc.document.write("<head>");
	 newwindoc.document.write("<link rel=" + '"' + "stylesheet" + '"' + " TYPE=" + '"' + "text/css" + '"' + " HREF=" + '"' + "../stylesheets/emx_nav_right.css" + '"' + ">");
	 newwindoc.document.write("</head>");
	 newwindoc.document.write('<body>');
	 newwindoc.document.write('<div id="pagecell1">');
	 newwindoc.document.write("<center><a href=" + '"' + "#" + '"' + " onclick=" + '"' + "self.close();return false;" + '"' + " class=" + '"' + "closelinktext" + '"' + "><font color=red><b>Close Window</b></font></a></center>");
	 newwindoc.document.write("<br><center><img src=" + winurl + "></center>");
	 newwindoc.document.write("<p class=" + '"' + "contenttext" + '"' + ">");
	 newwindoc.document.write("<hr/><br/><b>St. Hugh of Lincoln, Knaphill, Woking</b><br>");
	 newwindoc.document.write("<b>Tel:</b> 01483 472404&nbsp;&nbsp;<b>Fax:</b> 01483 472404<br><b>Email:</b> sthugh.secretary@ntlworld.com");
	 newwindoc.document.write("</p>");
	 newwindoc.document.write("<br/>");
	 newwindoc.document.write("</div>");
	 newwindoc.document.write("</body>");
	 newwindoc.document.write("</html>");
}

//print the current page

function printwin() 
{
	 var windoc = parent.mainFrame.document.all.printable.innerHTML;
	 newwindoc = window.open ("", "", "scrollbars,width=800,height=600");
	 newwindoc.document.open("text/html");
	 newwindoc.document.bgColor="white";
	 newwindoc.document.fgColor="white";
	 newwindoc.document.write("<html lang=" + '"' + "eng" + '"' + ">");
	 newwindoc.document.write("<head>");
	 newwindoc.document.write("<link rel=" + '"' + "stylesheet" + '"' + " TYPE=" + '"' + "text/css" + '"' + " HREF=" + '"' + "../stylesheets/emx_nav_right.css" + '"' + ">");
	 newwindoc.document.write("</head>");
	 newwindoc.document.write('<body>');
	 newwindoc.document.write('<div id="pagecell1">');
	 newwindoc.document.write("<center><a href=" + '"' + "#" + '"' + " onclick=" + '"' + "self.close();return false;" + '"' + " class=" + '"' + "closelinktext" + '"' + "><font color=red><b>Close Window</b></font></a></center>");
	 newwindoc.document.write(windoc);
	 newwindoc.document.write("<p class=" + '"' + "contenttext" + '"' + ">");
	 newwindoc.document.write("<hr/><br/><b>St. Hugh of Lincoln, Knaphill, Woking</b><br>");
	 newwindoc.document.write("<b>Tel:</b> 01483 472404&nbsp;&nbsp;<b>Fax:</b> 01483 472404<br><b>Email:</b> sthugh.secretary@ntlworld.com");
	 newwindoc.document.write("</p>");
	 newwindoc.document.write("<br/>");
	 newwindoc.document.write("</div>");
	 newwindoc.document.write("</body>");
	 newwindoc.document.write("</html>");
	 newwindoc.location.reload(false);
	 newwindoc.print();
}

//display a specified page in the main frame

function showmain(winurl)
{
	 parent.mainFrame.document.location=winurl;
}

