﻿var QuoteIdx = 0, AuthorIdx = 1;
//Designer quotes array:
var aQuotes = new Array();
aQuotes[0]  = ["The details are not the details. The details make the product.", "___Charles Eames, Architect & Designer"];
aQuotes[1]  = ["God is in the details.", "____Ludwig Mies van der Rohe, Architect & Designer"];
aQuotes[2]  = ["Simplicity, order and flexibility endure throughout the centuries.", "___Stanley Barrows, Architect"];
aQuotes[3]  = ["My approach is to combine everything suitable that gives a space the feeling of freshness, originality, and a more beautiful atmosphere for living.", " _____Michael Taylor, Architect"];
aQuotes[4]  = ["A designer knows that he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.", "_____Antoine de Saint-Exupery, Architect"];
aQuotes[5]  = ["People are astonished at how happy they can be when they surround themselves with color. I?m now seeing a lot more of it?everyone has suddenly rediscovered the rainbow.", "_____Mario Buatta, Designer"];
aQuotes[6]  = ["<b>Inspired</b>, not insipid.", "___Paul Vincent Wiseman, Designer"];
aQuotes[7]  = ["Form and Function should be one, joined in a spiritual union.", "____Frank Lloyd Wright, Architect"];
aQuotes[8]  = ["When I am working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong.", "_____R. Buckminster Fuller, Architect"];
aQuotes[9]  = ["Always design a thing by considering it in its next larger context?a chair in a room, a room in a house, a house in an environment, an environment in a city plan.", "_____Eliel Saarinen, Architect"];
aQuotes[10] = ["Less is more.", "__Ludwig Mies van der Rohe, Architect"];
aQuotes[11] = ["A chair is a very difficult object. A skyscraper is almost easier. That is why Chippendale is famous.", "_____Ludwig Mies van der Rohe"];
aQuotes[12] = ["Recognizing the need is the primary condition for design.", "____Charles Eames, Architect & Designer"];
aQuotes[13] = ["You know what looks good can change, but what works works.", "____Ray Eames, Designer"];
aQuotes[14] = ["However beautiful the strategy, you should occasionally look at the results.", "____Winston Churchill"];
aQuotes[15] = ["You need to listen deeply, listen past what people say they want,  to hear what they need.", "___Jon Meads, Designer"];
aQuotes[16] = ["If you think it's expensive to hire a professional to do the job, wait until you hire an amateur.", "____Red Adair"];
aQuotes[17] = ["You can observe a lot by watching.", "____Yogi Berra"];
aQuotes[18] = ["The products we design are going to be ridden in, sat upon, looked at, talked into, activated, operated, or in some way used by people individually or en masse. If the point of contact between the product and the people becomes a point of friction, then the industrial designer has failed. If, on the other hand, people are made safer, more comfortable, more eager to purchase, more efficient - or just plain happier - the industrial designer has succeeded.", "____Henry Dreyfuss"];
aQuotes[19] = ["Client wants: 1) Good  2) Fast  3) Cheap.   Designer replies: Pick two.", "____Hugh Dubberly"];
aQuotes[20] = ["Everything that can be invented has been invented.", "____CHARLES DUELL, Commissioner, U.S. Patent Office, 1899"];
aQuotes[21] = ["No design works unless it embodies ideas that are held common by the people for whom the object is intended.", "____Adrian Forty"];
aQuotes[22] = ["Design is the fundamental soul of a man-made creation that ends up expressing itself in successive outer layers of the product or service.", "____Steve Jobs"];
aQuotes[23] = ["You don't have to please everyone - you have to please the user.", "____Brenda Laurel"];
aQuotes[24] = ["A man who works with his hands is a laborer; a man who works with his hands and his brain is a craftsman; but a man who works with his hands and his brain and his heart is an artist.", "___Louis Nizer"];
aQuotes[25] = ["The only important thing about design is how it relates to people.", "___Victor Papenek"];
aQuotes[26] = ["Our opportunity, as designers, is to learn how to handle the complexity, rather than shy away from it, and to realize that the big art of design is to make complicated things simple.", "___Tim Parsey"];
aQuotes[27] = ["Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and weighs 30 tons, computers of the future may have only 1,000 vacuum tubes and perhaps weigh 1 1/2 tons.", "Popular Science Magazine, March 1949"];
aQuotes[28] = ["The public is more familiar with bad design than good design. It is, in effect, conditioned to prefer bad design, because that is what it lives with. The new becomes threatening, the old reassuring.", "___Paul Rand"];
aQuotes[29] = ["Creativity...involves the power to originate, to break away from the existing ways of looking at things, to move freely in the realm of the imagination, to create and recreate worlds fully in one's mind ? while supervising all this with a critical inner eye.", "___Oliver Sacks"];
aQuotes[30] = ["Some men see things as they are, and say why? I dream of things that never were, and ask why not?", "___George Bernard Shaw"];
aQuotes[31] = ["The design process, at its best, integrates the aspirations of art, science, and culture.", "___Jeff Smith"];
aQuotes[32] = ["We are prop managers and set builders in the wings of the cultural stage. No one knows who we are but they do feel the results of our work.", "____Bill Stumpf, Designer (Aeron Chair, Ethospace System, Ergon Chair)"];
aQuotes[33] = ["Vision is the art of seeing things invisible.", "___Jonathan Swift"];
aQuotes[34] = ["Common sense is not so common.", "___Voltaire"];
aQuotes[35] = ["Genius? Nothing! Sticking to it is the genius! Any other bright-minded fellow can accomplish just as much if he will stick like hell and remember nothing that's any good works by itself. You've got to make the damn thing work!...I failed my way to success.", "____Thomas Edison"];
aQuotes[36] = ["Invention is 10% inspiration and 90% perspiration.", "____Thomas Edison"];
aQuotes[37] = ["Form ever follows function", "____Louis Sullivan, Architect"];
aQuotes[38] = ["We can't solve problems by using the same kind of thinking we used when we created them.", "___Albert Einstein"];
aQuotes[39] = ["Technology's life saving and life changing gifts only make sense when cradled by a network of human conversation, a robust conversation that forms a parallel human network just as powerful as our computer networks, holding any technology to standards of sense and meaning, ethics and personal freedom", "___David Whyte"];
//returns a random integer between 0 and max
function getRandomVal( max ){
  var i = Math.round( Math.random() * max );
  return i;
}

function getQuote(){
  var i = getRandomVal(aQuotes.length-1);
  return "&quot;" + aQuotes[i][QuoteIdx] + "&quot;<br>" + aQuotes[i][AuthorIdx];
}

function getShortDate(date){
  var d;

  switch (date.getMonth()){
    case  0: d = "Jan.";
			 break;				
	case  1: d = "Feb.";
			 break;
	case  2: d = "March";
			 break;
	case  3: d = "April";
			 break;
	case  4: d = "May";
			 break;
	case  5: d = "June";
			 break;
	case  6: d = "July";
			 break;
	case  7: d = "Aug.";
			 break;
	case  8: d = "Sept.";
			 break;
	case  9: d = "Oct.";
			 break;
	case 10: d = "Nov.";
			 break;
	case 11: d = "Dec.";
			 break;
	default: d = "Undefined?" ;
  }
  
 d = d + " " + date.getDate() + ", " + date.getFullYear() + " " + date.toLocaleTimeString();
 return d;
}

function greeting()
{
   var result;
   var today = new Date();
   var hrs = today.getHours();

   result = "<Right>";
   if (today.getMonth() == 11)
     result += "Happy Holidays<br>";
   result += "<None>Good ";

   if ((hrs >= 5) && (hrs <= 11))
     result += "Morning";
   else if ((hrs >= 12) && (hrs <= 16))
     result += "Afternoon";
   else if ((hrs >= 17) && (hrs <= 20))
     result += "Evening";
   else
     result += "Night";

   result += "!<br>";
   result += getShortDate(today); 
   result += "</None></right>";

   return result;
}
