
// This JavaScript file contains functions written by Peter Wright
// Version 1 [ 1 September 2005 - 23:42 ]

var imageDir="images/";			// path to background image and 'red-square'
var myName="tfwl.js";			// name of this file for nesting purposes
var good;

var sbNarrative="Trolleybuses for West London Online";             // default status bar narrative for IE XP SP2
function sbYear() { sbDate = new Date(); return (sbDate.getYear()<1900) ? 1900+sbDate.getYear() : sbDate.getYear()} 
sbNarrative="Copyright " + sbYear() + " TfWL David Bradley.  Picture not to be published elsewhere without authority from admin" + "@" + "tfwl.org.uk";

var altTitle="";                                   // default 'alt' narrative
var altClose=" Click to close window ";
var altBig=" Click on picture to close window&#13; Click red square to view image at maximum resolution ";

var ePost="ad" + "min@tfwl.or" + "g.uk";
var mPost="me" + "mo@tfwl.or" + "g.uk";

function documentwrite(dat) { document.write(dat); }	// embedded objects fix - 24 Apr 06

// -------------------------------

// Remember to addd mouse click

var message="WEB Site ©2007\nTrolleybuses for West London           \n---------------------------------------\nWebmaster: David Bradley\nTelephone: 01252 706933       ";

function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;

// -------------------------------

function vacancy() {
 {
      var xpPop = window.createPopup();
      var xpPopBody = xpPop.document.body;
      xpPopBody.style.backgroundColor = "yellow";
      xpPopBody.style.border = "solid gray 1px";
      xpPopBody.innerHTML = "<font face='Scogin'><br>&nbsp;<u>Recently modified pages:</u>:<ol><li>This one.</li><li>And that one.</li></ol>&nbsp; ????<br><br><br><font face='Verdana' size='1'><center>&nbsp;Click outside this <B>popup<\/B> box to close it</center></font>";
      xpPop.show(20, 10, 450, 225, document.body);
   }
}

function xvacancy() {
 {
      var xpPop = window.createPopup();
      var xpPopBody = xpPop.document.body;
      xpPopBody.style.backgroundColor = "yellow";
      xpPopBody.style.border = "solid gray 1px";
      xpPopBody.innerHTML = "<font face='Scogin'><br>&nbsp;<u>We have Job Vacancies for</u>:<ol><li>A Qualified Vehicle Technician for Workshop and roadside assistance.</li><li>Recovery Driver, preferably with a Class 2 driving licence.</li></ol>&nbsp; Applications by email only to:&nbsp; <b>jobs@all-recovery.co.uk</b></font><br><br><br><font face='Verdana' size='1'><center>&nbsp;Click outside this <B>popup<\/B> box to close it</center></font>";
      xpPop.show(20, 10, 450, 225, document.body);
   }
}

function mainmenu() {
    var nn="";
    nn+='<object id="navbar" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="699" height="22">';
    nn+='<param name="movie" value="navigation/Subnet.swf">';
    nn+='<param name="quality" value="high">';
    nn+='<param name="menu" value="true">';
    nn+='<embed src="navigation/Subnet.swf" quality="high" menu="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="699" height="22" swLiveConnect="true" name="navbar"><\/embed>';
    nn+='<\/object>';
    return nn;
}

function mainmenucp() {
    var nn="";
    nn+='<object id="navbar" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="699" height="22">';
    nn+='<param name="movie" value="http://www.tfwl.org.uk/navigation/Subnetcp.swf">';
    nn+='<param name="quality" value="high">';
    nn+='<param name="menu" value="true">';
    nn+='<embed src="http://www.tfwl.org.uk/navigation/Subnetcp.swf" quality="high" menu="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="699" height="22" swLiveConnect="true" name="navbar"><\/embed>';
    nn+='<\/object>';
    return nn;
}

function morelinks() {
    var nn="";
    nn+='<object id="navbar" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="109" height="22">';
    nn+='<param name="movie" value="navigation/morelinks.swf">';
    nn+='<param name="quality" value="high">';
    nn+='<param name="menu" value="true">';
    nn+='<embed src="navigation/morelinks.swf" quality="high" menu="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="109" height="22" swLiveConnect="true" name="navbar"></embed>';
    nn+='</object>';
    return nn;
}

function example() {
    var nn="";
    nn+='<embed src="movies/example.wmv" title="&copy;2005. All rights reserved by Ashley Bruce." alt="Graphics by Ashley Bruce" width="400" height="300" pluginspage="http://www.microsoft.com/windows/MediaPlayer/"></embed>';
    return nn;
}

function captionStyle(txt) {
   while (txt.indexOf("{#")>0) {		// replace custom format commands {#?} with <p class="CF?>
      txtP=txt.indexOf("{#");
      txtL=txt.substring(0, txtP);
      txtS=txt.charAt(txtP+2);
      txtR=txt.substring(txtP+4);
      txt=txtL + '<p class="CF' + txtS + '">' + txtR;
   }
   while (txt.indexOf("{/#}")>0) {		// replace custom format end commands {/#} with </p>
      txtP=txt.indexOf("{/#}");
      txtL=txt.substring(0, txtP);
      txtR=txt.substring(txtP+4);
      txt=txtL + '</p>' + txtR;
   }
   return txt;
}

function popUp() {
   var filename=popUp.arguments[0], winname=popUp.arguments[1], description=popUp.arguments[2], imageW=popUp.arguments[3], imageH=popUp.arguments[4];
   var sbMessage = (popUp.arguments.length==6) ? popUp.arguments[5] : sbNarrative ;
   bigURL="popBig('" + filename + "', '" + winname + "', '" + description + "', " + imageW + ", " + imageH + ", '" + sbMessage + "', ";
   if (description.indexOf("|")>0) { var describe = description.split("|"); description=describe[0] }
   if (navigator.appName=="Opera" || document.layers) { eval(bigURL+"false)"); return } else { bigURL+= "true)" }
   winH=screen.availHeight-28;			// set popup window height to max available
   winW=screen.availWidth-9;			// set popup window width to max available
   imgH=winH-52;				// calculate maximum image height
   imgH=winH-56;				// calculate maximum image height
   if(window.navigator.userAgent.indexOf("SV1") != -1) {imgH-=25}		// allow for mandatory status bar in IE on XP with SP2
   if(navigator.userAgent.toLowerCase().indexOf('firefox')!=-1) {imgH-=25} 	// depth allowance for Firefox status bar
   imgW=parseInt(imageW*(imgH/imageH));		// calculate proportional image width
   if (imgW>(winW-8)) {				// if resulting image is too wide
      imgW=winW-8;				// reduce image width
      imgH=parseInt(imageH*(imgW/imageW));	// calculate proportional image height
   }
   if (imgW>imageW || imgH>imageH) { imgW=imageW; imgH=imageH }
   if (imageW>imgW || imageH>imgH) { altTitle=altBig } else { altTitle=altClose }
   nn="";
   nn+='<html><head><title>Trolleybuses for West London Image Library - Picture ' + winname + '</title>';
   nn+='<meta http-equiv="imagetoolbar" content="no">';
   nn+='<meta name="MSSmartTagsPreventParsing" content="TRUE">';
   nn+='<style type="text/css">';
   nn+=' body { background: #eeefdd; font-family: Verdana, sans-serif; margin: 10px 0 10px; }';
   nn+=' h6 { text-align: justify; color: black; }';
   nn+=' .descriptive { font-family: Verdana, sans-serif; font-size: 24px; font-weight: bold; text-align: center; color: red; }';
   nn+=' .click { font-family: Arial, sans-serif; font-size: 11px; font-weight: normal; text-align: left; color: #000039; }';
   nn+='</style></head><body><center>';
   nn+='<script language="JavaScript" type="text/javascript" src="' + myName + '"></script>';
   nn+='<script language="JavaScript" type="text/javascript">window.defaultStatus="' + sbMessage + '"</script>'
   nn+='<table border="0" cellpadding=0 cellspacing=0 align="center" width=' + (winW-14) + '>';
   nn+=' <tr>';
   nn+='  <td height=' + imgH + ' colspan=2 align="center"><a href="javascript:window.close()" onMouseOver="self.status=\'' + sbMessage + '\'; return true" onMouseOut="self.status=\'\'; return true"><img src="' + filename + '" width=' + imgW + ' height=' + imgH + ' border=0 alt="" title=" Picture ' + winname + ' &#13;' + altTitle + '"></a></td>';
   nn+=' </tr>';
   nn+=' <tr valign="bottom">';
   nn+='  <td width=' + (winW-214) + ' height=40 class="descriptive">' + description + '</td>';
   nn+='  <td width=200 class="click">Click on the image to close this window';
   if (imageW>imgW || imageH>imgH) { nn+='<br><a href="javascript:' + bigURL + '"  onMouseOver="self.status=\'' + sbMessage + '\'; return true" onMouseOut="self.status=\'\'; return true"><img src="' + imageDir + 'redsq.gif" width=9 height=9 border=0 alt=""></a> &nbsp; See image at maximum resolution' }
   nn+='</td>';
   nn+=' </tr>';
   nn+='</table></center></body></html>';
   window1=window.open('', '', "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=0,top=0,width=" + winW + ",height=" + winH);
   window1.document.open();
   window1.document.write(nn);
   window1.document.close();
   window1.focus()
}

function popBig(filename, winname, description, imageW, imageH, sbMessage, closeParent) {
   if (description.indexOf("|")>0) { var describe = description.split("|"); description=describe[1] }
   description=captionStyle(description);
   nn="";
   nn+='<html><head><title>Trolleybuses for West London Image Library - Picture ' + winname + '</title>';
   nn+='<meta http-equiv="imagetoolbar" content="no">';
   nn+='<meta name="MSSmartTagsPreventParsing" content="TRUE">';
   nn+='<style type="text/css">';
   nn+=' body { background: #eeefdd; font-family: Verdana, sans-serif; margin: 10px 0 10px; }';
   nn+=' .descriptive { font-family: Verdana, sans-serif; font-size: 24px; font-weight: bold; text-align: center; color: red; }';
   nn+=' h6 { text-align: left; color: black; }';
   if (description.indexOf('<h6>')>0) { nn+=' h6 { font-family: Verdana, Arial, sans-serif; font-size: 12pt; font-weight: bold; text-align: left; color: #000039; margin: 4px 30px 0; }'; }
   if (description.indexOf('class="CFj"')>0) { nn+=' .CFj { font-family: Verdana, Arial, sans-serif; font-size: 12pt; font-weight: bold; text-align: left; color: #804000; margin: 4px 30px 0; }'; }
   if (description.indexOf('class="CFc"')>0) { nn+=' .CFc { font-family: Verdana, Arial, sans-serif; font-size: 12pt; font-weight: bold; text-align: left; color: #804000; margin: 0 0 0; }'; }
   nn+='</style></head><body>';
   nn+='<script language="JavaScript" type="text/javascript">window.defaultStatus="' + sbMessage + '"</script>'
   nn+='<center><table border="0" cellpadding=0 cellspacing=0 align="center" width="100%">';
   nn+=' <tr>';
   nn+='  <td align="center"><a href="javascript:window.close()" onMouseOver="self.status=\'' + sbMessage + '\'; return true" onMouseOut="self.status=\'\'; return true"><img src="' + filename + '" width=' + imageW + ' height=' + imageH + ' border=0 alt="" title=" Picture ' + winname + '&#13; Click to close window "></a></td>';
   nn+=' </tr>';
   nn+=' <tr valign="middle">';
   nn+='  <td height="50" class="descriptive">' + description + '</td>';
   nn+=' </tr>';
   nn+='</table></center></body></html>';
   window2=window.open("", "", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,left=0,top=0,width=" + (screen.availWidth-10) + ",height=" + (screen.availHeight-30));
   window2.document.open();
   window2.document.write(nn);
   window2.document.close();
   if (closeParent) { parent.window.close() };
   window2.focus()
}

function takeYear(theDate) {
  x = theDate.getYear();
  var y = x % 100;
  y += (y < 38) ? 2000 : 1900;
  return y;
}

function pagebase() {
   nn=""
   nn+='<br clear="all><center>';
   nn+='<p class="mailme">';
   nn+=document.title;
   nn+='<br>If you wish to comment on the content of this page please <a href="mailto:' + ePost + '?Subject=' + document.title + '">email</a> webmaster';
   nn+='<br>Site visitors input is always appreciated';
   nn+='</p>';
   nn+='<form method="POST">';
   nn+='<input type="BUTTON" VALUE="Resume" onClick="history.back()">';
   nn+='</form></center><br>';
   return nn;
}

function issues() {
   nn=""
   nn+='<b>Issues Index:</b><form title="Drop Down Menu" style="margin: 0 0 0" action="#">';
   nn+='<select size="1" onChange="DropDownMenu(this)" name="media">';
   nn+='<option selected value="FALSE"> </option>';
   nn+='<option value="issues.html">1: An Overview</option>';
   nn+='<option value="issues2.html">2: Trolleybuses - An out moded form of travel?</option>';
   nn+='<option value="foe.html">3: Misinformation from the &quot;Friends of the Earth&quot;</option>';
   nn+='<option value="bell.html">4: The Uxbridge Road as a transitway</option>';
   nn+='<option value="sbt.html">5: Are street based tramways sensible to build?</option>';
   nn+='<option value="lido1.html">6: The Lido Junction - TfL Plans for the Future</option>';
   nn+='<option value="southall.html">7: Southall Broadway - TfL Plans for the Future</option>';
   nn+='<option value="hanwell.html">8: Hanwell - TfL Plans for the Future</option>';
   nn+='<option value="ccd.html">9: Conditions for City Diversity</option>';
   nn+='<option value="mori.html">10: MORI Poll</option>';
   nn+='<option value="travelwatch0106.html">11: Travel Watch Position</option>';
   nn+='<option value="twmr.html">12: TfWL response to Travel Watch Position</option>';
   nn+='<option value="ses.html">13: SES response to WLT Construction Sites</option>';
   nn+='<option value="sam.html">14: Samantha Covington considers the WLT</option>';
   nn+='<option value="cnotram.html">15: No Tram for the Conservatives</option>';
   nn+='<option value="etb.html">16: Electrical Consumption</option>';
   nn+='<option value="rumbleson.html">17: The Tram Rumbles On</option>';
   nn+='<option value="soundbites.html">19: Sound Bites</option>';
   nn+='<option value="mediaindex.html">20: Media Index</option>';
   nn+='</select></form>';
   return nn;
}

function solutions() {
   nn=""
   nn+='<b>Solutions Index: &nbsp; &nbsp; &nbsp; &nbsp;</b><form title="Drop Down Menu" style="margin: 0 0 0" action="#">';
   nn+='<select size="1" onChange="DropDownMenu(this)" name="media">';
   nn+='<option selected value="FALSE"> </option>';
   nn+='<option value="data.html">1: Route 907</option>';
   nn+='<option value="aot.html">2: What is a Trolleybus?</option>';
   nn+='<option value="tardis.html">3: ElectroLiner</option>';
   nn+='<option value="workshops.html">4: UITP Workshops</option>';
   nn+='<option value="ppp.html">5: Travel Watch Presentation</option>';
   nn+='<option value="options.html">6: Cut carbon emissions now!</option>';
   nn+='</select></form>';
   return nn;
}

function eLink( text, who, where, why) {
   nn="";
   nn+='<a href="mailto:' + who + '@' + where;
   if (why!="" && why!=null) { nn+='?Subject=' + why }
   nn+='">' + text + '</a>';
   return nn;
}

function meLink( text, subject) {
   nn="";
   nn+='<a href="mailto:' + ePost;
   if (subject!="" && subject!=null) { nn+='?Subject=' + subject }
   nn+='">' + text + '</a>';
   return nn;
}

function dateNarrative() {
   var xx="th"
   mydate = new Date();
   myday = mydate.getDay();
   myweekday= mydate.getDate();
   mymonth = mydate.getMonth();
   year = mydate.getYear();
   if (myweekday==1 || myweekday==21 || myweekday==31) { xx="st" }
   if (myweekday==2 || myweekday==22) { xx="nd" }
   if (myweekday==3 || myweekday==23) { xx="rd" }
   arday = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
   armonth = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
   return arday[myday] + ", " + myweekday + xx + " " + armonth[mymonth] + " " + year;
}

function vrw3c() {
   nn="";
   nn+='<p class="menu" style="margin: 12px 0 0">';
   nn+='<a href="http://validator.w3.org/check/referer" target="_w3c" onmouseover="self.status=\'This WEB page has been designed to work under all operating sytems and with all WEB Browsers\'; return true" onmouseout="self.status=\'\'; return true"><img src="images/w3c-401.gif" alt="An interoperable WEB page with valid HTML 4.01" border="0" height="31" width="93" hspace="8"></a>';
   nn+='<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_w3c" onmouseover="self.status=\'This site uses Cascading Style Sheets [CSS] which is a mechanism for adding style [e.g. fonts, colors, spacing] to our pages\'; return true" onmouseout="self.status=\'\'; return true"><img src="images/w3c-css.gif" alt="This site uses Cascading Style Sheets [CSS] which is a simple mechanism for adding style [e.g. fonts, colors, spacing] to our pages. Hyperlink checks for design errors." border="0" height="31" width="93" hspace="8"></a>';
   nn+='<a href="http://www.anybrowser.org/campaign/index.html" target="_new" onmouseover="self.status=\'With minor differences this site should be viewable with any graphical browser that supports Java\'; return true" onmouseout="self.status=\'\'; return true"><img src="images/anybrowser.gif" alt="With minor differences this site should be viewable with any graphical browser that supports Java. Some features will be lost when using a Java incapable browser." border="0" height="31" width="88" hspace="10"></a>';
   nn+='<a href="javascript:emailPage()" onmouseover="self.status=\'Nice one - We appreciate your kind thoughts\'; return true" onmouseout="self.status=\'\'; return true"><img src="images/tell-a-friend.gif" alt="Feature sends an email to your friend" border="0" height="32" width="130" vspace="0" hspace="8"></a>';
   nn+='<a href="http://www.cyberpictures.net/tfwl" onmouseover="self.status=\'We look forward to hearing from you\'; return true" onmouseout="self.status=\'\'; return true"><img src="images/feedback.jpg" alt="Feature enables you to contact us&#13;by various different electronic means" class="img" height="31" width="64" hspace="8"></a>';
   nn+='<a href="http://www.redhat.com/" target="_new" onmouseover="self.status=\'Click NOW for information on Red Hat\'; return true" onmouseout="self.status=\'\'; return true"><img src="logos/redhat.png" alt="In the same way Microsoft insn t needed to host a web site;&#13;Trams aren t needed along the Uxbridge Road corridor;&#13;Trolleybuses are the solution!" class="img" height="31" width="88" hspace="8"></a>';
   nn+='<br>Page URL: &nbsp; ' + location.toString();
   nn+=' &nbsp; &nbsp; ' + lastMod();
   nn+='</p><p>&nbsp;</p>';
   return nn;
}

function vrw3ccp() {
   nn="";
   nn+='<p class="menu" style="margin: 12px 0 0">';
   nn+='<a href="http://validator.w3.org/check/referer" target="_w3c" onmouseover="self.status=\'This WEB page has been designed to work under all operating sytems and with all WEB Browsers\'; return true" onmouseout="self.status=\'\'; return true"><img src="http://www.tfwl.org.uk/images/w3c-401.gif" alt="An interoperable WEB page with valid HTML 4.01" border="0" height="31" width="93" hspace="8"></a>';
   nn+='<a href="http://jigsaw.w3.org/css-validator/check/referer" target="_w3c" onmouseover="self.status=\'This site uses Cascading Style Sheets [CSS] which is a mechanism for adding style [e.g. fonts, colors, spacing] to our pages\'; return true" onmouseout="self.status=\'\'; return true"><img src="http://www.tfwl.org.uk/images/w3c-css.gif" alt="This site uses Cascading Style Sheets [CSS] which is a simple mechanism for adding style [e.g. fonts, colors, spacing] to our pages. Hyperlink checks for design errors." border="0" height="31" width="93" hspace="8"></a>';
   nn+='<a href="http://www.anybrowser.org/campaign/index.html" target="_new" onmouseover="self.status=\'With minor differences this site should be viewable with any graphical browser that supports Java\'; return true" onmouseout="self.status=\'\'; return true"><img src="http://www.tfwl.org.uk/images/anybrowser.gif" alt="With minor differences this site should be viewable with any graphical browser that supports Java. Some features will be lost when using a Java incapable browser." border="0" height="31" width="88" hspace="10"></a>';
   nn+='<a href="javascript:emailPage()" onmouseover="self.status=\'Nice one - We appreciate your kind thoughts\'; return true" onmouseout="self.status=\'\'; return true"><img src="http://www.tfwl.org.uk/images/tell-a-friend.gif" alt="Feature sends an email to your friend" border="0" height="32" width="130" vspace="0" hspace="8"></a>';
   nn+='<a href="http://www.tfwl.org.uk/feedback.html" onmouseover="self.status=\'We look forward to hearing from you\'; return true" onmouseout="self.status=\'\'; return true"><img src="http://www.tfwl.org.uk/images/feedback.jpg" alt="Feature enables you to contact us&#13;by various different electronic means" class="img" height="31" width="64" hspace="8"></a>';
   nn+='<a href="http://www.redhat.com/" target="_new" onmouseover="self.status=\'Click NOW for information on Red Hat\'; return true" onmouseout="self.status=\'\'; return true"><img src="http://www.tfwl.org.uk/logos/redhat.png" alt="In the same way Microsoft insn t needed to host a web site;&#13;Trams aren t needed along the Uxbridge Road corridor;&#13;Trolleybuses are the solution!" class="img" height="31" width="88" hspace="8"></a>';
   nn+='<br>Page URL: &nbsp; ' + location.toString();
   nn+=' &nbsp; &nbsp; ' + lastMod();
   nn+='</p><p>&nbsp;</p>';
   return nn;
}

function lastMod() {
  asdf = document.title .substring (31 ,99)
  var x = new Date (document.lastModified);
  Modif = new Date(x.toGMTString());
  Year = takeYear(Modif);
  Month = Modif.getMonth();
  Day = Modif.getDate();
  Mod = (Date.UTC(Year,Month,Day,0,0,0))/86400000;
  x = new Date();
  today = new Date(x.toGMTString());
  Year2 = takeYear(today);
  Month2 = today.getMonth();
  Day2 = today.getDate();
  now = (Date.UTC(Year2,Month2,Day2,0,0,0))/86400000;
  daysago = now - Mod;
  if (daysago < 0) return '';
  unit = 'days';
  if (daysago > 730)
  {
  daysago = Math.round(daysago/365);
  unit = 'years';
  }
  else if (daysago > 60)
  {
  daysago = Math.round(daysago/30);
  unit = 'months';
  }
  else if (daysago > 14)
  {
  daysago = Math.round(daysago/7);
  unit = 'weeks'
  }
  towrite = '&copy;' + Year2 + ' Trolleybuses for West London';
  towrite += '<br>This &quot;' + asdf + '&quot; page last updated ';
  if (daysago == 0) towrite += 'today';
  else if (daysago == 1) towrite += 'yesterday';
  else towrite += daysago + ' ' + unit + ' ago';
  return towrite;
}

function emailPage(){
zxcv = document.title .substring (31 ,99)
document.location = 'mailto:?subject=[TfWL] ' + zxcv + '&bcc=xmas&#064;cyberpictures.net&body=Hello, %0D%0DOn the Trolleybuses for West London web site, I found the ' + zxcv + ' page and thought it would be of interest to you: ' + document.location+ ' %0D%0DThe site is advocating for the best public transport solution along the Uxbridge Road, suggesting various options and providing information for the reader to make an informed judgment on the best way forward. Their home page can be found at http://www.tfwl.org.uk %0D%0DBye for now.';
   }

function DropDownMenu(entered)
{
with (entered)
{
ref=options[selectedIndex].value;
splitcharacter=ref.lastIndexOf("&");

if (splitcharacter!=-1) {loc=ref.substring(0,splitcharacter); target=ref.substring(splitcharacter+1,1000).toLowerCase();}
else {loc=ref; target="_self";};
lowloc=loc.toLowerCase();
if (lowloc=="false") {return;}

if (target=="_self") {document.location=loc;}
else {if (target=="_top") {top.location=loc;}
      else {if (target=="_new") {window.open(loc);}
           else{if (target=="_parent") {parent.location=loc;}
               else {parent.frames[target].location=loc;};
               }
           }
     }
}
}

function scott() {
msg=window.open("","","height=400,width=620,left=10,top=10,scrollbars=no");
msg.document.write("<html><head><title>Trolleybuses for West London - About Scott McIntosh</title>");
msg.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>");
msg.document.write("<link rel='stylesheet' type='text/css' href='mot.css'></head>");
msg.document.write("<body bgcolor='#FFFFD2' title='Scott McIntosh'>");
msg.document.write("<img style='margin: 0 18px 0' align='left' img src='pictures/scott.jpg' width='111' height='149' alt='Scott McIntosh' border='1'>");
msg.document.write("<b><font size='4' face='Trebuchet MS'><p>Scott McIntosh</p></font></b>");
msg.document.write("<table border='0' cellpadding='7' cellspacing='0' width='450'>");
msg.document.write("<tr><td><p>Scott is one of the UK's most highly regarded light rail professionals and, most recently Light Rail Planning Manager for Transport for London, managing the Cross River Tram and Tramlink Extensions proposals."); 
msg.document.write("<br><br>Mr McIntosh's resume includes a role as Assistant to the Commissioning Engineer for the initial Docklands Light Railway before moving to the operating team to work on its subsequent extension.");
msg.document.write("<br><br>He was also Project Manager for the highly successful Croydon Tramlink during its planning and authorisation stages and London Transport member on the board of the Tramlink Project Development Group – the first UK Public/Private Partnership in Light Rail.</p>");
msg.document.write("</td></tr></table><center>");
msg.document.write("<form style='margin: 30px 0 30px'><input type='button' value=' Close Window ' onclick='window.close();' style='font-family: Verdana; font-size: 10pt; font-weight: bold; border: 1px outset #FFFFCC'></form>");
msg.document.write("</center></body></html>");
}

function cu() {
msg=window.open("","","height=200,width=315,left=10,top=10,scrollbars=no");
msg.document.write("<html><head><title>Trolleybuses for West London - Cough Up</title>");
msg.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>");
msg.document.write("</head>");
msg.document.write("<body bgcolor='#FFFFD2' title='Cough Up'>");
msg.document.write("<img style='margin: 0 0 0' align='left' src='images/poster1.jpg' width='287' height='170' alt='Cough Up - Graphics by Dave Wilsher' border='1'>");
msg.document.write("</body></html>");
}


