var sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
// This script opens a new browser window and writes
// HTML to display an image with a title and caption

function openwindow( pFileName, pTitle, pCaption, pWidth, pHeight, pCopy) {

// specify window parameters
  photoWin = window.open( "", "photo", "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,width="+pWidth+",height="+pHeight+",screenX=20,screenY=40,left=20,top=40");
  photoWin.document.write('<html><head><title>Edinburgh & Lothians Miniature Railway Club</title><link rel="stylesheet" href="photowindow.css"></head>');	
  photoWin.document.write('<center>');
  photoWin.document.write('<font size=+3 face="arial,helvetica"><b>' + pTitle + '</b></font><br /><br />');
  photoWin.document.write('<img src="' + pFileName + '"><p>');
  photoWin.document.write('<font face="arial,helvetica">');	
  photoWin.document.write(pCaption + '<br /><br /> [Picture &copy; ' + pCopy + ']');
  photoWin.document.write('</p></font></body></html>');
  photoWin.document.close();	
	
// If we are on NetScape, we can bring the window to the front
	if (navigator.appName.substring(0,8) == "Netscape") photoWin.focus();

}
function videowindow( pTitle, pvFile) {
// specify window parameters
vidWin = window.open( "", "photo", "width=350,height=400,status=no,scrollbars=no,resizable=no,screenX=20,screenY=40,left=20,top=40");
//scrollbars=no,width=550,height=370,screenX=150,screenY=200,top=150,left=200'
// wrote content to window
vidWin.document.write('<html><head><title>E&LMRC Layouts</title><link rel="stylesheet" href="photowindow.css"></head>'); vidWin.document.write('<center>');
vidWin.document.write('<h1>' + pTitle + '</b></h1>');
vidWin.document.write('<object width="320" height="240"><param name="movie" value="http://www.youtube.com/v/' + pvFile + '&autoplay=1"></param>');
vidWin.document.write('<embed src="http://www.youtube.com/v/' + pvFile + '&autoplay=1" type="application/x-shockwave-flash" width="320" height="240"></embed></object>');
vidWin.document.write( '<p>video &copy; E&LMRC<br>');
vidWin.document.write('</p></body></html>');
vidWin.document.close(); // If we are on NetScape, we can bring the window to the front
if (navigator.appName.substring(0,8) == "Netscape") vidWin.focus();
}

// done hiding from old browsers -->
//--><!]]>
<!--
function MM_openBrWindow(theURL,winName,features) { //v1.2
window.open(theURL,winName,features);
}
//-->
function email()
{
	var club="elmrc"
	var address="secretary"
	var isp=".org.uk"
	var at="@"
	
	var S="Edinburgh and Lothians Miniature Railway Club"	
	document.write('<p><a href="mailto:'+address+at+club+isp+'?subject='+S+'">'+address+at+club+isp+'</a></p>');
}

var imageX1="plus";
var imageX2="plus";
var imageX3="plus";
var imageX4="plus"
var imageX5="plus";
var imageX6="plus";
var imageX7="plus";
var imageX8="plus"
var imageX9="plus";
var imageX10="plus";
var imageX11="plus";
var imageX12="plus"
var imageX13="plus"

function toggleDisplay(e){

var imgX="imagePM"+e;
var tableX="table"+e;
var imageX="imageX"+e;
var tableLink="tableHref"+e;
var imageXval=eval("imageX"+e);
var element = document.getElementById(tableX).style;
 if (element.display=='none') {element.display='block';}
 else {element.display='none';}
 if (imageXval=='plus') {document.getElementById(imgX).src='images/down.gif';eval("imageX"+e+"='minus';");document.getElementById(tableLink).title='Hide List #'+e+'a';}
 else {document.getElementById(imgX).src='images/right.gif';eval("imageX"+e+"='plus';");document.getElementById(tableLink).title='Show List #'+e+'a';}
}