function UpdatedOn()
{
// A single function to provide the correct Updated On display
// for every web page = single point Update date entry.
// replaces entire table entry section

var Update = "2 Dec 2011"; // The Update date!

  document.write('<div class="foot1">Web site last updated: ' + Update + '</div>');

} // end of UpdatedOn


function ShowFooterTagLine(regenTime)
{
   
    document.write('<tr>')
    document.write('<td align=left>')
    document.write('<div class="normal"><A HREF="http://bdhcblog.wordpress.com/" target="_blank">Visit the BDHC Blog for latest information and more</A></div>')
    document.write('</td>')
    document.write('</tr>')
    document.write('<tr>')
    document.write('<td align=left>')
    document.write('<div class="foot1">Site designed &amp; maintained by James Tweedie of <A HREF="http://www.geomem.com">GeoMEM Ltd.</A></div>')
    document.write('</td>')
    document.write('<td align=right>')
    UpdatedOn();
    document.write('</td>')
    document.write('</tr>')
	if (regenTime > "") {
       document.write('<tr>')
       document.write('<td align=left>')
       document.write('<div class="foot1">This page re-generated on ' + regenTime + '</div>')
       document.write('</td>')
       document.write('</tr>')	
	}

    document.write('<tr>')
    document.write('<td align=left>')
    document.write('<div class="foot1">Random quote: ' + RandomQuote() + '</div>')
    document.write('</td>')
    document.write('</tr>')

}


var _w = null;
function PhotoWin(PhotoPath,WinTitle,PhotoTitle,Descript1,Descript2,Date,Type,CopyYear,Owner)
{
  _w = window.open('','NewWin','menubar=no,location=no,resizable=yes,scrollbars,top=0,left=0,width=900,height=700');
  _w.document.open();
  _w.document.write('<html><head>');
  _w.document.write('<LINK REL=stylesheet HREF="styles/basic.css" TYPE="text/css">');
  _w.document.write('<title>BDHC photo gallery: "' + WinTitle + '"</title></head>');

  // Start of BODY HTML
  _w.document.write('<body background="decor/bg_lgrey.jpg">');

  // Start of MAIN TABLE
  _w.document.write('<table border="0" align="center" width="100%">');
  // -- Page Title Zone
  _w.document.write('<tr><td width="5%">&nbsp;</td>');
  _w.document.write('<td width="90%" ALIGN="CENTER" class="PhotoHead">Blairgowrie &amp; District Hillwalking Club</td>');
  _w.document.write('<td width="5%">&nbsp;</td></tr>');
  // -- End of Page Title Zone
  // -- Page Descriptive Text Zone
  _w.document.write('<tr><td width="5%">&nbsp;</td>');
  _w.document.write('<td width="90%" ALIGN="CENTER">');
  _w.document.write('<div class="PhotoTitle">' + PhotoTitle + '</div>');

  // -- Photograph - in embedded table 1
  _w.document.write('<table border="3" bgcolor="#C0C0C0"><tr><td>');
  _w.document.write('<img src="' + PhotoPath + '" ALT="' + PhotoTitle +'" Border="0">');
  _w.document.write('</td></tr></table>');

  // Photo information in embedded table
  _w.document.write('<table width=100% border=1 bgcolor=white>');
  _w.document.write('<tr><td width="80%" class="PhotoDescript1">' + Descript1 + '</td>');
  _w.document.write('<td class="PhotoDate">' + Date + '</td></tr>');
  _w.document.write('<tr><td class="PhotoDescript2">' + Descript2 + '</td>');
  _w.document.write('<td class="PhotoType">Image Source:<br>' + Type + '</td></tr></table>');
  
  // New embedded table for copyright (different colour
  _w.document.write('<table width="100%" border="1" bgcolor="#008000" cellpadding="1">');
  _w.document.write('<tr><td width="100%" class="PhotoCopyright">Photograph copyright &copy; ' + CopyYear + ' ' + Owner +'</td></table>'); 
 
  // New embedded table for Close Button
  _w.document.write('<table width="100%" border="0" cellpadding="0">');
  _w.document.write('<tr><td width="100%" align="Center"><form>');
  _w.document.write('<input type=button value="Close Photograph" onClick="javascript:window.close();">');
  _w.document.write('</form></td></tr></table>');
  

  // End of MAIN TABLE
  _w.document.write('</td></tr></table');
  
  _w.document.write('</body></html>');
  _w.document.close();
} // End of PhotoWin


function MailToWithPrompt(Prompt, dom2, dom1, P2, P1)
{
// Used to hide email addresses from spidering systems
// Creates the domain info using dom1 + dot + dom2
// 
// P2 = Second part of email name (preceding @ symbol)
// P1 = First part of email name (preceding @ symbol)
// e.g. P2 = port, P1=sup gives "support" as name.
 
var atsym = "@";
var dot = ".";
var EmailAddr = ""; // 
var starter="<A href='Mailto:"
var ender="'>"
var tail = "</a>"
  
  
  EmailAddr=  P1 + P2 + atsym + dom1 + dot + dom2;

  document.write(starter + EmailAddr + ender + Prompt + tail);

} // end of MailToWithPrompt


function MailToBDHC(PT, P2, P1)
{
// Used to hide email addresses from spidering systems
var atsym = "_@_";
var dot = "_._";
var dom1 = "bdhc";
var dom2 = "org";
var dom3 = "uk";
var starter="<A href='Mailto:"
var ender="'>"
var tail = "</a>"
var message = " (remove the underscores _@_  and  _._.) " 


document.write(starter+P1+P2+atsym+dom1+dot+dom2+dot+dom3+message+ender+PT+tail);

}


function RandomQuote()
{
var nq = 12
var q = new Array(nq)
q[0] = "<i>Men dull in mind find no cause for wonder anywhere; they idly sit at home instead of going to see what is on view in the great theatre of the world.</i> - Conrad Gesner, 1541, in a letter to James Vogel."
q[1] = "<i>The mountains have rules. they are harsh rules, but they are there, and if you keep to them you are safe. A mountain is not like men. A mountain is sincere. The weapons to conquer it exist inside you, inside your soul.</i> - Walter Bonatti."
q[2] = "<i>There is no such thing as bad weather, only inappropriate clothing.</i>  - Sir Rannulph Fiennes."
q[3] = "<i>Only those who will risk going too far can possibly find out how far they can go.</i> - T. S. Eliot."
q[4] = "<i>Doubly happy, however, is the man to whom lofty mountain tops are within reach.</i> -  John Muir"
q[5] = "<i>One does not climb to attain enlightenment, rather one climbs because he is enlightened.</i> - Zen Master Futomaki."
q[6] = "<i>Great things are done when men and mountains meet. This is not done by jostling in the street.</i> - William Blake. 1757- 1827."
q[7] = "<i>Mountains are the beginning and end of all natural scenery.</i> - John Ruskin, 1856, Of Mountain Beauty."
q[8] = "<i>Do nothing in haste; look well to each step; and from the beginning think what may be the end.</i> - Edward Whymper, after the Matterhorn disaster in 1865."
q[9] = "<i>Our need for speed has led us to esteem the streamlined, the dynamic in all things, and that estimation has accelerated us out of sync with the natural world.</i> - Robert MacFarlane, in Mountains of the Mind."
q[10] = "<i>Everyone must know the feeling of triumph and pride which a grand view from a height communicates to the mind.</i> - Charles Darwin, 1836."
q[11] = "<i>A fool knows the price of everything but the value of nothing.</i> - anon."

var n = Math.floor(Math.random() * nq)

return (q[n]);

}


