/*
	These JavaScripts were written by Pj Media
	for the sole purpose of use on this Website.
	To contact Pj Media please e-mail us at

		  enquiries@pjmedia.8m.com
*/


function billError(billName) {

	// This function apologises for the two bills that have not yet been uploaded

	alert("Sorry!  The bill that you requested, \""+billName+"\", has not yet been placed on this website.  We intend to have it on as soon as possible.\nPlease check back soon, when hopefully we can satisfy your request.\n\nWebsite last modified: "+document.lastModified+".") }

function contactPJMedia() {

	/* This function opens a new e-mail to be sent
	to PJ Media */

	this.location.href = "mailto:enquiries@pjmedia.8m.com?SUBJECT=Website%20-%20The%20Lord%20Alderdice&BODY=Please%20enter%20your%20name%20and%20enquiries%20below%3A"; }

function credits() {

	//This function opens the credits window

	window.open("http://homepage.ntlworld.com/john.alderdice/credits.html","_blank","toolbar=no;location=no,scrollbar=no,resizeable=no,width=450,height=200"); }

function doScreenResize() {

	/* Dormant Function

	This function is no longer called because it
	does not give the desired affect when running
	frames. */

	var theWidth = 1024;
	var theHeight = 768;

	if((screen.width > 1024) && (theHeight > 768)) {
		theWidth = 1024;
		theHeight = 768; }

	if((screen.width < 1024) && (theHeight < 768)) {
		theWidth = screen.width;
		theHeight = screen.height; }

	window.resizeTo(theWidth,theHeight) }

function version() {

	/* Dormant Function

	This function is never called by any page, but
	can be called by a user typing:
 
		'javascript:version()'

	into his or her browser address panel.  It
	alerts the user with the date that the page
	was last modified. */

	alert(document.lastModified) }

function doAddBookmark(format) {

	//This function adds a bookmark to the user's browser

	formatLocation = (format == "frames") ? "frames" : format+"/index";

	var formatName = "";

	if(format == "noframes") formatName = " (No Frames)";
	if(format == "textonly") formatName = " (Text Only)";

	if (window.external) {
		if(confirm("Do you want to add this page to your \'Favorites\'?\n\nhttp://homepage.ntlworld.com/john.alderdice")) {
			external.AddFavorite("http://homepage.ntlworld.com/john.alderdice/"+formatLocation+".html","The Lord Alderdice FRCPsych"+formatName) }}
	else {
		alert("Unfortunately your browser does not support this feature."); } }


function doContactRedirect(websiteFormat) {

	/* This function redirects the page after POSTDATA has
	been successfully submitted and the user informed of
	its success. */

		//defines the directory and page to access
	endLocation = (websiteFormat == "frames") ? "frontpage" : websiteFormat+"/index";

	setTimeout("this.location.href = 'http://homepage.ntlworld.com/john.alderdice/'+endLocation+'.html'",10000); }


function GoTo(mainAddress,subLocation) {

	/* IMPORTANT FUNCTION

	This function is used in 'frames' to navigate between
	pages. */

	if(mainAddress == "") {
		this.location.href = "#"+subLocation; }
	else {
		if(subLocation == "" || subLocation == null) {
			this.location.href = mainAddress+".html"; }
		else {
			this.location.href = mainAddress+".html#"+subLocation; }} }


function DoBrowserCheck() {

	/* This function is a browser sniffer which displays
	a message or redirects the user appropriately. */

	var browserName = navigator.appName;
	var browserVersion = parseInt ( navigator.appVersion );

	if((browserName == "Netscape" && browserVersion >= 4 )||(browserName == "Microsoft Internet Explorer" && browserVersion >=4 )) {
		document.write('<HTML>');
		document.write('<HEAD>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/basehref_frames.js"></SCRIPT>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/commands.js"></SCRIPT>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/options.js"></SCRIPT>');
		document.write('<LINK REL=stylesheet TYPE="text/css" HREF="styles/error.css">');
		document.write('<META NAME="Description" CONTENT="The Lord Alderdice MLA (East Belfast) - This website is for use by The Lord Alderdice\'s constituents with constituency problems, people who wish to get in touch with The Lord Alderdice and for those who want to find out more about him.">');
		document.write('<META NAME="Keywords" CONTENT="The Lord Alderdice,Lord,Alderdice,East Belfast,Belfast,Northern Ireland,Politics,Alliance,MLA,Assembly,Westminster,House Of Lords,Constituency,Speaker,Liberal International,Liberal Democrats,ELDR,European Liberal and Democratic Reform Party,Stormont,">');
		document.write('<META NAME="Author" CONTENT="Pj Media">');
		document.write('<META NAME="Generator" CONTENT="Microsoft Notepad">');
		document.write('<META NAME="Language" CONTENT="EN">');
		document.write('<TITLE>The Lord Alderdice | Detecting Browser Version...</TITLE>');
		document.write('</HEAD>');
		document.write('<BODY>');
		document.write('<FONT SIZE="+2" FACE="Arial"><B>Loading...</B></FONT><P>&nbsp;<P>');
		document.write('<A HREF="javascript:GoTo(\'detect_screen\',\'\')" ONMOUSEOVER="self.status = \'Click Here!\'; return true" ONMOUSEOUT="self.status = \'\'; return true">If the following page fails to load please click here.</A>');
		document.write('</BODY>');
		document.write('</HTML>');
		this.location.href = "detect_screen.html";}
	else {
		document.write('<HTML>');
		document.write('<HEAD>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/basehref_frames.js"></SCRIPT>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/commands.js"></SCRIPT>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/options.js"></SCRIPT>');
		document.write('<LINK REL=stylesheet TYPE="text/css" HREF="styles/error.css">');
		document.write('<META NAME="Description" CONTENT="The Lord Alderdice MLA (East Belfast) - This website is for use by The Lord Alderdice\'s constituents with constituency problems, people who wish to get in touch with The Lord Alderdice and for those who want to find out more about him.">');
		document.write('<META NAME="Keywords" CONTENT="The Lord Alderdice,Lord,Alderdice,East Belfast,Belfast,Northern Ireland,Politics,Alliance,MLA,Assembly,Westminster,House Of Lords,Constituency,Speaker,Liberal International,Liberal Democrats,ELDR,European Liberal and Democratic Reform Party,Stormont,">');
		document.write('<META NAME="Author" CONTENT="Pj Media">');
		document.write('<META NAME="Generator" CONTENT="Microsoft Notepad">');
		document.write('<META NAME="Language" CONTENT="EN">');
		document.write('<TITLE>The Lord Alderdice | Detecting Browser Version...</TITLE>');
		document.write('</HEAD>');
		document.write('<BODY>');
		document.write('<FONT SIZE="+2" FACE="Arial"><B>Important!</B></FONT><P>');
		document.write('<FONT SIZE="-1">Welcome to Lord Alderdice\'s Website.  This website has been designed to be viewed using a version 4 or version 5 browser.  The version of your browser ('+browserName+') is only '+browserVersion+'.<P>');
		document.write('We advise that you upgrade your browser before continuing into this site.  Alternatively you can access this site with your present browser, however it may not be displayed as the designers intended it to be.<P>&nbsp;<P>');
		document.write('<A HREF="javascript:GoTo(\'detect_screen\',\'\')" ONMOUSEOVER="self.status = \'Continue loading?\'; return true" ONMOUSEOUT="self.status = \'\'; return true">Click here to continue loading</A>');
		document.write('</BODY>');
		document.write('</HTML>');
		setTimeout("this.location.href = 'detect_screen.html'",60000); } }


function DoScreenCheck() {

	/* This function checks the display resolution and
	displays a message or redirects the user appropriately. */

	var theWidth = screen.width;
	var theHeight = screen.height;

	if ((theWidth != 1024) && (theHeight != 768)) {
		document.write('<HTML>');
		document.write('<HEAD>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/basehref_frames.js"></SCRIPT>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/commands.js"></SCRIPT>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/options.js"></SCRIPT>');
		document.write('<LINK REL=stylesheet TYPE="text/css" HREF="styles/error.css">');
		document.write('<META NAME="Description" CONTENT="The Lord Alderdice MLA (East Belfast) - This website is for use by The Lord Alderdice\'s constituents with constituency problems, people who wish to get in touch with The Lord Alderdice and for those who want to find out more about him.">');
		document.write('<META NAME="Keywords" CONTENT="The Lord Alderdice,Lord,Alderdice,East Belfast,Belfast,Northern Ireland,Politics,Alliance,MLA,Assembly,Westminster,House Of Lords,Constituency,Speaker,Liberal International,Liberal Democrats,ELDR,European Liberal and Democratic Reform Party,Stormont,">');
		document.write('<META NAME="Author" CONTENT="Pj Media">');
		document.write('<META NAME="Generator" CONTENT="Microsoft Notepad">');
		document.write('<META NAME="Language" CONTENT="EN">');
		document.write('<TITLE>The Lord Alderdice | Detecting Screen Size...</TITLE>');
		document.write('</HEAD>');
		document.write('<BODY>');
		document.write('<FONT SIZE="+2" FACE="Arial"><B>Important!</B></FONT><P>');
		document.write('<FONT SIZE="-1">Welcome to Lord Alderdice\'s Website.  This website has been designed to be viewed with a display resolution of 1024 x 768 pixels and should work at 800 x 600 <I>at a pinch</I>.  Your screen is running at a display resolution of '+theWidth+' x '+theHeight+' pixels.<P>');
		document.write('We advise that you change your screen\'s display resolution to 1024 x 768 pixels.  Alternatively you can continue into this site, however it may not be displayed as the designers intended it to be.<P>&nbsp;<P>');
		document.write('<A HREF="javascript:GoTo(\'frames\',\'\')" ONMOUSEOVER="self.status = \'Continue loading?\'; return true" ONMOUSEOUT="self.status = \'\'; return true">Click here to continue loading</A>');
		document.write('</BODY>');
		document.write('</HTML>');
		setTimeout("this.location.href = 'frames.html'",60000); }
	else {
		document.write('<HTML>');
		document.write('<HEAD>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/basehref_frames.js"></SCRIPT>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/commands.js"></SCRIPT>');
		document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/options.js"></SCRIPT>');
		document.write('<LINK REL=stylesheet TYPE="text/css" HREF="styles/error.css">');
		document.write('<META NAME="Description" CONTENT="The Lord Alderdice MLA (East Belfast) - This website is for use by The Lord Alderdice\'s constituents with constituency problems, people who wish to get in touch with The Lord Alderdice and for those who want to find out more about him.">');
		document.write('<META NAME="Keywords" CONTENT="The Lord Alderdice,Lord,Alderdice,East Belfast,Belfast,Northern Ireland,Politics,Alliance,MLA,Assembly,Westminster,House Of Lords,Constituency,Speaker,Liberal International,Liberal Democrats,ELDR,European Liberal and Democratic Reform Party,Stormont,">');
		document.write('<META NAME="Author" CONTENT="Pj Media">');
		document.write('<META NAME="Generator" CONTENT="Microsoft Notepad">');
		document.write('<META NAME="Language" CONTENT="EN">');
		document.write('<TITLE>The Lord Alderdice | Detecting Screen Size...</TITLE>');
		document.write('</HEAD>');
		document.write('<BODY>');
		document.write('<FONT SIZE="+2" FACE="Arial"><B>Loading...</B></FONT><P>&nbsp;<P>');
		document.write('<A HREF="javascript:GoTo(\'frames\',\'\')" ONMOUSEOVER="self.status = \'Click Here!\'; return true" ONMOUSEOUT="self.status = \'\'; return true">If the main page fails to load please click here.</A>');
		document.write('</BODY>');
		document.write('</HTML>');
		this.location.href = "frames.html";} }


function DoJavaScriptCheck() {

	/* This function checks the browser's ability to
	run JavaScript.  If run it redirects the user. */

	document.write('<HTML>');
	document.write('<HEAD>');
	document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/basehref_frames.js"></SCRIPT>');
	document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/commands.js"></SCRIPT>');
	document.write('<SCRIPT LANGUAGE="JavaScript" SRC="http://homepage.ntlworld.com/john.alderdice/scripts/options.js"></SCRIPT>');
	document.write('<LINK REL=stylesheet TYPE="text/css" HREF="styles/error.css">');
	document.write('<META NAME="Description" CONTENT="The Lord Alderdice MLA (East Belfast) - This website is for use by The Lord Alderdice\'s constituents with constituency problems, people who wish to get in touch with The Lord Alderdice and for those who want to find out more about him.">');
	document.write('<META NAME="Keywords" CONTENT="The Lord Alderdice,Lord,Alderdice,East Belfast,Belfast,Northern Ireland,Politics,Alliance,MLA,Assembly,Westminster,House Of Lords,Constituency,Speaker,Liberal International,Liberal Democrats,ELDR,European Liberal and Democratic Reform Party,Stormont,">');
	document.write('<META NAME="Author" CONTENT="Pj Media">');
	document.write('<META NAME="Generator" CONTENT="Microsoft Notepad">');
	document.write('<META NAME="Language" CONTENT="EN">');
	document.write('<TITLE>The Lord Alderdice | Detecting Screen Size...</TITLE>');
	document.write('</HEAD>');
	document.write('<BODY>');
	document.write('<FONT SIZE="+2" FACE="Arial"><B>Loading...</B></FONT><P>&nbsp;<P>');
	document.write('<A HREF="javascript:GoTo(\'detect_browser\',\'\')" ONMOUSEOVER="self.status = \'Click Here!\'; return true" ONMOUSEOUT="self.status = \'\'; return true">If the following page fails to load please click here.</A>');
	document.write('</BODY>');
	document.write('</HTML>');
	this.location.href = "detect_browser.html"; }


function openMap(format) {

	//This function opens the Constituency Office Map of Area.

	if(format != null && format != "frames") format = format+"/";

	if(confirm('The page that you are about to open is an enlarged map of the whereabouts of Lord Alderdice\'s Constituency Office.  It contains a large image that may take some minutes to download, depending on the speed of your connection.\n\nApproximate file size: 219KB\n\nDo you want to continue and open this page?')) {
		window.open(''+format+'map.html','_blank','toolbar=no;location=no,scrollbar=no,resizeable=no,width=854,height=500'); } }

	