//this is the javascript code to randomly select a quote relevant to scouting
//store quotes in arrays
// arrays start at 0
var quote = new Array(11); // using 11 since have 0-10 quotes -- 11 in total
// text puts "text" in italics (em = emphasized mode)
// text puts "text" in italics
// text
text1 indents "text1" on a newline below text
quote[0]="Softly falls the light of day
As our campfire fades away,
Silently, each scout should ask
Have I done my daily task?
Have I kept my honor bright?
Can I guilt-less sleep tonight?
Have I done and have I dared
Everything to be prepared?";
quote[1]="" The most important object in Boy Scout training is to educate, not instruct."
~Sir Baden Powell";
quote[2]="The Scout SloganDo a Good Turn Daily.";
quote[3]="The Scout MottoBe Prepared.";
quote[4]="The Scout Oath
On my honor, I will do my best, to do my duty to God and my country, to obey the Scout Law, to help other people at all times, to keep myself physically strong, mentally awake and morally straight.";
quote[5]="The Scout Law
A scout is trustworthy, loyal, helpful, friendly, courteous, kind, obedient, cheerful, thrifty, brave, clean and reverent.";
quote[6]="The Outdoor Code
As an American, I will do my best to be clean in my outdoor manners, be careful with fire, be considerate in the outdoors, and be conservation-minded.";
quote[7]=""Being in the army is like being in the Boy Scouts, except that the Boy Scouts have adult supervision.";
~Blake Clark";
quote[8]=""We never fail when we try to do our duty, we always fail when we neglect to do it."
~Sir Robert Baden-Powell";
quote[9]=""Scoutmasters need the capacity to enjoy the out-of-doors."
~Sir Robert Baden-Powell";
quote[10]="I am the Eagle.
I live in high country, in rocky cathedrals that reach to the sky...
All those who see me and all who believe in me, share in the freedom I feel when I fly.
Come dance with the west wind and touch all the mountaintops.
Sail over a canyon and up to the stars.
Reach for the heavens and hope for the future
And all that we can be...";
//calculate a random index to the array
// math.random() returns a number between 0 and 1 (e.g. 0.345 or 0.967 or 0.001)
// if we multiply that by the number of elements in the array (array.length provides that number)
// we get a number between 0 and the array length - but it has lots of numbers after the decimal point
// to get at one of the array elements, we need only the integer portion (before the decimal point)
// the javascript function math.floor gives us only the integer portion.
index = Math.floor(Math.random()*quote.length);
//display the quotation
document.write(quote[index]);