﻿function printQuoteOfTheWeek(){

theDate = new Date();
theFirst = new Date(theDate.getYear(),0,1)
var day = theDate.getDate();
var month = theDate.getMonth();
var year = theDate.getYear();
year = (year < 2000) ? year + 1900 : year;
var textdate = (theDate.getMonth() + 1) + ' /' + theDate.getDate() + ' /' + year;

var addDays = (theFirst.getDay()-1);

if ((theDate.getYear()/4)==parseInt(theDate.getYear()/4)) {
var addLeapDay = 1;
}
else {
var addLeapDay = 0;
}

if (month==0)
var WeekOfYear=parseInt((theDate.getDate()+0+addDays)/7);
if (month==1)
var WeekOfYear=parseInt((theDate.getDate()+31+addDays)/7);
if (month==2)
var WeekOfYear=parseInt((theDate.getDate()+59+addDays+addLeapDay)/7);
if (month==3)
var WeekOfYear=parseInt((theDate.getDate()+90+addDays+addLeapDay)/7);
if (month==4)
var WeekOfYear=parseInt((theDate.getDate()+120+addDays+addLeapDay)/7);
if (month==5)
var WeekOfYear=parseInt((theDate.getDate()+151+addDays+addLeapDay)/7);
if (month==6)
var WeekOfYear=parseInt((theDate.getDate()+181+addDays+addLeapDay)/7);
if (month==7)
var WeekOfYear=parseInt((theDate.getDate()+212+addDays+addLeapDay)/7);
if (month==8)
var WeekOfYear=parseInt((theDate.getDate()+243+addDays+addLeapDay)/7);
if (month==9)
var WeekOfYear=parseInt((theDate.getDate()+273+addDays+addLeapDay)/7);
if (month==10)
var WeekOfYear=parseInt((theDate.getDate()+304+addDays+addLeapDay)/7);
if (month==11)
var WeekOfYear=parseInt((theDate.getDate()+334+addDays+addLeapDay)/7);

var dayofyear=(theDate.getDate()+0+addDays)

WeekOfYear=(WeekOfYear + 1);

var numquotes = 53;

quotes = new Array(numquotes+1);
quotes[1] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[2] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[3] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[4] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[5] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[6] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[7] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[8] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[9] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[10] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[11] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[12] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[13] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[14] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[15] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[16] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[17] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[18] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[19] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[20] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[21] = " In the middle of difficulty<br> lies opportunity.<br> $ Albert Einstein <br> (German physicist)" ;
quotes[22] = " To keep a lamp burning,<br>we have to keep putting oil in it. $ Mother Teresa  <br> (Indian missionary, Nobel Peace Prize winner)" ;
quotes[23] = " Would you persuade,<br> speak of Interest, not of Reason.<br> $ Benjamin Franklin <br> (American statesman, writer, scientist & printer)";
quotes[24] = " Don't let what you cannot do interfere <br> with what you can do.<br >$ John Wooden <br> (Hall of Fame basketball coach of UCLA)";
quotes[25] = " Worry about being better;<br> bigger will take care of itself.<br> $ Gary Comer <br> (Founder of Lands End)";
quotes[26] = " Simplicity is the ultimate sophistication.<br><br> $ Leonardo da Vinci <br> (Italian painter, sculptor and inventor)";
quotes[27] = " What we call failure is not the falling down,<br> but the staying down.<br> $ Mary Pickford  <br> (cofounder of United Artists)";
quotes[28] = " I must govern the clock,<br> not be governed by it.<br> $ Golda Meir <br> (Prime Minister of Israel)";
quotes[29] = " Opportunities multiply <br>as they are seized.<br> $ Sun Tzu ";
quotes[30] = " Before everything else, <br> getting ready is the secret of success.<br> Henry Ford <br> (American industrialist, inventor)";
quotes[31] = " If opportunity doesn't knock, build a door.<br> $ Milton Berle <br> (American comedian & actor)";
quotes[32] = " Experience is the name <br> every one gives to their mistakes.<br> $ Oscar Wilde <br>  (Irish writer & critic)";
quotes[33] = " Worry about being better;<br> bigger will take care of itself.<br> $ Gary Comer <br> (Founder of Lands End)";
quotes[34] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[35] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[36] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[37] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[38] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[39] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[40] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[41] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[42] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[43] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[44] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[45] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[46] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[47] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[48] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[49] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[50] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[51] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[52] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;
quotes[53] = " Don´t just stand there,<br>make it happen <br> $ Lee Lacoca <br> (Ex-Presidente de Chrysler Corporation)" ;

var fraseCompleta = quotes[WeekOfYear];


pos = fraseCompleta.indexOf("$");

var fraseArray = new Array("","");
if (pos == -1){
	fraseArray[0] = fraseCompleta;
	fraseArray[1] = ' ';

}else{
	fraseArray[0] = fraseCompleta.substring( 0, parseFloat(pos));
	fraseArray[1] = fraseCompleta.substring( parseFloat(pos) + 1 , fraseCompleta.length);
}

return fraseArray;
}
