// ************************************************************************************
// ** This file has been created with the Rotating Content Tool by Amesbury Web.     **
// ** For more information, visit us on the web:                                     **
// **                                                                                **
// **     Rotating Content Tool   -- http://rotatecontent.com/                       **
// **     Company: Amesbury Web   -- http://amesburyweb.com/                         **
// **     Author:  Randy Hoyt     -- http://randyhoyt.com/                           **
// **                                                                                **
// ************************************************************************************

today = new Date()
month = today.getMonth() + 1
year = today.getFullYear()

selectedDate = new Date("01/01/1900")
selectedContent = ""

varLength = 52
var entryDate = new Array(varLength)
var entryContent = new Array(varLength)

entryDate[0] = "01/04/" + year
entryContent[0] = ""

entryDate[1] = "  01/11/" + year
entryContent[1] = ""

entryDate[2] = "  01/18/" + year
entryContent[2] = ""

entryDate[3] = "  01/25/" + year
entryContent[3] = ""

entryDate[4] = "  02/01/" + year
entryContent[4] = ""

entryDate[5] = "  02/08/" + year
entryContent[5] = ""

entryDate[6] = "  02/15/" + year
entryContent[6] = ""

entryDate[7] = "  02/22/" + year
entryContent[7] = ""

entryDate[8] = "  03/01/" + year
entryContent[8] = ""

entryDate[9] = "  03/08/" + year
entryContent[9] = ""

entryDate[10] = "  03/15/" + year
entryContent[10] = ""

entryDate[11] = "  03/22/" + year
entryContent[11] = ""

entryDate[12] = "  03/29/" + year
entryContent[12] = ""

entryDate[13] = "  04/05/" + year
entryContent[13] = ""

entryDate[14] = "  04/12/" + year
entryContent[14] = ""

entryDate[15] = "  04/19/" + year
entryContent[15] = ""

entryDate[16] = "  04/26/" + year
entryContent[16] = ""

entryDate[17] = "  05/03/" + year
entryContent[17] = ""

entryDate[18] = "  05/10/" + year
entryContent[18] = "In 1949 the 'hot' varietal was Muscatel and promoted strongly by the California wine industry."

entryDate[19] = "  05/17/" + year
entryContent[19] = "The seeds and skin of the grape contain tannins.  Tannin is a bitter tasting substance that cause the “dry mouth” feeling associated with some red wines."

entryDate[20] = "  05/24/" + year
entryContent[20] = "There are more than 60,000 registered California wine labels."

entryDate[21] = "  05/31/" + year
entryContent[21] = "It is theorized there are approximately 44 million bubbles in a bottle of sparkling wine/champagne."

entryDate[22] = "  06/07/" + year
entryContent[22] = "The highest vineyard in California is the Shadow Mountain Cabernet Sauvignon Vineyard, located at an elevation of 4,400 feet above sea level in the mountains of San Diego."

entryDate[23] = "  06/14/" + year
entryContent[23] = "The Pinot Noir grape has more clones (over 100 registered) than any other wine grape variety."

entryDate[24] = "  06/21/" + year
entryContent[24] = "15.5% of the world's vineyards are in Spain, making Spain the number one ranked country in the world in terms of area covered by vineyards."

entryDate[25] = "  06/28/" + year
entryContent[25] = "Thomas Jefferson’s salary was $25,000 per year - a princely sum, but the expenses were also great. In 1801 Jefferson spent $6,500 for provisions and groceries, $2,700 for servants (some of whom were liveried), $500 for Lewis’s salary, and $3,000 for wine.  That's about 12% of his annual salary!"

entryDate[26] = "  07/05/" + year
entryContent[26] = "Grapes are the third largest crop in Spain, after cereal and olives."

entryDate[27] = "  07/12/" + year
entryContent[27] = "California wine country hosted 14.8 billion visitors in 2002, making it second only to Disneyland as California's top tourist attraction."

entryDate[28] = "  07/19/" + year
entryContent[28] = "There are vineyards in all of Spain's 17 autonomous regions."

entryDate[29] = "  07/26/" + year
entryContent[29] = "Approximately 1/3 of the entire crop of the Beaujolais region is sold as Beaujolais Nouveau."

entryDate[30] = "  08/02/" + year
entryContent[30] = "There are 96 American Viticulture Areas (AVAs) in California"

entryDate[31] = "  08/09/" + year
entryContent[31] = "The first corkscrew was invented in the mid 1800s."

entryDate[32] = "  08/16/" + year
entryContent[32] = "It takes about 600 grapes to produce a bottle of wine."

entryDate[33] = "  08/23/" + year
entryContent[33] = "Despite most of Spain's wine being red, 61.5% of Spain's vineyards are white.  This is because Spain also makes a lot of brandy and sherry."

entryDate[34] = "  08/30/" + year
entryContent[34] = "Fermenting grape juice has approximately 6,000 yeast cells per ounce."

entryDate[35] = "  09/06/" + year
entryContent[35] = "Spain is the third leading country in the world for wine production, behind France and Italy."

entryDate[36] = "  09/13/" + year
entryContent[36] = "The Mesopotamians were credited with making the first wine in 6000 B.C."

entryDate[37] = "  09/20/" + year
entryContent[37] = "The longest recorded champagne cork flight was 177 feet and 9 inches, four feet from level ground at Woodbury Vineyards in New York State."

entryDate[38] = "  09/27/" + year
entryContent[38] = "California accounts for over 90% of total U.S. wine production and approximately two out of every three bottles of wine sold in the United States was produced in California."

entryDate[39] = "  10/04/" + year
entryContent[39] = "Cork was developed as a bottle closure in the late 17th century. It was only after this that bottles were lain down for aging, and the bottle shapes slowly changed from short and bulbous to tall and slender."

entryDate[40] = "  10/11/" + year
entryContent[40] = "The most expensive bottle of wine was sold at an auction at Christies, London, in December 1985. The buyer paid £105 000 for a bottle of 1787 Chateau Lafitte claret that was engraved with the initials of Thomas Jefferson. Eleven months after the sale, the cork dried out, slipped into the bottle and spoiled the wine, making it the most expensive bottle of vinegar!"

entryDate[41] = "  10/18/" + year
entryContent[41] = "The word 'ton' (metric tonne) is derived from a tun, a wine barrel. It gets its name from the French 'tonnerre', or 'thunder', from the sound the barrels made when rolled."

entryDate[42] = "  10/25/" + year
entryContent[42] = "During prohibition, an interesting product called the 'Grape Brick' was sold to thousands of wine-parched households across America. Attached to the 'brick' of dried and pressed winegrape concentrate was a packet of yeast, and the stern warning, 'Do not add yeast or fermentation will result.'"

entryDate[43] = "  11/01/" + year
entryContent[43] = "The wreck of the Titanic, holds the oldest wine cellar in the world and despite the depth and wreckage, the bottles are still intact."

entryDate[44] = "  11/08/" + year
entryContent[44] = "30 million gallons of wine were lost in the 1906 San Francisco earthquake."

entryDate[45] = "  11/15/" + year
entryContent[45] = "Wine has so many organic chemical compounds it is considered more complex than blood serum."

entryDate[46] = "  11/22/" + year
entryContent[46] = "Asked when she drinks champagne, Madam Lilly Bollinger replied, 'I drink it when I'm happy and when I'm sad. Sometimes I drink it when I'm alone. When I have company, I consider it obligatory. I trifle with it if I'm not hungry and drink it when I am. Otherwise, I never touch it----unless I'm thirsty.'"

entryDate[47] = "  11/29/" + year
entryContent[47] = "The soil of the famed Clos de Vougeot (A vineyard in the Burgundy district of France) is considered so precious that vineyard workers are required to scrape it from their shoes before they leave for home each night."

entryDate[48] = "  12/06/" + year
entryContent[48] = "The 19th century American poet, Henry Wadsworth Longfellow, mentions wine more than 300 times in his works."

entryDate[49] = "  12/13/" + year
entryContent[49] = "Robert Louis Stevenson referred to wine as 'bottled poetry'."

entryDate[50] = "  12/20/" + year
entryContent[50] = "Thomas Jefferson helped stock the wine cellars of the first five U.S. presidents and was very partial to fine Bordaux and Madeira."

entryDate[51] = "  12/27/" + year
entryContent[51] = "'Magnum' is the nickname given to a 1.5 liter bottle of wine.  However, a Nebuchadnezzar is the largest wine bottle and holds 15 litres or 120 glasses of wine."

if (typeof display == "undefined") { var display = "date" }

if (display == "random")
{
  var randomNumber = Math.random()
  randomNumber *= varLength
  randomNumber = parseInt(randomNumber)
  if(isNaN(randomNumber)) randomNumber = 0
  else randomNumber %= varLength
  selectedContent = entryContent[randomNumber]
}
else
{
  for (x=0; x<(entryContent.length); x++)
  {
    tempDate = new Date(entryDate[x])
    tempContent = entryContent[x]
    if ((tempDate <= today) && (tempDate > selectedDate))
    {
      selectedContent = tempContent
      selectDate = tempDate
    }
  }
}

document.write (selectedContent)
