/* **********
displays greeting based on time of day
********** */

function tod () {

now = new Date();
tod = now.getHours();

if ( tod < 12 ) {

	document.write ( "<p class='tod'>Good Morning!</p>"  );

} else if ( tod >=12 && tod <17 ) {

	document.write ( "<p class='tod'>Good Afternoon!</p>"  );

} else if ( tod >= 17 ) {

	document.write ( "<p class='tod'>Good Evening!</p>"  );

} else {

	document.write ( "<p class='tod'>Welcome!</p>"  );

}
}


/* **********
displays date nicely
********** */

function dateFormat( date ) {

lastMod = document.lastModified;

if ( date ) {
	now = new Date ( date );
} else {
 	now = new Date();
}

m = new Array();
m[0]  = "Jan";
m[1]  = "Feb";
m[2]  = "Mar";
m[3]  = "Apr";
m[4]  = "May";
m[5]  = "Jun";
m[6]  = "Jul";
m[7]  = "Aug";
m[8]  = "Sep";
m[9]  = "Oct";
m[10] = "Nov";
m[11] = "Dec";

d = new Array();
d[0] = "Sun";
d[1] = "Mon";
d[2] = "Tue";
d[3] = "Wed";
d[4] = "Thu";
d[5] = "Fri";
d[6] = "Sat";

date = d[now.getDay()];
date += ", ";
date += now.getDate(); 
date += " "; 
date += m[now.getMonth()]; 
date += " "; 
date += now.getFullYear();

document.write ( date );

}

/* **********
displays random quotations
********** */

function quoter() {

// array of quotations

q = new Array();

q[0] = "&#147;What is the use of a book, thought Alice, without pictures or conversations?&#148; &#151;&nbsp;Lewis Carroll";
q[1] = "&#147;The universe is full of magical things patiently waiting for our wits to grow sharper.&#148; &#151;&nbsp;Eden Phillpots (1862-1960)";
q[2] = "&#147;Spoon feeding in the long run teaches us nothing but the shape of the spoon.&#148; &#151;&nbsp;E. M. Forster";
q[3] = "&#147;A teacher is better than two books.&#148; &#151;&nbsp;German proverb";
q[4] = "&#147;Men are born ignorant, not stupid; they are made stupid by education.&#148; &#151;&nbsp;Bertrand Russell";
q[5] = "&#147;What we have to learn to do, we learn by doing.&#148; &#151;&nbsp;Aristotle";
q[6] = "<small>&#147;Confidence is feeling that you have something to say; arrogance is feeling you have nothing to hear. Confidence is when you have something to teach; arrogance is the belief you have nothing to learn.&#148;</small> &#151;&nbsp;Dale Dauten";
q[7] = "&#147;It is the supreme art of the teacher to awaken joy in creative expression and knowledge.&#148; &#151;&nbsp;Albert Einstein";
q[8] = "&#147;The mind is not a vessel to be filled but a fire to be kindled.&#148; &#151;&nbsp;Plutarch";
q[9] = "&#147;Nothing great was ever accomplished without enthusiasm.&#148; &#151;&nbsp;Ralph Waldo Emerson";
q[10] = "&#147;Man can learn nothing except by going from the known to the unknown.&#148; &#151;&nbsp;Claude Bernard";
q[11] = "&#147;All Nature wears one universal grin.&#148; &#151;&nbsp;Henry Fielding";
q[12] = "&#147;To be surprised, to wonder, is to begin to understand.&#148; &#151;&nbsp;Jose Ortega y Gasset";
q[13] = "&#147;Knowledge which is acquired under compulsion obtains no hold on the mind.&#148; &#151;&nbsp;Plato";
q[14] = "&#147;Knowledge cannot be passed like a material substance from one mind to another.... Ideas must be rethought, experience must be re-experienced.&#148; &#151;&nbsp;John Milton Gregory, The Seven Laws of Teaching";
q[15] = "&#147;It is better to ask some of the questions than to know all of the answers.&#148; &#151;&nbsp;James Thurber";
q[16] = "&#147;Much learning does not teach much understanding.&#148; &#151;&nbsp;Heraclitus";
q[17] = "&#147;Information's pretty thin stuff, unless mixed with experience.&#148; &#151;&nbsp;Clarence Day";
q[18] = "&#147;What is the hardest task in the world? To think.&#148; &#151;&nbsp;Emerson";

/*
q[] = "&#147;&#148; &#151;&nbsp;";
*/

// random number generator

n = Math.round ( Math.random() * ( q.length - 1 ) );

// display

quote = "<div class='quoter'>";
quote += q[n];
quote += "</div>";

document.write ( quote );

}
