﻿//store the quotations in arrays
quotes = new Array(52);
quotes[0] = "&quot;There are risks and costs to a program of action. But they are far less than the long-range risks and costs of comfortable inaction.&quot; (John F. Kennedy)";
quotes[1] = "&quot;I count him braver who overcomes his desires than him who conquers his enemies; the hardest victory is the victory over self.&quot; (Aristotle)"; 
quotes[2] = "&quot;Progress is impossible without change, and those who cannot change their minds cannot change anything.&quot; (George Bernard Shaw)"; 
quotes[3] = "&quot;The time is always right to do what is right.&quot; (Martin Luther King, Jr.)"; 
quotes[4] = "&quot;If you talk to a man in a language he understands, that goes to his head. If you talk to him in his language, that goes to his heart.&quot; (Nelson Mandela)"; 
quotes[5] = "&quot;We become just by performing just actions, temperate by performing temperate actions, brave by performing brave actions.&quot; (Aristotle)"; 
quotes[6] = "&quot;The obvious is that which is never seen until someone expresses it simply.&quot; (Khalil Gibran)"; 
quotes[7] = "&quot;Those who trust to chance must abide by the results of chance.&quot; (Calvin Coolidge)"; 
quotes[8] = "&quot;If you judge people, you have no time to love them.&quot; (Mother Teresa)";
quotes[9] = "&quot;Am I not destroying my enemies when I make friends of them?&quot; (Abraham Lincoln)"; 
quotes[10] = "&quot;Find fault with thyself rather than with others.&quot; (Ieyasu Tokugawa)"; 
quotes[11] = "&quot;Quality is not an act. It is a habit.&quot; (Aristotle)"; 
quotes[12] = "&quot;The most potent weapon of the oppressor is the mind of the oppressed.&quot; (Steven Biko)"; 
quotes[13] = "&quot;As for me, all I know is that I know nothing.&quot; (Socrates)"; 
quotes[14] = "&quot;The habits of life form the soul, and the soul forms the countenance.&quot; (Honore de Balzac)"; 
quotes[15] = "&quot;Be sure you put your feet in the right place, then stand firm.&quot; (Abraham Lincoln)"; 
quotes[16] = "&quot;Opportunities multiply as they are seized.&quot; (Sun Tzu)"; 
quotes[17] = "&quot;How much more grievous are the consequences of anger than the causes of it.&quot; (Marcus Aurelius)"; 
quotes[18] = "&quot;Let him that would move the world first move himself.&quot; (Socrates)"; 
quotes[19] = "&quot;Well done is better than well said.&quot; (Benjamin Franklin)"; 
quotes[20] = "&quot;If you tell the truth you don't have to remember anything.&quot; (Mark Twain)"; 
quotes[21] = "&quot;Knowing is not enough, we must apply. Willing is not enough, we must do.&quot; (Johann von Goethe)"; 
quotes[22] = "&quot;Propriety of manners and consideration for others are the two main characteristics of a gentleman.&quot; (Benjamin Disraeli)"; 
quotes[23] = "&quot;Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.&quot; (Sun Tzu)"; 
quotes[24] = "&quot;The probability that we may fail in the struggle ought not to deter us from the support of a cause we believe to be just.&quot; (Abraham Lincoln)"; 
quotes[25] = "&quot;Leadership and learning are indispensable to each other.&quot; (John F. Kennedy)"; 
quotes[26] = "&quot;Progress comes to those who train and train; reliance on secret techniques will get you nowhere.&quot; (Morihei Ueshiba)"; 
quotes[27] = "&quot;It always seems impossible until its done.&quot; (Nelson Mandela)"; 
quotes[28] = "&quot;Those who stand for nothing fall for anything.&quot; (Alexander Hamilton)";
quotes[29] = "&quot;I am not young enough to know everything.&quot; (Oscar Wilde)";
quotes[30] = "&quot;Virtuous action does not consist in doing good to someone who has done good to you—that is merely returning a favour. Virtuous action consists in doing good to those who have wronged you.&quot; (Jesus, Son of Mary –pbuh)";
quotes[31] = "&quot;When a man is wrapped up in himself he makes a pretty small package.&quot; (Oscar Wilde)";
quotes[32] = "&quot;All that glitters is not gold.&quot; (Miguel de Cervantes)";
quotes[33] = "&quot;He that studieth revenge keepeth his own wounds green, which otherwise would heal and do well.&quot; (John Milton)";
quotes[34] = "&quot;An eye for an eye, and the whole world would be blind.&quot; (Khalil Gibran)";
quotes[35] = "&quot;If you don't know where you are going, every road will get you nowhere.&quot; (Henry Kissinger)";
quotes[36] = "&quot;Life is full of chances and changes, and the most prosperous of men may... meet with great misfortunes.&quot; (Aristotle)";
quotes[37] = "&quot;Be not content with stories of those who went before you. Go forth and create your own story.&quot; (al-Rumi)";
quotes[38] = "&quot;Nothing is particularly hard if you divide it into small jobs.&quot; (Henry Ford)";
quotes[39] = "&quot;Most folks are about as happy as they make up their minds to be.&quot; (Abraham Lincoln)";
quotes[40] = "&quot;To make our way, we must have firm resolve, persistence, tenacity. We must gear ourselves to work hard all the way. We can never let up.&quot; (Ralph Bunche)";
quotes[41] = "&quot;The best way to find yourself is to lose yourself in the service of others.&quot; (Mahatma Gandhi)";
quotes[42] = "&quot;The good life is one inspired by love and guided by knowledge.&quot; (Bertrand Russell)";
quotes[43] = "&quot;Hearts are the strongest when they beat in response to noble ideals.&quot; (Ralph Bunche)";
quotes[44] = "&quot;Beware of false knowledge; it is more dangerous than ignorance.&quot; (George Bernard Shaw)";
quotes[45] = "&quot;It is better to offer no excuse than a bad one.&quot; (George Washington)";
quotes[46] = "&quot;It is easy to sit up and take notice. What is difficult is getting up and taking action.&quot; (Honore de Balzac)";
quotes[47] = "&quot;Do not be afraid of defeat. You are never so near to victory as when defeated in a good cause.&quot; (Henry Ward Beecher)";
quotes[48] = "&quot;A single man has not nearly the value he would have in a state of union. He is an incomplete animal. He resembles the odd half of a pair of scissors.&quot; (Benjamin Franklin)";
quotes[49] = "&quot;Tell me thy company and I will tell thee what thou art.&quot; (Miguel de Cervantes)";
quotes[50] = "&quot;The childhood shows the man, as morning shows the day.&quot; (John Milton)";
quotes[51] = "&quot;Talk not of wasted affection - affection never was wasted.&quot; (Henry Wadsworth Longfellow)";

//calculate a random index
//index = Math.floor(Math.random() * quotes.length);

function y2k(number) { return (number < 1000) ? number + 1900 : number; }

function getWeek(year, month, day) {
    var when = new Date(year, month, day);
    var newYear = new Date(year, 0, 1);
    var offset = 7 + 1 - newYear.getDay();
    if (offset == 8) offset = 1;
    var daynum = ((Date.UTC(y2k(year), when.getMonth(), when.getDate(), 0, 0, 0) - Date.UTC(y2k(year), 0, 1, 0, 0, 0)) / 1000 / 60 / 60 / 24) + 1;
    var weeknum = Math.floor((daynum - offset + 7) / 7);
    if (weeknum == 0) {
        year--;
        var prevNewYear = new Date(year, 0, 1);
        var prevOffset = 7 + 1 - prevNewYear.getDay();
        if (prevOffset == 2 || prevOffset == 8) weeknum = 53; else weeknum = 52;
    }
    return weeknum;
}

var now = new Date();
//document.write('Week number = ' + getWeek(y2k(now.getYear()), now.getMonth(), now.getDate())); 

//display the quotation
document.write("<div class='twitters'>" + quotes[getWeek(y2k(now.getYear()), now.getMonth(), now.getDate())] + "</div>");
//done

 

