// Peasy Javascript recommend-o-tron: reads the page URL and a
// random e-mail subject and message, then bungs it in a mailto
// link. NB: \r in first func skips the recipient address; if you want
// carriage returns in the message body, use %0a instead. This is
// because everything to do with computers is rubbish. NB2: you can't
// have multiple rets (ie, %0a%0a will still be one carriage return).
// This is also because everything to do with etc etc.

function recommend()
{ document.write("<a href='mailto:\r?Subject=" + find_rand_subject() + "&amp;Body=" + find_rand_body() + "%0a%0a" + document.location.href + "'>Recommend Tiny Horsey to a friend</a>"); }

function find_rand_subject()
{
var rand_subject = new Array(
"Tiny Horsey = Good for Morale",
"Tiny Horsey = Better than Bread",
"Tiny Horsey = Excellent"
);
return find_rand_bit(rand_subject);
}

function find_rand_body()
{
var rand_body = new Array(
"Dearest friend,%0aI thought I would take a moment out of my incredibly busy day to recommend something to you.%0aIt is the best Internet Web Site on the Internet, and its name is www.tinyhorsey.co.uk%0aI hope you enjoy it as much as I did.%0aP.S. I hope that rash you had has gotten better.%0aHere is TINY HORSEY:"
);
return find_rand_bit(rand_body);
}

function find_rand_bit(rand_bits)
{ return (rand_bits[Math.round(Math.random() * rand_bits.length - 0.5)]); }