// Load this page into the frame in index.htm
// The name of this page is passed to index.htm as a parameter
// The point is to stop pages being loaded that are not in
// a frame and therefore have no navigation buttons
function LoadFrame()
{
   	if (window == window.top)
	{
		var Target = "../index.htm?";
		var Page = window.location.pathname;
		var Len = Page.length;
		Page = Page.substring(1,Len);
		window.location.replace(Target + Page);
	}
}

// Function to try to stop the spammers
// the email address is built in steps so
// a real address never appears in a web page
function MailTo(Name)
{
	var add = "mailto:";
	add += Name;
	add += "@";
	add += "sm-ee.co.uk";
	window.location.href = add;
}

function LastModified()
{
	// unfortunately lastModified returns the date in US format
	var Time = Date.parse(document.lastModified);
	var Now = new Date();
	if(Time != 0)
	{
		Now.setTime(Time);
		document.open();
		document.write('<p><hr><small><i>Last Modified: '
						+ Now.getDate()
						+ '/'
						+ (Now.getMonth() + 1)
						+ '/'
                        + Now.getFullYear()
                        + '</i></small></p>');
      document.close();
   }
}
function LoadButtons(Title)
{
   var Buttons = parent.buttons;
   if(Buttons != undefined && Buttons.document.title != Title)
   {
      Buttons.location.replace(Title + ".htm");
   }
}
