var calendar = new Date();
var day = calendar.getDay();
var month = calendar.getMonth();
var date = calendar.getDate();
var year = calendar.getYear();
var monthText = "";
var dayText = "";
var specialText = "";
var redDay = 0;

if (month == 0) 
	monthText = "January"
if (month == 1) 
	monthText = "February"
if (month == 2) 
	monthText = "March"
if (month == 3) 
	monthText = "April"
if (month == 4) 	
	monthText = "May"
if (month == 5) 
	monthText = "June"
if (month == 6) 
	monthText = "July"
if (month == 7) 
	monthText = "August"
if (month == 8) 
	monthText = "September"
if (month == 9) 
	monthText = "October"
if (month == 10) 
	monthText = "November"
if (month == 11) 
	monthText = "December"

if (day == 0) 
	dayText = "Sunday"
if (day == 1) 
	dayText = "Monday"
if (day == 2) 
	dayText = "Tuesday"
if (day == 3) 
	dayText = "Wednesday"
if (day == 4) 
	dayText = "Thursday"
if (day == 5) 	
	dayText = "Friday"
if (day == 6) 
	dayText = "Saturday"
if (day == 7) 
	dayText = "Sunday"

// Example HTML output:
// <b><font color=#808080>18 July 2002</font></b><br>
// <small><font color=#808080>Thursday<br></font></small>
// <font color=#808080 size=1>1942: Messerschmitt Me 262 flies on jet power<br></font>


document.write("<font color = #808080>")	

if(day == 0 || day == 7 || (month == 0 && date == 1) || (month == 11 && date == 25) || (month == 11 && date == 31))
	redDay = 1
else
	redDay = 0
	
	document.write("<b>")
	
if (redDay) 	
	document.write("<font color = #cc6600>")
else 
	document.write("<font color = #808080>")	

	document.write( date )
	document.write( " " )
	document.write( monthText )
	document.write( " " )
	document.write( year )
	document.write( "</font></b>" )

	document.write( "<br><small>" )
if (redDay) 	
	document.write("<font color = #cc6600>")
else 
	document.write("<font color = #808080>")	
	document.write( dayText )
	document.write( "<br></font></small>" )
		
if (month == 0) // Jan
{
	if (date == 1) 
		specialText = "New Year's Day"
	if (date == 2) 
		specialText = "1930: Grumman Corporation is established"
//	if (date == 14) 
//		specialText = "1945: Dresden destroyed in a bombing raid"		
//	if (date == 16) 
//		specialText = "1943: First masive Bomber Command attack on Berlin"
	if (date == 19) 
		specialText = "1915: First German Zeppelin air raid on Britain"
	if (date == 21) 
		specialText = "1976: Concorde inaugurates its regular service"
	if (date == 22) 
		specialText = "1944: Allies land at Anzio"
	if (date == 23) 
		specialText = "1909: First flight of Bleriot XI"
	if (date == 28) 
		specialText = "1986: Challenger space shuttle disaster"
}

if (month == 1) // Feb
{ 
	if (date == 4) 
		specialText = "1915: German U-boat blockade of Britain begins"
	if (date == 7) 
		specialText = "1945: Allies capture a Rhine bridge at Remagen"
	if (date == 8) 
		specialText = "1933: The first modern airliner Boeing 247 flies"
	if (date == 12) 
		specialText = "1942: German warships escape through English Channel"
	if (date == 14) 
		specialText = "Valentine's Day"
	if (date == 18) 
		specialText = "1944: RAF Mosquitoes attack Amiens prison"		
	if (date == 20) 
		specialText = "1962: John Glenn orbits the Earth"
	if (date == 21) 
		specialText = "1916: Battle of Verdun begins" 		
	if (date == 23)
		specialText = "1934: First flight of Lockheed Electra"
	if (date == 24) 
		specialText = "1921: Douglas test-flies its first aircraft"
//	if (date == 25) 
//		specialText = "1943: Allied round-the-clock strategic bombing campaign in Europe begins"
}

if (month == 2) // Mar
{ 
	if(date == 2)
		specialText = "1949: B-50 makes a nonstop flight around the world"		
	if(date == 5)
		specialText = "1943: Aerial battle of the Ruhr begins"
	if(date == 6)
		specialText = "1936: First flight of Supermarine Spitfire"
	if(date == 9)
		specialText = "1862: First ironclad battle Monitor vs. Merrimac"
	if(date == 10)
		specialText = "1956: Fairey Delta 2 breaks absolute speed record"
	if(date == 13)
		specialText = "1961: First flight of Hawker VTOL fighter"
	if(date == 16)
		specialText = "1944: British garrison at Imphal sieged"		
	if (date == 17) 
		specialText = "St. Patrick's Day"
	if (date == 24) 
		specialText = "1945: Crossing of the Rhine"
	if (date == 31) 
		specialText = "1941: Rommel starts an offensive to recapture Tobruk"
}

if (month == 3) // Apr 
{
	if(date == 1)
		specialText = "1918: Royal Air Force is formed"
	if(date == 4)
		specialText = "1924: Douglas World Cruisers start the round-the-World flight"
	if(date == 6)
		specialText = "1909: First succesful use of ailerons in Farman III"
	if(date == 9)
		specialText = "1940: Germany invades Denmark and Norway"
	if(date == 12)
		specialText = "1961: Gagarin becomes the first man in space"
	if(date == 18)
		specialText = "1942: Jimmy Doolittle raid over Tokyo"
	if(date == 22)
		specialText = "1915: Second Battle of Ypres begins"
	if(date == 25)
		specialText = "Festa della Liberazione (Italy)"
}

if (month == 4) // May
{ 

	if(date == 2)
		specialText = "1952: BOAC Comets inaugurate jet airliner service" 
	if(date == 4)
		specialText = "1942: Battle of the Coral Sea"
	if(date == 5)
		specialText = "1961: Alan Shepard is the first American to fly in space"
	if(date == 6)
		specialText = "1937: Hindenburg airship disaster"		
	if(date == 7)
		specialText = "1915: German U-boat sinks Lusitania"
	if(date == 8)
		specialText = "1945: VE Day"
	if(date == 9)
		specialText = "1926: Byrd and Bennett fly over North Pole"
	if(date == 10)
		specialText = "1940: Airborne assault on Eben Emael"
	if(date == 11)
		specialText = "1934: DC-2 first flies"
	if(date == 14)
		specialText = "1940: German breakthrough at Sedan"
	if(date == 15)
		specialText = "1941: The first British jet Gloster E.28/39 flies"
	if(date == 16)
		specialText = "1943: Dambusters Raid"
	if(date == 17)
		specialText = "Syttende Maj (Norway)"
	if(date == 21)
		specialText = "1927: Charles Lindbergh flies from NY to Paris"
	if(date == 24)
		specialText = "1941: HMS Hood sunk by the Bismarck"
	if(date == 25)
		specialText = "1961: President Kennedy announces plans for moon landing"
	if(date == 26)
		specialText = "1941: Bismarck sunk by Royal Navy"
	if(date == 29)
		specialText = "1453: Fall of Constantinople"
//	if(date == 30)
//		specialText = "1942: First 1000-bomber raid over Cologne"
	if(date == 31)
		specialText = "1916: Battle of Jutland, the biggest naval battle in history"		
}

if(month == 5) // Jun
{
	if(date == 1)
		specialText = "1939: Kurt Tank's Fw 190 first flight"
	if(date == 2)
		specialText = "Festa della Republica (Italy)"
	if(date == 3)
		specialText = "1940: BEF evacuation from Dunkirk ends succesfully"
	if(date == 4)
		specialText = "1942: Battle of Midway begins"
	if(date == 5)
		specialText = "Grundlovsdagen (Denmark)"
	if(date == 6)
		specialText = "1944: D-Day"
	if(date == 9)
		specialText = "1099: 1st Crusade fights the Battle of Jerusalem"
	if(date == 12)
		specialText = "1980: Gossamer Condor flies across the English Channel"
	if(date == 13)
		specialText = "1944: V-1 Flying Bombs arrive over Britain"
	if(date == 14)
		specialText = "1941: British in Africa launch Operation Battleaxe"
	if(date == 15)
		specialText = "1919: Alcock and Brown cross the Atlantic"
	if(date == 18)
		specialText = "1815: Battle of Waterloo"
	if(date == 19)
		specialText = "1944: Battle of the Philippine Sea begins"
	if(date == 20)
		specialText = "1942: Rommel forces recapture Tobruk"
	if(date == 22)
		specialText = "1941: Germany invades Russia"
	if(date == 24)
		specialText = "1812: Napoleon begins the invasion of Russia"  
	if( date > 18 && date < 25 && day == 5)
		specialText = "Midsommarafton"
	if(date == 26)
		specialText = "1936: The first Fa-61 helicopter flies in Germany"
	if(date == 27)
		specialText = "1948: Berlin Airlift begins"
//	if(date == 28)
//		specialText = "1914: Archduke Franz Ferdinand killed in Sarajevo"
		
}

if (month == 6) // Jul
{ 
	if (date == 1) 
		specialText = "1931: Wiley Post and Harold Gatty fly around the World"
	if (date == 2) 
		specialText = "1937: Amelia Earhart disappears in the Pacific"
	if (date == 3) 
		specialText = "1944: Battle of the Hedgerows in Normandy"
	if (date == 4) 
		specialText = "Independence Day (US)"
	if (date == 5) 
		specialText = "1943: Germans begin the Kursk offensive"
	if (date == 9) 
		specialText = "1943: Invasion of Sicily begins"
	if(date == 10)
		specialText = "1940: Battle of Britain begins"
	if(date == 14)
		specialText = "Jour de la Bastille (France)"
	if(date == 15)
		specialText = "1918: Second Battle of Marne begins"
	if(date == 18)
		specialText = "1942: Messerschmitt Me 262 flies on jet power"
	if(date == 20)
		specialText = "1969: Neil Armstrong sets foot on the Moon"
	if(date == 22)
		specialText = "1933: Wiley Post completes the first global solo flight"
	if(date == 22)
		specialText = "1909: Bleriot flies over the English Channel"
	if(date == 25)
		specialText = "1944: First ever jet fighter engagement Me 262 vs. Mosquito"		
 	if(date == 27)
		specialText = "1928: Boeing Model 80 first flies"
	if(date == 28)
		specialText = "1709: Battle of Poltava"		
 
}

if (month == 7) // Aug
{ 

	if(date == 1)
		specialText = "1914: Germany declares war on Russia - WW I begins" 
//	if(date == 6)
//		specialText = "1945: Hiroshima destroyed in the first atomic attack"
//	if(date == 9)
//		specialText = "1945: Nagasaki destroyed by atomic bomb"
	if(date == 15)
		specialText = "1945: VJ Day"
	if(date == 17)
		specialText = "1943: USAAF first raid on Schweinfurt"
	if(date == 17)
		specialText = "1943: RAF Bomber Command attacks Peenemunde"
	if(date == 19)
		specialText = "1942: Operation Jubilee, the landing in Dieppe"
	if(date == 20)
		specialText = "1944: Germans encircled in the Falaise Pocket"
	if(date == 26)
		specialText = "1914: German-Russian battle of Tannenberg begins"		
	if(date == 27)
		specialText = "1939: The first jet ever Heinkel He-178 flies"
	if(date == 29)
		specialText = "1917: Liberty engine debuts"
	if(date == 31)
		specialText = "1941: First Lend-Lease convoy arrives in Murmansk" 
}

if (month == 8) // Sep
{ 
 	if(date == 1)
		specialText = "1939: Germany invades Poland"
 	if(date == 3)
		specialText = "1930: Costes and Bellonte fly from Paris to NY"		
 	if(date == 4)
		specialText = "1931: James Doolittle wins the first Bendix Trophy"
 	if(date == 5)
		specialText = "1935: First flight of Messerschmitt Bf 109"
 	if(date == 9)
		specialText = "1943: Anglo-American forces land in Italy"
 	if(date == 10)
		specialText = "1914: Battle of Marne starts trench warfare"
 	if(date == 13)
		specialText = "1931: Supermarine S.6B wins Schneider trophy"
	if(date == 14)
		specialText = "1938: Igor Sikorsky makes a tethered helicopter flight"
	if(date == 15)
		specialText = "1940: Battle of Britain Day"
	if(date == 17)
		specialText = "1944: Operation Market Garden begins"
	if(date == 18)
		specialText = "1959: First powered flight of North American X-15"
	if(date == 19)
		specialText = "1356: Battle of Poitiers"
	if(date == 20)
		specialText = "1904: Wilbur Wright makes a first complete circle in the air"
	if(date == 23)
		specialText = "1913: Roland Garros flies from France to Tunisia"
	if(date == 24)
		specialText = "1929: Jimmy Doolittle makes the first blind flight" 
	if(date == 28)
		specialText = "1924: Douglas World Cruisers complete the round-the-World flight"

}
		
if (month == 9) // Oct 
{
	if(date == 3)
		specialText = "1942: First successful flight of V-2 ballistic missile"
	if(date == 4)
		specialText = "1957: Sputnik orbits the Earth"
	if(date == 7)
		specialText = "1571: Battle of Lepanto"
	if(date == 14)
		specialText = "1947: Chuck Yeager breaks the sound barrier"
	if(date == 19)
		specialText = "1813: Battle of Nations at Leipzig"
	if(date == 22)
		specialText = "1922: Andrey Tupolev founds his design bureau"
	if(date == 23)
		specialText = "1942: Second Battle of El Alamein begins"
	if(date == 24)
		specialText = "1968: Last flight of the North American X-15"
	if(date == 25)
		specialText = "1415: Battle of Agincourt"		
	if(date == 26)
		specialText = "1940: First flight of P-51 Mustang"
	if (date == 31) 
		specialText = "Halloween"
}

if(month == 10) // Nov
{
	if(date == 5)
		specialText = "Guy Fawkes' Day (UK)"
	if(date == 6)
		specialText = "1935: First flight of Hawker Hurricane"
	if(date == 7)
		specialText = "1996: Mars Global Surveyor launches" 
	if(date == 8)
		specialText = "1942: Operation Torch begins"
	if(date == 11)
		specialText = "1918: Armistice with Germany brings WWI to an end"
	if(date == 12)
		specialText = "1944: Tirpitz sunk in Tromso fjord"		
	if(date == 14)
		specialText = "1910: Eugene Ely makes the first takeoff from ship deck"
	if(date == 15)
		specialText = "1940: de Havilland Mosquito first flight"
	if(date == 19)
		specialText = "1942: Soviet counter-offensive at Stalingrad"
	if(date == 20)
		specialText = "1953: U.S.Navy D-558-II reaches Mach 2"
	if(date == 29)
		specialText = "1913: First air-to-air combat recorded over Naco, Mexico"
	if(date == 30)
		specialText = "1939: Soviet Union attacks Finland"
}

if (month == 11) // Dec
{

	if (date == 2) 
		specialText = "1805: Battle of Austerlitz"
	if (date == 6) 
		specialText = "1941: Soviet counter-offensive at Moscow"
	if (date == 7) 
		specialText = "1941: Japanese attack on Pearl Harbour"
	if (date == 10) 
		specialText = "Nobeldagen (Sweden)"
	if (date == 13) 
		specialText = "St. Lucia (Sweden)"
	if (date == 14) 
		specialText = "1812: Napoleon starts retreat from Russia"
	if (date == 16) 
		specialText = "1944: Germans launch the Ardennes offensive"		
	if (date == 17) 
		specialText = "1903: Wright brothers make the first powered flight" 
	if (date == 20) 
		specialText = "1941: Flying Tigers enter action over China"
	if (date == 23) 
		specialText = "1986: Rutan and Yeager complete the non-stop global flight"
	if (date == 24) 
		specialText = "Christmas Eve"
	if (date == 25) 
		specialText = "Christmas Day"
	if (date == 31) 
		specialText = "New Year's Eve"
}


if (specialText != "") 
{
	document.write("<font color=#808080 size=1>")
	document.write( specialText )
	document.write("<br></font>")
}	

document.write("</font>")

			


