// JavaScript Document
/*
 *  File:  browser.js
 *
 *  Browser checking routines (for popular browsers v3.0 and above)
 *
 *  Usage:
 *
 *    <script type="text/javascript"
 *            src="http://www.bgsu.edu/scripts/browser.js">
 *    </script>
 *
 *  Insert the <script> element into the <head> or <body> of your document.
 *
 *  This script adds the following properties to the navigator object:
 *
 *  String properties:   navigator.appVer
 *
 *  Boolean properties:  navigator.isNN,  navigator.isIE
 *                       navigator.isNN3, navigator.isIE3
 *                       navigator.isNN4, navigator.isIE4
 *                       navigator.isNN5, navigator.isIE5
 *                       navigator.isNN6, navigator.isIE6
 *                       navigator.isNN7, navigator.isIE7
 *
 *                       navigator.isWin, navigator.isMac
 *
 *  The script also fixes a screen redraw bug in Netscape Navigator v4.
 *
 *  Example:  browserTest.html
 *
 */

// Adds some properties to the navigator object:
function addNavigatorProps() {

  // Get and save the navigator object:
  var nav = navigator;

  // Determine the name of the browser:
  var browserName = nav.appName;
  var isNN = ( browserName == "Netscape" );
  var isIE = ( browserName == "Microsoft Internet Explorer" );

  // Determine the version of the browser:
  var browserVersion = nav.appVersion;
  var appVer = parseFloat( browserVersion );
  
  // Bug fix for IE 4 and above:
  if ( isIE && appVer >= 4 ) {
    var regexp = /MSIE ([0-9.]+)/;
    if ( regexp.exec( browserVersion ) ) {
      var ver = parseFloat( RegExp.$1 );
      if ( ver > appVer ) {
        appVer = ver;
      }
    }
  }
  
  // Bug fix for NN 6 and above:
  if ( isNN && appVer >= 5 ) {
    var regexp = /Netscape\d?\/([0-9.]+)/;
    if ( regexp.exec( nav.userAgent ) ) {
      var ver = parseFloat( RegExp.$1 );
      if ( ver > appVer ) {
        appVer = ver;
      }
    }
  }
  
  // Determine the platform:
  var ua = nav.userAgent.toLowerCase();
  var isWin = ( ua.indexOf( "win" ) != -1 || ua.indexOf( "16bit" ) != -1 );
  var isMac = ( ua.indexOf( "mac" ) != -1 );
  
  
  // Add properties to the navigator object:
  nav.appVer = appVer;
  nav.isNN = isNN;
  nav.isNN3 = ( isNN && appVer >= 3 );
  nav.isNN4 = ( isNN && appVer >= 4 );
  nav.isNN5 = ( isNN && appVer >= 5 );
  nav.isNN6 = ( isNN && appVer >= 6 );
  nav.isNN7 = ( isNN && appVer >= 7 );
  nav.isIE = isIE;
  nav.isIE3 = ( isIE && appVer >= 3 );
  nav.isIE4 = ( isIE && appVer >= 4 );
  nav.isIE5 = ( isIE && appVer >= 5 );
  nav.isIE6 = ( isIE && appVer >= 6 );
  nav.isIE6orless = ( isIE && appVer <= 6 );
  nav.isIE7 = ( isIE && appVer >= 7 );
  nav.isWin = isWin;
  nav.isMac = isMac;

}
addNavigatorProps();

function isIE6orless()
{
  // Get and save the navigator object:
  var nav = navigator;

  // Determine the name of the browser:
  var browserName = nav.appName;
  var isNN = ( browserName == "Netscape" );
  var isIE = ( browserName == "Microsoft Internet Explorer" );
  
    // Determine the version of the browser:
  var browserVersion = nav.appVersion;
  var appVer = parseFloat( browserVersion );
  
  return ( isIE && appVer <= 6 );
}

function writeEmail(name1, name2, email1, email2)
{
	document.write('<a href=\"mailto:' + email1 + '@' + email2 + '\">' + name1 + name2 + '</a>');
				
}

function writeWisdom()
{
	var quotes = new Array();
	var authors = new Array();
	
	quotes[0] = "For each new morning with its light,<br/>&nbsp;&nbsp;For rest and shelter of the night,<br/>For health and food, for love and friends,<br/>&nbsp;&nbsp;For everything Thy goodness sends.";
	authors[0] = "Ralph Waldo Emerson";
	
	quotes[1] = "Happiness comes when your work and words are of benefit to yourself and others.";
	authors[1] = "Buddha";
	
	quotes[2] = "When you convince your mind of its accomplishing power, you can do anything!";
	authors[2] = "Paramahansa Yogananda";
	
	quotes[3] = "It is never too late to become what you might have been.";
	authors[3] = "George Eliot";
	
	quotes[4] = "Let him that would move the world, first move himself";
	authors[4] = "Socrates";
	
	quotes[5] = "The fight is never about grapes or lettuce.  It is always about people.";
	authors[5] = "Cesar Chaves";
	
	quotes[6] = "It is no use walking anywhere to preach unless our walking is our preaching.";
	authors[6] = "St. Francis of Assisi";
	
	quotes[7] = "Keep your fears to yourself, but share your courage with others.";
	authors[7] = "Robert Louis Stevenson";
	
	quotes[8] = "Now, I have no choice but to see with your eyes, so I am not alone, so you are not alone.";
	authors[8] = "Yannis Ritsos";
	
	quotes[9] = "Have a bias toward action - let's see something happen now.  You can break that big plan into small steps and take the first step right away.";
	authors[9] = "Indira Gandhi";
	
	quotes[10] = "There are risks and costs to a program of action.<br />But they are far less than the long-range risks and costs of comfortable inaction.";
	authors[10] = "John Fitzgerald Kennedy";
	
	quotes[11] = "Throughout all the ten regions of the Universe there is no place where the source is not.";
	authors[11] = "Hakuin";
	
	quotes[12] = "Every problem has a gift for you in its hands.";
	authors[12] = "Richard Bach";
	
	quotes[13] = "Well-behaved women rarely make history.";
	authors[13] = "Anonymous";
	
	quotes[14] = "...that you too, may be living stones making a spiritual house...";
	authors[14] = "1 Peter 2:5";
	
	quotes[15] = "Our greatest glory is not in never falling, but in rising every time we fall.";
	authors[15] = "Confucius";
	
	quotes[16] = "May the Light shine on all your days.<br />It is there, despite illness, defeat and tears.  It is eternal.";
	authors[16] = "Harvey Stower";
	
	quotes[17] = "Ideas must work their way through the brains and arms of men, or they are no better than dreams.";
	authors[17] = "Proverbs 29:18";
	
	quotes[18] = "Courage is simply the willingness to be afraid and act anyway.";
	authors[18] = "Robert Anthony";
	
	quotes[19] = "We see the world piece by piece, as the sun, the moon, the animal, the tree; but the Whole, of which these are shining parts, is the Soul.";
	authors[19] = "Ralph Waldo Emerson";
	
	quotes[20] = "The choice: memory or oppression.";
	authors[20] = "Milan Kundera";
	
	quotes[21] = "We gotta make a change...<br />It's time for us as a people to start makin' some changes<br/>Let's change the way we eat, let's change the way we live<br/>and let's change the way we treat each other.<br />You see the old way wasn't working so it's on us to do what we gotta do, to survive.";
	authors[21] = "'Changes' by 2Pac";
	
	quotes[22] = "It is the weak who are cruel.  Gentleness can only be expected from the strong.";
	authors[22] = "Leo Rosten";
	
	quotes[23] = "It isn't so much do what you like, as it is that you like what you do.";
	authors[23] = "Stephen Sondheim<br />from \"Sunday in the Park with George\"";
	
	quotes[24] = "Love does not consist in gazing at each other but in looking together in the same direction." ;
	authors[24] = "Antoine de Saint-Exupéry";
	
	quotes[25] = "Love is the difficult realization that something other than oneself is real." ;
	authors[25] = "Iris Murdoch";
	
	quotes[26] = "The two most important tools an architect has are the eraser in the drawing room and the sledge hammer on the construction site."; 
	authors[26] = "Frank Lloyd Wright";
	
	quotes[27] = "Surely there must be an ancient Chinese proverb that says, \"If the situation's killing you, get the hell out!\"";
	authors[27] = "Leo Buscaglia";
	
	quotes[28] = "All we really have in life is what we notice.";
	authors[28] = "Zen teaching";
	
	quotes[29] = "Go not where the path may lead.<br />Go instead where there is no path and leave a trail...";
	authors[29] = "Ralph Waldo Emerson";
	
	quotes[30] = "Men are born to succeed, not fail.";
	authors[30] = "Henry David Thoreau";
	
	quotes[31] = "What would you attempt to do if you knew you would not fail?";
	authors[31] = "Robert Schuller";
	
	quotes[32] = "Success usuallly comes to those who are too busy to be looking for it.";
	authors[32] = "Henry David Thoreau";
	
	quotes[33] = "Take the first step in faith. You don't have to see the whole staircase, just take the first step.";
	authors[33] = "Martin Luther King, Jr.";
	
	quotes[34] = "If you love what you do, you will never work another day in your life." ;
	authors[34] = "Confucious";
	
	quotes[35] = "Nothing great was ever achieved without enthusiasm.";
	authors[35] = "Ralph Waldo Emerson";
	
	quotes[36] = "I'm not telling you it is going to be easy - I'm telling you it's going to be worth it";
	authors[36] = "Art Williams";
	
	quotes[37] = "The most painful thing to experience is not defeat but regret" ;
	authors[37] = "Leo Bascaglia";
	
	quotes[38] = "God gives every bird its food, but he does not throw it into the nest.";
	authors[38] = "Josiah Gilbert Holland";
	
	quotes[39] = "The road to success is dotted with many tempting parking places.";
	authors[39] = "unknown";
	
	quotes[40] = "Contemplation is seeing the here and now.";
	authors[40] = "Swami Prajnanpad";
	
	quotes[41] = "No matter what you may be doing you are always free to whisper your love to God, until you consciously receive His/Her reponse. This is the surest way to make contact in the mad rush of present-day life.";
	authors[41] = "Paramhansa Yagananda";
	
	quotes[42] = "It is easy to shield our bodies against poisoned arrows from without but difficult to shield our minds against poisoned dart from within. ";
	authors[42] = "Shakyamuni";
		
	quotes[43] = "The world is ruled by letting things take their course. ";
	authors[43] = "Lao-Tzu";
	
	quotes[44] = "Four and fifty years I’ve hung the sky with stars. Now I leap through-what shattering! ";
	authors[44] = "Dogen";
	
	quotes[45] = "Only he who is ready to question, to think for himself, will find the truth. ";
	authors[45] = "Nisargadatta Maharaj";
	
	quotes[46] = "Do not believe a thing simply because it has been said. ";
	authors[46] = "Buddha";
	
	quotes[47] = "In the practice of tolerance, one’s enemy is the best teacher. ";
	authors[47] = "Dalai Lama";
	
	quotes[48] = "We must learn that the same thing can be viewed from a hundred different standpoints, and yet be the same thing. ";
	authors[48] = "Swami Vivekananda";

	quotes[49] = "Having failed to distinguish thoughts from things, we then fail to distinguish words from thoughts. We thinkthat if we can label a thing we have understood it. ";
	authors[49] = "Maha Sthavira Sangharakshita";

	quotes[50] = "When a man possesses in his being the notion of God, that is the miracle of miracles. ";
	authors[50] = "Rabindranath Tagore";

	quotes[51] = "To have inward solitude and space is very important because is implies freedom to be, to go, to function, to fly. ";
	authors[51] = "Krishnamurti";

	quotes[52] = "Have much and be confused. ";
	authors[52] = "Tao te Ching";

	quotes[53] = "The fool who knows he is a fool is for that very reason wise. The fool who thinks himself wise is the greatest fool of all. ";
	authors[53] = "Shakyamuni";

	quotes[54] = "If a man lives a pure life nothing can destroy him; if he has conquered greed nothing can limit his freedom. ";
	authors[54] = "Buddha";

	quotes[55] = "Seeking the Mind within the mind, is not this the greatest of all mistakes? ";
	authors[55] = "Seng-T’san";

	quotes[56] = "Looking at small advantages prevents great affairs from being accomplished. ";
	authors[56] = "Confucius";

	quotes[57] = "You are pure, calm Spirit. It is time you remember who you are: the blessed soul, a reflection of Spirit. ";
	authors[57] = "Paramahansa Yogananda";

	quotes[58] = "Our contribution to the progress of the world must, therefore, consist in setting our own house in order. ";
	authors[58] = "Mahatma Gandhi";

	quotes[59] = "I am open to the guidance of synchronicity, and do not let expectations hinder my path. ";
	authors[59] = "Dalai Lama";

	quotes[60] = "The bird in a forest can perch but on one bough. And this should be the wise man’s pattern. ";
	authors[60] = "Tso Ssu";

	quotes[61] = "If you are too excited by joy, later you will have to cry. ";
	authors[61] = "Tibetan saying";

	quotes[62] = "As is the atom, so is the universe. ";
	authors[62] = "The Upanishads";

	quotes[63] = "Realize the grand unique principle of the whole that is in all men. ";
	authors[63] = "Rabindranath Tagore";

	quotes[64] = "It is there, right where you are; If you seek it, obviously you do not see it. ";
	authors[64] = "Muso Kokushi";

	quotes[65] = "Live your own life. That is to say, where you are, with what you are, and with who you are. ";
	authors[65] = "Swami Prajnanpad";

	quotes[66] = "With right attitude, life is very simple and very easy. ";
	authors[66] = "Paramahansa Yogananada";

	quotes[67] = "It is well to give when asked, but it is better to give unasked, through understanding. ";
	authors[67] = "Kahlil Gibran";

	quotes[68] = "The soul dwells within all that exists; it is the truth of all that exists. You, my son, are the soul. ";
	authors[68] = "The Upanishads";

	quotes[69] = "An inch of time is an inch of gold: Treasure it. Appreciate its fleeting nature; misplaced gold is easily found, misspent time is lost forever. ";
	authors[69] = "Loy Ching-Yuen";

	quotes[70] = "Not too loose (yin), not too tight (yang). ";
	authors[70] = "Zen saying";

	quotes[71] = "Those who remember that we must come to an end in this world, their quarrels cease at once. ";
	authors[71] = "The Dhammapada";

	quotes[72] = "Outside noisy, inside empty. ";
	authors[72] = "Chinese Proverb";

	quotes[73] = "If you cannot hold even the mind and body you use, how can you expect ot cling to other things and hold them? ";
	authors[73] = "Nyogen Senzaki";

	quotes[74] = "This “I and mine” causes the whole misery. ";
	authors[74] = "Swami Vivekananda";

	quotes[75] = "To awaken the heart is to awaken the dormant soul. ";
	authors[75] = "Mahatma Gandhi";

	quotes[76] = "When we become spiritualized by self-discipline and deep meditation, we soar like the wind in the omnipresence of our true sould-nature. ";
	authors[76] = "Paramhansa Yogananda";

	quotes[77] = "The soul shines equally in people on the farthest island and in people close at hand. ";
	authors[77] = "The Upanishads";

	quotes[78] = "How you do anything is how you do everything. ";
	authors[78] = "Zen saying";

	quotes[79] = "There are two ways of avoiding war: One is to satisfy everyone’s desire, the other, to content oneself with the good. ";
	authors[79] = "Unto Tahtinen";

	quotes[80] = "Because of our Spirit we sometimes expereince extraordinary happiness in our life, even when it seems impossible with our physical energy and mental power. ";
	authors[80] = "Ven Thupten Gyaltsen";

	quotes[81] = "The Lord of Law, to whom we have to render the account, is the Soul within us. ";
	authors[81] = "Gopal Singh";

	quotes[82] = "Where ignorance is our master, there is no possibility of real peace. ";
	authors[82] = "Dalai Lama";

	quotes[83] = "When you see clearly the problem is solved. ";
	authors[83] = "Krishnamurti";

	quotes[84] = "Meditation is not the means to an end. It is both the means and the end. ";
	authors[84] = "Krishnamurti";

	quotes[85] = "Faith is an oasis in the heart which can never be reached by the caravan of thinking. ";
	authors[85] = "Kahlil Gibran";

	quotes[86] = "Calm in quietude is not real calm; when you can be calm in the midst of activity, this is the true state of nature. ";
	authors[86] = "Huanchu Daoren";

	quotes[87] = "Wherever there is attachment, association with it brings endless misery. ";
	authors[87] = "Gampopa";

	quotes[88] = "When I hear I see, when I see I hear.";
	authors[88] = "Zen koan";

	quotes[89] = "Still your mind in me, still yourself in me, and without a doubt you shall be united with me, Lord of Love, dwelling in your heart.";
	authors[89] = "The Bhagavad-Gita";

	quotes[90] = "The more we care for the happiness of others, the greater is our own sense of well-being.";
	authors[90] = "Dalai Lama";

	quotes[91] = "If you are irritated by every rub, how will your mirror be polished? ";
	authors[91] = "Djalal ad-Din Rumi";

	quotes[92] = "Once the whole is divided, the parts need names. There are already enough names.";
	authors[92] = "Tao te Ching";

	quotes[93] = "Man is setting out to satisfy needs that mean more to him than simply nourishment and clothing. He is embarking on a rediscovery of himself.";
	authors[93] = "Rabindranath Tagore";

	quotes[94] = "To understand everything is to forgive everything.";
	authors[94] = "Buddha";

	quotes[95] = "Fearlessness is the first requirement of spirituality. Cowards can never be moral. ";
	authors[95] = "Mahatma Gandhi";

	quotes[96] = "It is only when we give complete attention to a problem, and solve it immediately-never carrying it over to the next day, the next minute-that there is solitude. ";
	authors[96] = "Krishnamurti";

	quotes[97] = "Knowledge is the best kind of wealth. ";
	authors[97] = "Dalai Lama";

	quotes[98] = "There is no beginning to practice or end to enlightenment; There is no beginning to enlightenment nor end to practice. ";
	authors[98] = "Dogen";

	quotes[99] = "He who knows others is wise; he who knows himself is enlightened. ";
	authors[99] = "Lao-tzu";

	//quotes[] = "";
	//authors[] = "";
	
	var index = Math.floor(Math.random() * quotes.length);
	
	document.write("<p>" +quotes[index] + "</p>");
	document.write("<p class='quoteauthor'>-- " + authors[index] + "</p>");
}