// --- Execute for all pages:

var i;
var msg = "  Hi there. Hope you like my site. BTW it's best viewed with your display set to 1024 x 768 pixels ... Rob.  ";
var delay = 100;
var padding = 120;
var stop_len = msg.length + padding;
var timer = null;
var timer_running = false;
var pos = 0;

var Sauron='213.162.107.39';

/* 
2Jul09: Changed from top.location.protocol to location.protocol because, the UKReg domain name redirection appears to
inhibit top.location.protocol - it says "access denied".
*/
if (location.protocol == 'http:')
{
   var AutoPath = 'http://' + Sauron + '/family/Fury/';
}
else if (location.protocol == 'file:')
{
   var AutoPath = '';
}

if (document.layers) 
{
   document.captureEvents(Event.MOUSEDOWN);
}
      
document.onmousedown=Click;

// --- Bookmark stuff:

var BookmarkURL = "http://www.FuryWorld.fsnet.co.uk";
var BookmarkTitle = "Rob's Fury Site";



// --- Start of functions:

function Click(e)
{
   var message="The Contents and Graphics on this page are Copyright (c) 2001-2009 Rob Handley. If you wish to copy anything from these pages, contact the Webmaster<@>FuryWorld.fsnet.co.uk."; // Message for the alert box
   
   if (document.all) 
   {
      if (event.button == 2) 
      {
         alert(message);
	 return false;
      }
   }
   
   if (document.layers) 
   {
      if (e.which == 3) 
      {
         alert(message);
	 return false;
      }
   }
}



function Check_Browser()
{

// If Internet Explorer v6 or earlier, load fixed layout style sheet:

   if (navigator.appName.substring(0, 27) == "Microsoft Internet Explorer")
   {
//      alert ("It looks like you're not using Microsoft Internet Explorer.\nI've tried to make this site compatible with all browsers,\nbut Microsoft Internet Explorer supports a greater set\nof HTML functionality, so is more likely to work as intended.\n\nRob");
      var index = navigator.userAgent.indexOf('MSIE');
//      document.write('index:', index, '<br />');
//      document.write( navigator.userAgent.substring((index+5), (index+6)) );
      var browser_version = navigator.userAgent.substring( (index+5), (index+6) );

      if (browser_version < 7)
      {
//         document.write('browser_version < 7');
         LoadFixedStyle();
	 document.status = "You appear to be using an old version of Microsoft Internet Explorer. This site should display ok, but looks better with a later version.";
//         document.write('You appear to be using an old version of Microsoft Internet Explorer. This site should display ok, but looks better with a later version.');
      }
      
//      document.write('style sheet title: ' + document.styleSheets[0].title + '<br />');
//      document.write('style sheet href: ' + document.styleSheets[0].href + '<br />');
//      document.getElementById('MainStyleSheet').href = 'ZoomStyle.css';

//      document.styleSheets[0].href = 'ZoomStyle.css';

   }
}



function LoadResizingStyle()
{
// The following works in IE, but not in Firefox:

   document.styleSheets[0].href = 'resizingStyle.css';

// The following works in IE and Firefox, but requires the <LINK ... > to include: id="MainStyleSheet":

//     document.getElementById("MainStyleSheet").href = 'resizingStyle.css';
}



function LoadFixedStyle()
{
// The following works in IE, but not in Firefox:

   document.styleSheets[0].href = 'fixedStyle.css';

// The following works in IE and Firefox, but requires the <LINK ... > to include: id="MainStyleSheet":

//     document.getElementById("MainStyleSheet").href = 'fixedStyle.css';
}

// --- Start of date routines

function Date_Time()
{
   // Display Date and Time

   var rightnow = new Date();

   number_minutes = rightnow.getMinutes();
   if (number_minutes < 10)
   {
      word_minutes = "0" + number_minutes;
   }
   else
   {
      word_minutes = number_minutes;
   }
   
   number_seconds = rightnow.getSeconds();
   if (number_seconds < 10)
   {
      word_seconds = "0" + number_seconds;
   }
   else
   {
      word_seconds = number_seconds;
   }
   
   document.writeln( "As of " + rightnow.getHours() + ":" + word_minutes + ":" + word_seconds );
   
   number_day = rightnow.getDate();
   if (number_day == 1 || number_day == 21 || number_day == 31)
   {
      ending = "st ";
   }   
   else if (number_day == 2 || number_day == 22)
   {
      ending = "nd ";
   }   
   else if (number_day == 3 || number_day == 23)
   {
      ending = "rd ";
   }   
   else
   {
      ending = "th ";
   }   

   number_month = rightnow.getMonth() + 1;
   if (number_month == 1)
   {
      word_month = "January";
   }   
   else if (number_month == 2)
   {
      word_month = "February";
   }   
   else if (number_month == 3)
   {
      word_month = "March";
   }   
   else if (number_month == 4)
   {
      word_month = "April";
   }   
   else if (number_month == 5)
   {
      word_month = "May";
   }   
   else if (number_month == 6)
   {
      word_month = "June";
   }   
   else if (number_month == 7)
   {
      word_month = "July";
   }   
   else if (number_month == 8)
   {
      word_month = "August";
   }   
   else if (number_month == 9)
   {
      word_month = "September";
   }   
   else if (number_month == 10)
   {
      word_month = "October";
   }   
   else if (number_month == 11)
   {
      word_month = "November";
   }   
   else if (number_month == 12)
   {
      word_month = "December";
   }   
   else
   {
      word_month = "unknown";
   }

   document.writeln( " on the " + number_day + ending + word_month + " " + rightnow.getFullYear());
}

// --- End of date routines



// --- Start of text scroller routines

function Init_Scrolling()
{

// This should work - but the later routines fall over because the variables aren't defined!

   var i;
   var msg = "  Hi there. Hope you like my site. BTW it's best viewed with your display set to 1024 x 768 pixels ... Rob.  ";
   var delay = 100;
   var padding = 120;
   var stop_len = msg.length + padding;
   var timer = null;
   var timer_running = false;
   var pos = 0;
}



function Start_Scrolling()
{
   Stop_The_Clock();
   for (i = 0; i < padding; i++) msg = "=" + msg;
   for (i = 0; i < padding; i++) msg = msg + "=";
   
   Do_The_Scroll();
}
   
function Stop_The_Clock()
{
   if (timer_running) clearTimeout(timer_id);
   timer_running = false;
}
   
function Do_The_Scroll()
{
   if (pos < stop_len) self.status = msg.substring (pos, msg.length);
   else pos = -1;
   pos++;
   timer_running = true;
   timer_id = self.setTimeout ("Do_The_Scroll()", delay);
}

// --- End of text scroller routines



// --- Start of general routines

function Zoom(Picture)
{
   top.location.href = "Zoom.html?" + Picture;
}



function ZoomWindow(Picture)
{
   var url = "Zoom.html?" + Picture;
   var width = screen.width - 10;
   var height = screen.height - 60;
   var properties = "width=" + width + 
                    ",height=" + height + 
		    ",resizable=yes,scrollbars=yes,left=0,top=0";
   var Name = "";
   GetValidWindowName(Picture, Name);
   window.open(url,Name,properties);
}



function GetValidWindowName(Picture, Name)
{
   for (i=0;i<Picture.length;i++)
   {
      if ( (Picture.charAt(i) == '/') || (Picture.charAt(i) == '\\') || (Picture.charAt(i) == '.') )
      {
         Name = Name + '_';
      }
      else
      {
         Name = Name + Picture.charAt(i);
      }
   }
//   document.write(Name);
}



function NewZoomWindow(Picture)
{
   location.href = "Zoom.html?" + Picture;
}


      
function ScrollZoomWindow(Picture)
{
   var url = "ScrollZoom.html?" + Picture;
   var width = screen.width - 10;
   var height = screen.height - 60;
   var properties = "width=" + width + 
                    ",height=" + height + 
		    ",resizable=yes,scrollbars=yes,left=0,top=0";
   window.open(url,"dummy",properties);
}


      
function SmallZoomWindow(Picture,WindowWidth,WindowHeight)
{
   var url = "SmallZoom.html?" + Picture;
   var properties = "width=" + WindowWidth + 
                    ",height=" + WindowHeight + 
		    ",resizable=yes,scrollbars=no,left=0,top=0";
   var name = WindowWidth + 'x' + WindowHeight;
   window.open(url,name,properties);
}


      
function DisplayCornerWeights(value)
{
   if (value == "SeanBedford")
   {
         document.Form2.NSF.value = 108;
         document.Form4.OSF.value = 103;
         document.Form3.NSR.value = 116;
         document.Form5.OSR.value = 113;
   }
   else if (value == "KeithDyer")
   {
         document.Form2.NSF.value = 164;
         document.Form4.OSF.value = 175;
         document.Form3.NSR.value = 164;
         document.Form5.OSR.value = 138;
   }
   else if (value == "MikeField")
   {
         document.Form2.NSF.value = 130;
         document.Form4.OSF.value = 102;
         document.Form3.NSR.value = 116;
         document.Form5.OSR.value = 123;
   }
   else if (value == "RobHandley")
   {
         document.Form2.NSF.value = 173;
         document.Form4.OSF.value = 146;
         document.Form3.NSR.value = 162;
         document.Form5.OSR.value = 153;
   }
   else if (value == "IanMacquarie")
   {
         document.Form2.NSF.value = 154;
         document.Form4.OSF.value = 153;
         document.Form3.NSR.value = 165;
         document.Form5.OSR.value = 158;
   }
   else if (value == "SpikeOReilly")
   {
         document.Form2.NSF.value = 179;
         document.Form4.OSF.value = 161;
         document.Form3.NSR.value = 150;
         document.Form5.OSR.value = 149;
   }
   else if (value == "JohnPhillips")
   {
         document.Form2.NSF.value = 153;
         document.Form4.OSF.value = 130;
         document.Form3.NSR.value = 121;
         document.Form5.OSR.value = 123;
   }
   else if (value == "DavePenn")
   {
         document.Form2.NSF.value = 151;
         document.Form4.OSF.value = 138;
         document.Form3.NSR.value = 127;
         document.Form5.OSR.value = 125;
   }
   else if (value == "CraigRichards")
   {
         document.Form2.NSF.value = 176;
         document.Form4.OSF.value = 162;
         document.Form3.NSR.value = 142;
         document.Form5.OSR.value = 158;
   }
   else if (value == "AndrewBrady")
   {
         document.Form2.NSF.value = 137;
         document.Form4.OSF.value = 121.5;
         document.Form3.NSR.value = 144.5;
         document.Form5.OSR.value = 145;
   }
   else if (value == "DarenBall")
   {
         document.Form2.NSF.value = 129;
         document.Form4.OSF.value = 125.5;
         document.Form3.NSR.value = 140;
         document.Form5.OSR.value = 131.5;
   }
   else if (value == "DaveJackson")
   {
         document.Form2.NSF.value = 119;
         document.Form4.OSF.value = 133;
         document.Form3.NSR.value = 133;
         document.Form5.OSR.value = 137;
   }
   else if (value == "GrahamFord")
   {
         document.Form2.NSF.value = 131.5;
         document.Form4.OSF.value = 120;
         document.Form3.NSR.value = 117.5;
         document.Form5.OSR.value = 123;
   }
   else if (value == "FrankMartin")
   {
         document.Form2.NSF.value = 137;
         document.Form4.OSF.value = 116.5;
         document.Form3.NSR.value = 140;
         document.Form5.OSR.value = 140;
   }
   else if (value == "DanJermyn")
   {
         document.Form2.NSF.value = 155;
         document.Form4.OSF.value = 141;
         document.Form3.NSR.value = 145;
         document.Form5.OSR.value = 148;
   }
   else if (value == "KevinWood")
   {
         document.Form2.NSF.value = 166;
         document.Form4.OSF.value = 156;
         document.Form3.NSR.value = 182;
         document.Form5.OSR.value = 178.5;
   }
   else if (value == "SteveButts")
   {
         document.Form2.NSF.value = 152.5;
         document.Form4.OSF.value = 150.5;
         document.Form3.NSR.value = 219;
         document.Form5.OSR.value = 222.5;
   }
   else if (value == "RobertTurnock")
   {
         document.Form2.NSF.value = 178;
         document.Form4.OSF.value = 174;
         document.Form3.NSR.value = 213.5;
         document.Form5.OSR.value = 224.5;
   }
   else if (value == "GeoffNorthcott")
   {
         document.Form2.NSF.value = 147;
         document.Form4.OSF.value = 132;
         document.Form3.NSR.value = 157.5;
         document.Form5.OSR.value = 162.5;
   }
   else if (value == "AllenPayne")
   {
         document.Form2.NSF.value = 145;
         document.Form4.OSF.value = 153;
         document.Form3.NSR.value = 135;
         document.Form5.OSR.value = 123;
   }
   else if (value == "SimonMoore")
   {
         document.Form2.NSF.value = 132.5;
         document.Form4.OSF.value = 128;
         document.Form3.NSR.value = 152.5;
         document.Form5.OSR.value = 144;
   }
   else if (value == "SteveWiseman")
   {
         document.Form2.NSF.value = 197.5;
         document.Form4.OSF.value = 166.5;
         document.Form3.NSR.value = 139;
         document.Form5.OSR.value = 155;
   }
   else if (value == "StuartLunn")
   {
         document.Form2.NSF.value = 141;
         document.Form4.OSF.value = 115.5;
         document.Form3.NSR.value = 142.5;
         document.Form5.OSR.value = 148.5;
   }
   else if (value == "NeilWain")
   {
         document.Form2.NSF.value = 170;
         document.Form4.OSF.value = 163;
         document.Form3.NSR.value = 171;
         document.Form5.OSR.value = 173;
   }
   else if (value == "RichardMiles")
   {
         document.Form2.NSF.value = 98.5;
         document.Form4.OSF.value = 88.0;
         document.Form3.NSR.value = 119.0;
         document.Form5.OSR.value = 111.5;
   }
   else if (value == "RuariColes")
   {
         document.Form2.NSF.value = 174.0;
         document.Form4.OSF.value = 197.5;
         document.Form3.NSR.value = 158.5;
         document.Form5.OSR.value = 142.0;
   }
   else if (value == "RyanEdwards")
   {
         document.Form2.NSF.value = 106.0;
         document.Form4.OSF.value = 103.0;
         document.Form3.NSR.value = 127.5;
         document.Form5.OSR.value = 116.0;
   }
   else if (value == "MacAllardyce")
   {
         document.Form2.NSF.value = 161.5;
         document.Form4.OSF.value = 182.5;
         document.Form3.NSR.value = 164.0;
         document.Form5.OSR.value = 133.5;
   }
   else if (value == "RogerTaylor")
   {
         document.Form2.NSF.value = 120.0;
         document.Form4.OSF.value = 108.5;
         document.Form3.NSR.value = 112.5;
         document.Form5.OSR.value = 110.0;
   }
   else if (value == "JohnRegan")
   {
         document.Form2.NSF.value = 161.0;
         document.Form4.OSF.value = 154.0;
         document.Form3.NSR.value = 145.0;
         document.Form5.OSR.value = 138.0;
   }
   else if (value == "PaulHarcombe")
   {
         document.Form2.NSF.value = 156.0;
         document.Form4.OSF.value = 153.5;
         document.Form3.NSR.value = 133.5;
         document.Form5.OSR.value = 125.5;
   }
   else if (value == "KevinSwindon")
   {
         document.Form2.NSF.value = 144.0;
         document.Form4.OSF.value = 145.5;
         document.Form3.NSR.value = 139.0;
         document.Form5.OSR.value = 134.5;
   }
   else if (value == "MartinRenew")
   {
         document.Form2.NSF.value = 159.0;
         document.Form4.OSF.value = 149.0;
         document.Form3.NSR.value = 132.5;
         document.Form5.OSR.value = 133.0;
   }
   else if (value == "TimKing")
   {
         document.Form2.NSF.value = 179.0;
         document.Form4.OSF.value = 178.0;
         document.Form3.NSR.value = 174.5;
         document.Form5.OSR.value = 163.5;
   }
   else if (value == "JohnLatham")
   {
         document.Form2.NSF.value = 101.0;
         document.Form4.OSF.value = 93.5;
         document.Form3.NSR.value = 105.0;
         document.Form5.OSR.value = 101.0;
   }
   else if (value == "DavidBell")
   {
         document.Form2.NSF.value = 154.0;
         document.Form4.OSF.value = 114.0;
         document.Form3.NSR.value = 107.0;
         document.Form5.OSR.value = 127.5;
   }
   else if (value == "DeanRoker")
   {
         document.Form2.NSF.value = 183.8;
         document.Form4.OSF.value = 186.0;
         document.Form3.NSR.value = 190.6;
         document.Form5.OSR.value = 204.0;
   }
   else if (value == "RichardM")
   {
         document.Form2.NSF.value = 111;
         document.Form4.OSF.value = 124;
         document.Form3.NSR.value = 132;
         document.Form5.OSR.value = 145;
   }

   document.Form6.total.value = (document.Form2.NSF.value * 1.0) + (document.Form4.OSF.value * 1.0) + (document.Form3.NSR.value * 1.0) + (document.Form5.OSR.value * 1.0);
   
   return;
}



function CheckEmail(form)
{
   if (form.email.value.indexOf("@") < 1)
   {
      alert ("Invalid E-mail address!\n\nYou need to enter a valid E-mail address.");
   }
   
   return;
}



function CheckGuestbookEmail(email)
{
   if (email.indexOf("@") < 1)
   {
      alert ("Are you sure you don't want to give your E-mail address?");
   }
   
   return;
}



function AddBookmark()
{ 
   if (document.all) window.external.AddFavorite(BookmarkURL,BookmarkTitle);
} 



function writeBannerAndMenu()
{

// Find screen size, to enable maximum use of screen:

   findScreenSize();

// Check the browser and, if necessary, change the style sheet:

//   Check_Browser();

   writeTopBanner();
   
   writeMenu();

}



var screen_width;	/* This must be a global variable to be usable by other functions */
var screen_height;	/* This must be a global variable to be usable by other functions */
var bounce_screen_width;
var bounce_screen_height;

function OldfindScreenSize()
{
   document.write('<DIV id="screen100percent"></DIV>');
   screen_width = document.getElementById('screen100percent').clientWidth;
   screen_height = document.getElementById('screen100percent').clientHeight;
//   document.write('screen_width = ' + screen_width);
//   document.write('screen_height = ' + screen_height);

   document.write('<DIV id="block"><BR />I am<BR /<BR />INVINCIBLE!</DIV>');

/* Subtract off dimensions of block, to make wall detection wrt top left corner: */

   bounce_screen_width = screen_width - document.getElementById('block').clientWidth - 1;
   bounce_screen_height = screen_height - document.getElementById('block').clientHeight;
}



function findScreenSize()
{
   screen_height = document.documentElement.clientHeight;
   screen_width = document.documentElement.clientWidth;
//   document.write('screen_height = ' + screen_height);
//   document.write('screen_width = ' + screen_width);

//   document.write('<DIV id="block"><BR />I am<BR /<BR />INVINCIBLE!</DIV>');

}



function optimiseDIVs()
{

/* Get some values for later use: */

   var topbanner_height = document.getElementById('topbanner').clientHeight;

   var menu_width = document.getElementById('menu').clientWidth;

/* Adjust allcontent size & position: */
   
   var allcontent_margin = 50;
   var allcontent_height = (screen_height - (2 * allcontent_margin));	/* Leave top & bottom margins */
   var allcontent_width = (screen_width - (2 * allcontent_margin));	/* Leave left & right margins */

   document.getElementById('allcontent').style.top = allcontent_margin + 'px';
   document.getElementById('allcontent').style.left = allcontent_margin + 'px';
   document.getElementById('allcontent').style.height = allcontent_height + 'px';
   document.getElementById('allcontent').style.width = allcontent_width + 'px';

/* Adjust topbanner width: */

   topbanner_width = allcontent_width - menu_width;
   document.getElementById('topbanner').style.width = topbanner_width + 'px';

/* Adjust menu height: */

   var menu_height = allcontent_height;
//   var menu_height = allcontent_height - 47 - 82;	/* menu header image is 47px high; menu footer image is 82px high */
   document.getElementById('menu').style.height = menu_height + 'px';
   
//   var scrollbar_width = document.getElementById('allcontent').scrollbarWidth;	/* IE gives an error with this, but returns the right value! */
   var scrollbar_width = 20;

/* Adjust pagecontent size: */
   
   var pagecontent_height = allcontent_height - topbanner_height;
   var pagecontent_width = allcontent_width - menu_width - scrollbar_width;
   document.getElementById('pagecontent').style.height = pagecontent_height + 'px';
   document.getElementById('pagecontent').style.width = pagecontent_width + 'px';
}



function writeTopBanner()
{

/* Create the banner: */
   
   document.write('<div id="topbanner" align="center"><img src="Images/FuryWorld_title_wider.gif" alt="Rob\'s Fury Page" /></div>');

}



function writeMenu()
{

/* Create the menu: */

   document.write('<div id="menu">');

   document.write('<img src="Images/MenuTop.gif" alt="Katie" /><br />');

   document.write('<div class="menu-panel">');

   /* There seems to be a bug in IE6. If you don't explicitly put the style statement in, only some(!!!) of the menu items
      appear: */
   
   document.write('<a title="Home page" style="color:#FFFFFF" href="Index.html">Home</a>');

   document.write('<a title="My thoughts on what\'s good about building a Fury." style="color:#FFFFFF" href="WhyBuild.html">Why Build a Fury?</a>');
   document.write('<a title="Ongoing chronological record of Katie\'s construction and (in most detail) improvement." style="color:#FFFFFF" href="Story.html">Development History</a>');
   document.write('<a title="An overview of the experience of building Katie." style="color:#FFFFFF" href="About.html">About the Build</a>');
   document.write('<a title="Experiences since first putting Katie on the road." style="color:#FFFFFF" href="On_the_Road.html">On the Road</a>');
   document.write('<a title="Details of Katie\'s current specifications, in the style of a production car." style="color:#FFFFFF" href="Spec.html">Specifications</a>');
   document.write('<a title="Information about Katie\'s current and past engines." style="color:#FFFFFF" href="Engine.html">Engine</a>');
   document.write('<a title="Engine management on a tight budget - my main Fury project since early 2003." style="color:#FFFFFF" href="GMECM.html">Engine Management</a>');
   document.write('<a title="A frivolous overview of upgrades and replacement parts." style="color:#FFFFFF" href="Upgrades.html">Changed Parts</a>');

   document.write('<a title="News of changes to Katie and/or these web pages." style="color:#FFFFFF" href="News.html">News</a>');
   document.write('<a title="Some of the car related events that I have recently attended." style="color:#FFFFFF" href="Events.html">Events</a>');
   document.write('<a title="Parts that I have available to sell." style="color:#FFFFFF" href="For_Sale.html">For Sale</a>');
   document.write('<a title="Parts that I\'m looking for." style="color:#FFFFFF" href="Wanted.html">Wanted</a>');
   document.write('<a title="A collection of weights of cars and parts that you can contribute to..." style="color:#FFFFFF" href="Weights.html">Weights</a>');
   document.write('<a title="Car related humour." style="color:#FFFFFF" href="Humour.html">Car Humour</a>');
   document.write('<a title="Gallery of Katie pictures." style="color:#FFFFFF" href="Gallery.html">Gallery</a>');
   document.write('<a title="Mugshots of other \'Sylva\' owners - for identification at shows and events." style="color:#FFFFFF" href="Mugshots.html">Sylva Mugshots</a>');

//   document.write('<a title="Record your thoughts for other visitors to see." style="color:#FFFFFF" href="SignGuestbook.html">Sign Guestbook</a>');
//   document.write('<a title="Who\'s been here before?" style="color:#FFFFFF" href="http://www.guestbookdepot.com/php/guestbook.php?book_id=104676&guid=07d69e5c-8975-438a-8c03-b824f674c06c">View Guestbook</a>');
   document.write('<a title="Please feel free to ask a question, say hello, or report broken links." style="color:#FFFFFF" href="Email.html">Contact</a>');

   document.write('<a title="Links to other useful sites" style="color:#FFFFFF" href="Links.html">Links</a>');

   document.write('<br />');

   document.write('<a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>');

   document.write('</div>');	/* Close #menu-panel */

   document.write('</div>');	/* Close #menu */

   document.write('<div id="menubottom"><img src="Images/MenuBottom.jpg" alt="Katie" /></div>');

}



function Footer()
{
   var length;
   var day;
   var number_month;
   var word_month;
   var date;
   var time;
   
/* Write the footer: */

   document.write('<DIV id="footer">');

   document.write('<HR width="100%" />');
   
   document.write('<DIV class="inline_left">Web site &copy;2001-2009 Rob Handley</DIV>');
   
   length = document.lastModified.length;
   
   pointer = document.lastModified.indexOf('/');
   number_month = document.lastModified.substring(pointer-2, pointer);
   day = document.lastModified.substring(pointer+1, pointer+3);
   year = document.lastModified.substring(pointer+4, pointer+8);

   pointer = document.lastModified.indexOf(':');
   time = document.lastModified.substring(pointer-2, length);

   if (number_month == 1)
   {
      word_month = "Jan";
   }   
   else if (number_month == 2)
   {
      word_month = "Feb";
   }   
   else if (number_month == 3)
   {
      word_month = "Mar";
   }   
   else if (number_month == 4)
   {
      word_month = "Apr";
   }   
   else if (number_month == 5)
   {
      word_month = "May";
   }   
   else if (number_month == 6)
   {
      word_month = "Jun";
   }   
   else if (number_month == 7)
   {
      word_month = "Jul";
   }   
   else if (number_month == 8)
   {
      word_month = "Aug";
   }   
   else if (number_month == 9)
   {
      word_month = "Sep";
   }   
   else if (number_month == 10)
   {
      word_month = "Oct";
   }   
   else if (number_month == 11)
   {
      word_month = "Nov";
   }   
   else if (number_month == 12)
   {
      word_month = "Dec";
   }   
   else
   {
      word_month = "???";
   }

   date = day + ' ' + word_month + ' ' + year;
   
   document.write('<DIV class="inline_right">This page last updated at: '+time+' on: '+date+'</DIV>');

   document.write('<BR class="clear_both" />');	/* Required to make next output appear below floating left & right columns */

   document.write('</DIV>');	// Close #footer

/* Expand #allcontent to make full use of screen: */

   optimiseDIVs();

}

