var qtext = new Array();
var qname = new Array();
var qurl = new Array();

var ctext = new Array();
var cname = new Array();

qtext[0] = "Unlike the soppy specimens I'd come across on the way up, he bared his teeth, let fly a vicious screeching, and started running at me, looking for a fight. There's not much that's scarier than a monkey running at you, full pelt, fangs glinting in the midday sun.";
qname[0] = "Gunung Rinjani";
qurl[0] = "gunung_rinjani/day03.html";

qtext[1] = "We'd heard stories about the Black Swamp, and every one of them proved correct. It stank of rotting vegetation; it was, indeed, a very black, swampy area; and it was waist deep in gooey, quicksand-like mud.";
qname[1] = "Hollyford-Pyke Route";
qurl[1] = "hollyford-pyke_route/day07.html";

qtext[2] = "The entire population of the village stood and stared as we wandered off, either because they didn't quite know what to make of me, or because they knew exactly what to make of me and it involved diced potatoes and chopped onions.";
qname[2] = "Taman Negara";
qurl[2] = "taman_negara/day02.html";

qtext[3] = "I arrived at the hide with plenty of daylight to spare. This was fortuitous; the leeches had obviously learned a few new tricks, because when I took off my socks, there were maybe five on each foot, merrily sucking away.";
qname[3] = "Taman Negara";
qurl[3] = "taman_negara/day05.html";

qtext[4] = "At the start of this walk you're surrounded by people who drink tea at four o'clock; at the end you bump into the poor lost souls who tuck into their first cans of Stella at 9am. This is a nine-mile journey from tweed jackets to tracksuit bottoms, and it's a walk every Londoner should do at least once.";
qname[4] = "London Loop";
qurl[4] = "london_loop/day07.html";

qtext[5] = "In retrospect we must have been slightly mad; one false step or one slip, both of which were very possible on the very loose stones and rocks we were clambering up, and it was a fall down a few hundred feet into goodness only knows what.";
qname[5] = "Mt Cook";
qurl[5] = "mt_cook/day02.html";

qtext[6] = "As you climb round the edge of the crater, the ground starts to steam with foul sulphurous fumes that smell just like rotten eggs, and just as you think it can't get any more amazing, the Emerald Lakes come into view down in the next valley.";
qname[6] = "Tongariro Northern Circuit";
qurl[6] = "tongariro_northern_circuit/day01.html";

ctext[0] = "Loved your description of the London Loop. You are <em>spot on<\/em> with the bits I know!";
cname[0] = "Pete";

ctext[1] = "I walked from Land's End to John o'Groats last year, so I found your site very interesting. Since I got back I have found 12 websites altogether (apart from my own) describing the end to end walk. Yours is definitely the best of the bunch.";
cname[1] = "Martin H";

ctext[2] = "I just found out this website, and whoa, it's very interesting. Keep on walking, man!";
cname[2] = "Tessa";

ctext[3] = "You stand and deliver a touch of class &ndash; picture perfect, 5 stars and rising. Shine on!";
cname[3] = "Danny H";

ctext[4] = "We have done the Gunung Rinjani trek, and it is wonderful, as you described. Thanks a lot for your introduction. We have enjoyed your site very much.";
cname[4] = "Martina Y";


// Display comment and quotation
function quotes() {
	var choice = Math.floor(Math.random() * ctext.length);
	var strHTML = '<h3>Praise for this Site<\/h3>';
	strHTML += '<p class="initial">' + ctext[choice] + ' (' + cname[choice] +')<\/p>';
	strHTML += '<p class="more"><a href="../guestbook/site_testimonials.html">More testimonials<\/a><\/p>';
	choice = Math.floor(Math.random() * qtext.length);
	strHTML += '<h3>Article of the Day<\/h3>';
	strHTML += '<p class="initial">' + qtext[choice] + '<\/p>';
	strHTML += '<p class="more"><a href="' + qurl[choice] + '">' + qname[choice] + '<\/a><\/p>';
	$('#additions').before(strHTML);
}


// Insert link to emailer on home page
function mailerLink() {
	var strHTML = '<li class="email"><p><strong>Email a Friend:</strong> If you want to let someone else know about my site, why not <a title="Email this page to a friend" href="';
	strHTML += '../cgi-bin/mailer.cgi?url=' + location.pathname + escape_plus(location.search) + "&amp;title=" + escape(document.title) + "&amp;folder=&amp;file=";
	strHTML += '">email a friend</a> with your own personal message?</p></li>';
	$('#homePageList li.contact').after(strHTML);
}
