var k;
if(screen.width<=640) self.document.getElementById("ss0").href="../../latin_main640.css";
else if(screen.width>=800&&screen.width<1024) self.document.getElementById("ss0").href="../../latin_main800.css";
else if(screen.width>=1024&&screen.width<1280) self.document.getElementById("ss0").href="../../latin_main1024.css";
else if(screen.width>=1280) self.document.getElementById("ss0").href="../../latin_main1280.css";
if(top==self)
{
	window.resizeTo(screen.availWidth-60,screen.availHeight-60);
	window.moveTo(30,30);
}
if(window.opener==null)
{
	window.open("../../index.htm");
	self.focus();
}
function getParams()
{
	idx=self.document.URL.indexOf('?');
	params=new Array();
	if(idx!=-1)
	{
		pairs=self.document.URL.substring(idx+1,self.document.URL.length).split('&');
		for(i=0;i<pairs.length;i++)
		{
			nameVal=pairs[i].split('=');
			params[nameVal[0]]=nameVal[1];
		}
	}
	return params;
}
var message="Copyright 2001-2006 by OnLine Computers & Games Co., Ltd.";
function clickIE4()
{
	if(event.button==2||event.button==3)
	{
		alert(message);
		return false;
	}
}
function clickNS4(e)
{
	if(document.layers||document.getElementById&&!document.all)
	{
		if(e.which==2||e.which==3)
		{
			alert(message);
			return false;
		}
	}
}
function keypressed(e)
{
	if((event.altKey)&&(event.keyCode==36||event.keyCode==37||event.keyCode==39)) event.keyCode=false;
	else if((event.ctrlKey)&&(event.keyCode==66||event.keyCode==69||event.keyCode==72||event.keyCode==73||event.keyCode==76||event.keyCode==79||event.keyCode==80)) event.keyCode=false;
	else if((event.shiftKey)&&(event.keyCode==121)) event.keyCode=false;
	else if(event.keyCode==115||event.keyCode==122) event.keyCode=false;
	event.returnValue=event.keyCode;
}
function disableselect(e)
{
	if(window.sidebar)
	{
		qx=e.target.name;
		if(qx=="q"||qx=="btnG"||qx=="p"||qx=="name"||qx=="e.searchQuery"||qx=="e.newSearch"||qx=="qu"||qx=="Search"||qx=="loginName"||qx=="user_pwd"||qx=="emaillogin"||qx=="newuser"||qx=="advertiser"||qx=="password"||qx=="adlogin"||qx=="adinterested"||qx=="terms"||qx=="submit1"||qx=="submit2"||qx=="userid"||qx=="loginNow"||qx=="forward_button"||qx=="pwd") return true;
		else return false;
	}
	else return false;
}
function reEnable()
{
	return true;
}
params=getParams();
if(document.layers)
{
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS4;
}
else if(document.all&&!document.getElementById)
{
	document.onmousedown=clickIE4;
	document.onkeydown=keypressed;
}
document.oncontextmenu=new Function("alert(message);return false")
document.onselectstart=disableselect; //IE
if(window.sidebar)
{
	document.onmousedown=disableselect; //NS
	document.onclick=reEnable;
}
function linker(obj)
{
	if(obj.readyState=="complete")
	{
		for(i=0;i<document.links.length;i++)
		{
			with(document.links(i))
			{
				if(className!="design")
				{
					style.color="red";
					style.cursor="hand";
					style.textDecoration="underline";
					title="Click to visit my profile";
				}
			}
		}
	}
}
function begin(dob)
{
	today=new Date();
	thisYear=y2k(today.getYear());
	thisMonth=today.getMonth()+1;
	thisDay=today.getDate();
	if((dob.charAt(1)=="/")&&(dob.charAt(3)=="/"))
	{
		day=parseInt(dob.charAt(0));
		month=parseInt(dob.charAt(2));
		year=y2k(parseInt(dob.charAt(4)+dob.charAt(5)+dob.charAt(6)+dob.charAt(7)));
	}
	else if((dob.charAt(2)=="/")&&(dob.charAt(4)=="/"))
	{
		day=parseInt(dob.charAt(0)+dob.charAt(1));
		month=parseInt(dob.charAt(3));
		year=y2k(parseInt(dob.charAt(5)+dob.charAt(6)+dob.charAt(7)+dob.charAt(8)));
	}
	else if((dob.charAt(1)=="/")&&(dob.charAt(4)=="/"))
	{
		day=parseInt(dob.charAt(0));
		month=parseInt(dob.charAt(2)+dob.charAt(3));
		year=y2k(parseInt(dob.charAt(5)+dob.charAt(6)+dob.charAt(7)+dob.charAt(8)));
	}
	else if((dob.charAt(2)=="/")&&(dob.charAt(5)=="/"))
	{
		day=parseInt(dob.charAt(0)+dob.charAt(1));
		month=parseInt(dob.charAt(3)+dob.charAt(4));
		year=y2k(parseInt(dob.charAt(6)+dob.charAt(7)+dob.charAt(8)+dob.charAt(9)));
	}
	daysofweek=new makeArray('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
	child=new makeArray('is bonny and blithe and good and gay','is full of grace','is fair of face','is full of woe','has far to go','is loving and giving','works hard for a living');
	monthsofyear=new makeArray('January','February','March','April','May','June','July','August','September','October','November','December');
	daysofmonth=new makeArray(31,28,31,30,31,30,31,31,30,31,30,31);
	daysofmonthLY=new makeArray(31,29,31,30,31,30,31,31,30,31,30,31);
	months=new makeArray('jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec');
	horroscopes=new makeArray(20,19,21,20,21,22,23,23,23,23,22,22);
	starsigns=new makeArray('Capricorn','Aquarius','Pisces','Aries','Taurus','Gemini','Cancer','Leo','Virgo','Libra','Scorpio','Sagittarius');
	starsymbols=new makeArray('Goat','Water Bearer','Fishes','Ram','Bull','Twins','Crab','Lion','Virgin','Balance','Scorpion','Archer');
	birthstones=new makeArray('Garnet','Amethyst','Aquamarine, bloodstone','Diamond','Emerald','Pearl, alexandrite, moonstone','Ruby','Peridot, sardonyx','Sapphire','Opal, tourmaline','Topaz','Turquoise, zircon');
	qualities=new makeArray('Constancy','Sincerity','Courage','Innocence','Love, success','Health, longevity','Contentment','Married happiness','Clear thinking','Hope','Fidelity','Prosperity');
	chinesenewyear=new makeArray(1.31,2.19,2.08,1.29,2.16,2.04,1.25,2.13,2.02,1.22,2.10,1.30,2.18,2.06,1.26,2.14,2.03,1.23,2.11,2.01,2.20,2.08,1.28,2.16,2.05,1.25,2.13,2.02,1.23,2.10,1.30,2.17,2.06,1.26,2.14,2.04,1.24,2.11,1.31,2.19,2.08,1.27,2.15,2.05,1.25,2.13,2.02,1.22,2.10,1.29,2.17,2.06,1.27,2.14,2.03,1.24,2.12,1.31,2.18,2.08,1.28,2.15,2.05,1.25,2.13,2.02,1.21,2.09,1.30,2.17,2.06,1.27,2.15,2.03,1.23,2.11,1.31,2.18,2.07,1.28,2.16,2.05,1.25,2.13,2.02,2.20,2.09,1.29,2.17,2.06,1.27,2.15,2.04,1.23,2.10,1.31,2.19,2.07,1.28,2.16);
	chinese=new makeArray('Rat','Ox','Tiger','Hare','Dragon','Snake','Horse','Sheep','Monkey','Fowl','Dog','Pig');
	branches=new makeArray('Zi','Chou','Yin','Mao','Chen','Si','Wu','Wei','Shen','You','Xu','Hai');
	stems=new makeArray('Jia','Yi','bing','Ding','Wu','Ji','Geng','Xin','Ren','Gui');
	colors=new makeArray('aliceblue','antiquewhite','aqua','aquamarine','azure','beige','bisque','blanchedalmond','burlywood','chartreuse','chocolate','coral','cornflowerblue','cornsilk','crimson','cyan','darkgoldenrod','darkgray','darkkhaki','darkorange','darksalmon','darkseagreen','darkturquoise','deeppink','deepskyblue','dodgerblue','floralwhite','fuchsia','gainsboro','ghostwhite','gold','goldenrod','gray','greenyellow','honeydew','hotpink','indianred','ivory','khaki','lavender','lavenderblush','lawngreen','lemonchiffon','lightblue','lightcoral','lightcyan','lightgoldenrodyellow','lightgreen','lightgrey','lightpink','lightsalmon','lightseagreen','lightskyblue','lightslategray','lightsteelblue','lightyellow','lime','limegreen','linen','magenta','mediumaquamarine','mediumorchid','mediumpurple','mediumseagreen','mediumslateblue','mediumspringgreen','mediumturquoise','mintcream','mistyrose','moccasin','navajowhite','oldlace','orange','orangered','orchid','palegoldenrod','palegreen','paleturquoise','palevioletred','papayawhip','peachpuff','peru','pink','plum','powderblue','red','rosybrown','salmon','sandybrown','seashell','sienna','silver','skyblue','snow','springgreen','tan','thistle','tomato','turquoise','violet','wheat','whitesmoke','yellow','yellowgreen');
	accumulate=new makeArray(0,31,59,90,120,151,181,212,243,273,304,334);
	accumulateLY=new makeArray(0,31,60,91,121,152,182,213,244,274,305,335);
	sun=1,mon=2,tue=3,wed=4,thu=5,fri=6,sat=7;
	jan=1,feb=2,mar=3,apr=4,may=5,jun=6,jul=7,aug=8,sep=9,oct=10,nov=11,dec=12;
	first=1,second=2,third=3,fourth=4,fifth=5,last=-1;
	rnd.today=new Date();
	rnd.seed=rnd.today.getTime();
	age=HowOld(day,month,year,thisDay,thisMonth,thisYear);
	dob2=FullDate(day,month,year);
	bday=Child(DayOfWeek(day,month,year));
	starsign=StarSign(day,month);
	zodiac=starsigns[starsign];
	chineseyear=Chinese(day,month,year);
	lotteryballs=10;
	ballstoselect=1;
	lotterynumbers=new MakeEmptyArray(lotteryballs);
	color=colors[rand(colors[0])];
	document.getElementById("age1").innerHTML=age;
	document.getElementById("dob1").innerHTML=dob2;
	document.getElementById("bday1").innerHTML=bday;
	document.getElementById("zodiac1").innerHTML=zodiac+" ("+starsymbols[starsign]+")";
	document.getElementById("birthstone1").innerHTML=birthstones[month]+" (symbolizes "+qualities[month]+")";
	document.getElementById("chineseyear1").innerHTML=chineseyear+chineseyearname;
	ResetLotteryBalls();
	SelectLotteryBalls(ballstoselect);
	ShowLotteryBalls();
	ResetLotteryBalls();
	SelectLotteryBalls(ballstoselect);
	ShowLotteryBalls();
	ResetLotteryBalls();
	SelectLotteryBalls(ballstoselect);
	ShowLotteryBalls();
	ResetLotteryBalls();
	SelectLotteryBalls(ballstoselect);
	ShowLotteryBalls();
	ResetLotteryBalls();
	SelectLotteryBalls(ballstoselect);
	ShowLotteryBalls();
	ResetLotteryBalls();
	SelectLotteryBalls(ballstoselect);
	ShowLotteryBalls();
	document.getElementById("lottery").style.backgroundColor=color;
	document.getElementById("namecards").style.backgroundColor=color;
	document.getElementById("symbols").style.backgroundColor=color;
	document.getElementById("s1").src="http://pictures.a2zpattaya.com/epal/birthstones/"+months[month]+".gif";
	document.getElementById("s1").width=100;
	document.getElementById("s1").height=75;
	document.getElementById("s1").alt=birthstones[month];
	document.getElementById("s2").src="http://pictures.a2zpattaya.com/epal/starsign/"+months[month]+".gif";
	document.getElementById("s2").width=80;
	document.getElementById("s2").height=80;
	document.getElementById("s2").alt=zodiac;
	document.getElementById("s3").src="http://pictures.a2zpattaya.com/epal/zodiac/"+months[month]+".gif";
	document.getElementById("s3").width=91;
	document.getElementById("s3").height=61;
	document.getElementById("s3").alt=zodiac;
	document.getElementById("s4").src="http://pictures.a2zpattaya.com/epal/chinese/"+chineseyear.toLowerCase()+".gif";
	document.getElementById("s4").width=94;
	document.getElementById("s4").height=94;
	document.getElementById("s4").alt=chineseyear;
	eventIndex=0;
	myEvent=new Array();
	setEvent(1,1,"New Year's Day");
	setEvent(6,1,"Epiphany");
	setEvent(2,2,"Groundhog Day");
	setEvent(12,2,"Lincoln's Birthday");
	setEvent(14,2,"Valentine's Day");
	setEvent(22,2,"Washington's Birthday");
	setEvent(29,2,"Leap Year's Day");
	setEvent(17,3,"St. Patrick's Day");
	setEvent(19,3,"St. Joseph");
	setEvent(1,4,"April Fools's Day");
	setEvent(15,4,"Tax Day");
	setEvent(14,6,"Flag Day");
	setEvent(29,6,"St. Peter & St. Paul");
	setEvent(4,7,"Independence Day");
	setEvent(12,7,"Battle of the Boyne (N. Ireland)");
	setEvent(15,8,"Assumption");
	setEvent(12,10,"Columbus Day");
	setEvent(24,10,"United Nations Day");
	setEvent(31,10,"Halloween");
	setEvent(1,11,"All Saint's Day");
	setEvent(5,11,"Guy Fawkes Night");
	setEvent(11,11,"Veteran's Day");
	setEvent(8,12,"Immaculate Conception");
	setEvent(24,12,"Christmas Eve");
	setEvent(25,12,"Christmas Day");
	setEvent(26,12,"Boxing Day - St Stephen's Day");
	setEvent(31,12,"New Year's Eve");
	easter=Easter(year);
	easterDay=getDD(easter);
	easterMonth=getMM(easter);
	setEvent(easterDay,easterMonth,year,"Easter Sunday");
	when=addDays(easterDay,easterMonth,year,-63);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Septuagesima Sunday");
	when=addDays(easterDay,easterMonth,year,-56);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Sexagesima Sunday");
	when=addDays(easterDay,easterMonth,year,-49);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Shrove Sunday");
	when=addDays(easterDay,easterMonth,year,-47);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Shrove Tuesday");
	when=addDays(easterDay,easterMonth,year,-46);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Ash Wednesday");
	when=addDays(easterDay,easterMonth,year,-14);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Passion Sunday");
	when=addDays(easterDay,easterMonth,year,-7);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Palm Sunday");
	when=addDays(easterDay,easterMonth,year,-3);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Holy or Maundy Thursday");
	when=addDays(easterDay,easterMonth,year,-2);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Good Friday");
	when=addDays(easterDay,easterMonth,year,35);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Rogation Sunday");
	when=addDays(easterDay,easterMonth,year,39);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Ascension Day");
	when=addDays(easterDay,easterMonth,year,49);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Pentecost or Whitsunday");
	when=addDays(easterDay,easterMonth,year,50);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Whitmundy");
	when=addDays(easterDay,easterMonth,year,56);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Trinity Sunday");
	when=addDays(easterDay,easterMonth,year,60);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Corpus Christi");
	when=addDays(easterDay,easterMonth,year,63);
	setEvent(getDD(getMMDD(when)),getMM(getMMDD(when)),"Corpus Christi (Catholic Church in the United States)");
	setEvent(NthDay(third,mon,jan,year),jan,"Martin Luther King Day");
	setEvent(NthDay(third,mon,feb,year),feb,"President's Day");
	setEvent(NthDay(first,sun,apr,year),apr,"Daylight Savings time begins");
	setEvent(NthDay(first,mon,may,year),may,"May Day Bank Holiday (United Kingdom)");
	setEvent(NthDay(third,sat,may,year),may,"Armed Forces Day");
	setEvent(NthDay(second,sun,may,year),may,"Mother's Day");
	setEvent(NthDay(last,mon,may,year),may,"Spring Bank Holiday (United Kingdom)");
	setEvent(NthDay(last,mon,may,year),may,"Memorial Day");
	setEvent(NthDay(third,sun,jun,year),jun,"Father's Day");
	setEvent(NthDay(last,mon,aug,year),aug,"Late Summer Holiday (United Kingdom)");
	setEvent(NthDay(first,mon,sep,year),sep,"Labor Day");
	setEvent(NthDay(second,mon,oct,year),oct,"Columbus Day");
	setEvent(NthDay(last,sun,oct,year),oct,"Daylight Savings Time ends");
	setEvent(NthDay(fourth,thu,nov,year),nov,"Thanksgiving Day");
	myObjectBubbleSort(myEvent,eventIndex);
	myEvents=showEvent(day,month);
	if(myEvents=="") myEvents="No special day";
	document.getElementById("event1").innerHTML=myEvents;
	setBirthday(1,1,1895,"J. Edgar Hoover");
	setBirthday(2,1,1920,"Isaac Asimov");
	setBirthday(3,1,1892,"J.R.R. Tolkien");
	setBirthday(4,1,1809,"Louis Braille");
	setBirthday(5,1,1876,"Konrad Adenauer");
	setBirthday(7,1,1800,"Millard Fillmore");
	setBirthday(8,1,1942,"Stephen Hawking");
	setBirthday(9,1,1913,"Richard Nixon");
	setBirthday(11,1,1755,"Alexander Hamilton");
	setBirthday(12,1,1876,"Jack London");
	setBirthday(13,1,1832,"Horatio Alger");
	setBirthday(14,1,1741,"Benedict Arnold");
	setBirthday(15,1,1929,"Dr. Martin Luther King, Jr.");
	setBirthday(16,1,1853,"Andre Michelin");
	setBirthday(17,1,1706,"Ben Franklin");
	setBirthday(18,1,1882,"A.A. Milne");
	setBirthday(19,1,1809,"Edgar Allan Poe");
	setBirthday(20,1,1930,"Edwin Aldrin");
	setBirthday(21,1,1824,"Stonewall Jackson");
	setBirthday(22,1,1561,"Sir Francis Bacon");
	setBirthday(23,1,1832,"Edouard Manet");
	setBirthday(25,1,1759,"Robert Burns");
	setBirthday(26,1,1880,"Douglas MacArthur");
	setBirthday(27,1,1756,"Wolfgang Amadeus Mozart");
	setBirthday(28,1,1912,"Jackson Pollock");
	setBirthday(29,1,1880,"W.C. Fields");
	setBirthday(30,1,1882,"Franklin D. Roosevelt");
	setBirthday(1,2,1895,"John Ford");
	setBirthday(2,2,1882,"James Joyce");
	setBirthday(3,2,1468,"Johannes Gutenberg");
	setBirthday(4,2,1902,"Charles Lindbergh");
	setBirthday(5,2,1914,"William Burroughs");
	setBirthday(6,2,1895,"Babe Ruth");
	setBirthday(7,2,1812,"Charles Dickens");
	setBirthday(8,2,1828,"Jules Verne");
	setBirthday(9,2,1914,"Gypsy Rose Lee");
	setBirthday(10,2,1955,"Greg Norman");
	setBirthday(11,2,1847,"Thomas Alva Edison");
	setBirthday(12,2,1809,"Abraham Lincoln");
	setBirthday(13,2,1919,"Tennessee Ernie Ford");
	setBirthday(14,2,1913,"Jimmy Hoffa");
	setBirthday(15,2,1564,"Galileo Galilei");
	setBirthday(16,2,1903,"Edgar Bergen");
	setBirthday(17,2,1934,"Alan Bates");
	setBirthday(18,2,1920,"Jack Palance");
	setBirthday(19,2,1473,"Nicolas Copernicus");
	setBirthday(20,2,1924,"Sidney Poitier");
	setBirthday(21,2,1925,"Sam Peckinpah");
	setBirthday(22,2,1732,"George Washington");
	setBirthday(23,2,1685,"George Frederic Handel");
	setBirthday(24,2,1955,"Steven Jobs");
	setBirthday(25,2,1841,"Pierre Auguste Renoir");
	setBirthday(26,2,1829,"Levi Strauss");
	setBirthday(27,2,1932,"Elizabeth Taylor");
	setBirthday(28,2,1907,"Earl Scheib");
	setBirthday(29,2,1860,"Herman Hollerith");
	setBirthday(1,3,1810,"Frederic Chopin");
	setBirthday(2,3,1931,"Mikhail Gorbachev");
	setBirthday(3,3,1847,"Alexander Graham Bell");
	setBirthday(4,3,1888,"Knute Rockne");
	setBirthday(5,3,1908,"Rex Harrison");
	setBirthday(6,3,1475,"Michelangelo Buonarroti");
	setBirthday(7,3,1849,"Luther Burbank");
	setBirthday(8,3,1943,"Lynn Redgrave");
	setBirthday(9,3,1918,"Mickey Spillane");
	setBirthday(10,3,1903,"Bix Beiderbecke");
	setBirthday(11,3,1931,"Rupert Murdoch");
	setBirthday(12,3,1922,"Jack Kerouac");
	setBirthday(13,3,1911,"L. Ron Hubbard");
	setBirthday(14,3,1879,"Albert Einstein");
	setBirthday(15,3,1767,"Andrew Jackson");
	setBirthday(16,3,1751,"James Madison");
	setBirthday(17,3,1938,"Rudolf Nureyev");
	setBirthday(18,3,1932,"John Updike");
	setBirthday(19,3,1848,"Wyatt Earp");
	setBirthday(20,3,1957,"Spike Lee");
	setBirthday(21,3,1685,"Johann Sebastian Bach");
	setBirthday(22,3,1923,"Marcel Marceau");
	setBirthday(23,3,1908,"Joan Crawford");
	setBirthday(24,3,1874,"Harry Houdini");
	setBirthday(25,3,1942,"Aretha Franklin");
	setBirthday(26,3,1911,"Tennessee Williams");
	setBirthday(27,3,1899,"Gloria Swanson");
	setBirthday(28,3,1921,"Dirk Bogarde");
	setBirthday(29,3,1867,"Cy Young");
	setBirthday(30,3,1853,"Vincent Van Gogh");
	setBirthday(31,3,1596,"Rene Descartes");
	setBirthday(1,4,1926,"Anne McCaffrey");
	setBirthday(2,4,1805,"Hans Christian Andersen");
	setBirthday(3,4,1924,"Marlon Brando");
	setBirthday(4,4,1932,"Anthony Perkins");
	setBirthday(5,4,1900,"Spencer Tracy");
	setBirthday(6,4,1866,"Butch Cassidy");
	setBirthday(7,4,1939,"Francis Coppola");
	setBirthday(8,4,1918,"Betty Ford");
	setBirthday(9,4,1926,"Hugh Hefner");
	setBirthday(10,4,1847,"Joseph Pulitzer");
	setBirthday(12,4,1956,"Andy Garcia");
	setBirthday(13,4,1743,"Thomas Jefferson");
	setBirthday(14,4,1904,"John Gielgud");
	setBirthday(15,4,1452,"Leonardo da Vinci");
	setBirthday(16,4,1867,"Wilbur Wright");
	setBirthday(17,4,1894,"Nikita Khrushchev");
	setBirthday(18,4,1882,"Leopold Stokowski");
	setBirthday(19,4,1949,"Paloma Picasso");
	setBirthday(20,4,1889,"Adolf Hitler");
	setBirthday(21,4,1926,"Elizabeth II, Queen of England");
	setBirthday(22,4,1870,"Vladimir Ilyich Lenin");
	setBirthday(23,4,1564,"William Shakespeare");
	setBirthday(24,4,1934,"Shirley MacLaine");
	setBirthday(25,4,1940,"Al Pacino");
	setBirthday(26,4,1785,"John James Audubon");
	setBirthday(27,4,1822,"Ulysses S. Grant");
	setBirthday(28,4,1937,"Saddam Hussein");
	setBirthday(29,4,1863,"William Randolph Hearst");
	setBirthday(30,4,1912,"Eve Arden");
	setBirthday(2,5,1892,"Baron Von Richthofen");
	setBirthday(3,5,1928,"James Brown");
	setBirthday(4,5,1929,"Audrey Hepburn");
	setBirthday(5,5,1818,"Karl Marx");
	setBirthday(6,5,1856,"Sigmund Freud");
	setBirthday(7,5,1840,"Peter Ilyich Tchaikovsky");
	setBirthday(8,5,1884,"Harry S. Truman");
	setBirthday(9,5,1936,"Glenda Jackson");
	setBirthday(10,5,1899,"Fred Astaire");
	setBirthday(11,5,1904,"Salvador Dali");
	setBirthday(12,5,1820,"Florence Nightingale");
	setBirthday(13,5,1950,"Stevie Wonder");
	setBirthday(14,5,1944,"George Lucas");
	setBirthday(15,5,1909,"James Mason");
	setBirthday(16,5,1905,"Henry Fonda");
	setBirthday(17,5,1900,"Ayatollah Khomeini");
	setBirthday(18,5,1919,"Margot Fonteyn");
	setBirthday(19,5,1925,"Malcolm X");
	setBirthday(20,5,1908,"Jimmy Stewart");
	setBirthday(21,5,1904,"Fats Waller");
	setBirthday(22,5,1859,"Sir Arthur Conan Doyle");
	setBirthday(23,5,1910,"Scatman Crothers");
	setBirthday(24,5,1941,"Bob Dylan");
	setBirthday(25,5,1803,"Ralph W. Emerson");
	setBirthday(26,5,1886,"Al Jolson");
	setBirthday(27,5,1837,"Wild Bill Hickock");
	setBirthday(28,5,1908,"Ian Fleming");
	setBirthday(29,5,1917,"John F. Kennedy");
	setBirthday(31,5,1819,"Walt Whitman");
	setBirthday(1,6,1926,"Marilyn Monroe");
	setBirthday(3,6,1808,"Jefferson Davis");
	setBirthday(6,6,1875,"Thomas Mann");
	setBirthday(7,6,1958,"(Formerly Known As) Prince");
	setBirthday(8,6,1867,"Frank Lloyd Wright");
	setBirthday(9,6,1892,"Cole Porter");
	setBirthday(10,6,1922,"Judy Garland");
	setBirthday(11,6,1910,"Jacques Cousteau");
	setBirthday(12,6,1924,"George Bush");
	setBirthday(13,6,1865,"William Butler Yeats");
	setBirthday(16,6,1890,"Stan Laurel");
	setBirthday(17,6,1882,"Igor Stravinski");
	setBirthday(18,6,1898,"M.C. Escher");
	setBirthday(19,6,1623,"Blaise Pascal");
	setBirthday(21,6,1905,"Jean-Paul Sartre");
	setBirthday(22,6,1949,"Meryl Streep");
	setBirthday(23,6,1912,"Alan Turing");
	setBirthday(25,6,1903,"George Orwell");
	setBirthday(27,6,1880,"Helen Keller");
	setBirthday(28,6,1902,"John Dillinger");
	setBirthday(1,7,1916,"Olivia DeHavilland");
	setBirthday(2,7,1877,"Hermann Hesse");
	setBirthday(3,7,1883,"Franz Kafka");
	setBirthday(4,7,1927,"Gina Lollobrigida");
	setBirthday(5,7,1810,"P.T. Barnum");
	setBirthday(7,7,1940,"Ringo Starr");
	setBirthday(8,7,1839,"John D. Rockefeller");
	setBirthday(9,7,1856,"Nicola Tesla");
	setBirthday(12,7,1861,"George Washington Carver");
	setBirthday(14,7,1918,"Ingmar Bergman");
	setBirthday(15,7,1606,"Rembrandt Van Rijn");
	setBirthday(16,7,1911,"Ginger Rogers");
	setBirthday(17,7,1889,"Erle Stanley Gardner");
	setBirthday(18,7,1918,"Nelson Mandela");
	setBirthday(19,7,1834,"Edgar Degas");
	setBirthday(20,7,1938,"Diana Rigg");
	setBirthday(21,7,1899,"Ernest Hemingway");
	setBirthday(22,7,1898,"Alexander Calder");
	setBirthday(26,7,1856,"George Bernard Shaw");
	setBirthday(28,7,1866,"Beatrix Potter");
	setBirthday(29,7,1883,"Benito Mussolini");
	setBirthday(30,7,1863,"Henry Ford");
	setBirthday(2,8,1932,"Peter O'Toole");
	setBirthday(4,8,1792,"Mary Wollstonecraft Shelley");
	setBirthday(5,8,1930,"Neil Armstrong");
	setBirthday(6,8,1928,"Andy Warhol");
	setBirthday(7,8,1876,"Mata Hari");
	setBirthday(8,8,1927,"Carl Switzer");
	setBirthday(9,8,1896,"Jean Piaget");
	setBirthday(12,8,1881,"Cecil B. DeMille");
	setBirthday(13,8,1926,"Fidel Castro");
	setBirthday(14,8,1945,"Steve Martin");
	setBirthday(15,8,1769,"Napoleon Bonaparte");
	setBirthday(16,8,1958,"Madonna"); 
	setBirthday(17,8,1943,"Robert De Niro");
	setBirthday(18,8,1933,"Roman Polanski");
	setBirthday(19,8,1871,"Orville Wright");
	setBirthday(20,8,1890,"H.P. Lovecraft");
	setBirthday(21,8,1904,"Count Basie");
	setBirthday(22,8,1862,"Claude Debussy");
	setBirthday(23,8,1912,"Gene Kelly");
	setBirthday(25,8,1918,"Leonard Bernstein");
	setBirthday(27,8,1910,"Mother Teresa");
	setBirthday(28,8,1774,"Elizabeth Ann Seton");
	setBirthday(29,8,1915,"Ingrid Bergman");
	setBirthday(1,9,1875,"Edgar Rice Burroughs");
	setBirthday(5,9,1847,"Jesse James");
	setBirthday(7,9,1533,"Elizabeth I, Queen of England");
	setBirthday(8,9,1925,"Peter Sellers");
	setBirthday(9,9,1941,"Otis Redding");
	setBirthday(10,9,1929,"Arnold Palmer");
	setBirthday(12,9,1888,"Maurice Chevalier");
	setBirthday(13,9,1916,"Roald Dahl");
	setBirthday(15,9,1890,"Agatha Christie");
	setBirthday(16,9,1924,"Lauren Bacall");
	setBirthday(17,9,1931,"Anne Bancroft");
	setBirthday(18,9,1905,"Greta Garbo");
	setBirthday(21,9,1866,"H.G. Wells");
	setBirthday(23,9,1930,"Ray Charles");
	setBirthday(24,9,1896,"F. Scott Fitzgerald");
	setBirthday(25,9,1897,"William Faulkner");
	setBirthday(26,9,1888,"T.S. Eliot");
	setBirthday(28,9,1934,"Brigitte Bardot");
	setBirthday(29,9,1547,"Miguel de Cervantes");
	setBirthday(1,10,1920,"Walter Matthau");
	setBirthday(2,10,1869,"Mahatma Gandhi");
	setBirthday(3,10,1925,"Gore Vidal");
	setBirthday(4,10,1895,"Buster Keaton");
	setBirthday(7,10,1931,"Bishop Desmond Tutu");
	setBirthday(8,10,1895,"Juan Peron");
	setBirthday(9,10,1940,"John Lennon");
	setBirthday(10,10,1813,"Giuseppe Verdi");
	setBirthday(11,10,1884,"Eleanor Roosevelt");
	setBirthday(12,10,1935,"Luciano Pavarotti");
	setBirthday(13,10,1925,"Margaret Thatcher");
	setBirthday(14,10,1890,"Dwight Eisenhower");
	setBirthday(16,10,1854,"Oscar Wilde");
	setBirthday(17,10,1918,"Rita Hayworth");
	setBirthday(18,10,1939,"Lee Harvey Oswald");
	setBirthday(19,10,1931,"John Le Carre");
	setBirthday(20,10,1854,"Arthur Rimbaud");
	setBirthday(21,10,1772,"Samuel Taylor Coleridge");
	setBirthday(22,10,1811,"Franz Liszt");
	setBirthday(23,10,1940,"Pele");
	setBirthday(25,10,1881,"Pablo Picasso");
	setBirthday(26,10,1947,"Hillary Rodham Clinton");
	setBirthday(27,10,1872,"Emily Post");
	setBirthday(28,10,1955,"Bill Gates");
	setBirthday(29,10,1891,"Fanny Brice");
	setBirthday(30,10,1735,"John Adams");
	setBirthday(31,10,1795,"John Keats");
	setBirthday(1,11,1871,"Stephen Crane");
	setBirthday(2,11,1795,"James K. Polk");
	setBirthday(4,11,1879,"Will Rogers");
	setBirthday(5,11,1913,"Vivien Leigh");
	setBirthday(6,11,1854,"John Philip Sousa");
	setBirthday(7,11,1867,"Madame Curie");
	setBirthday(9,11,1934,"Carl Sagan");
	setBirthday(10,11,1483,"Martin Luther");
	setBirthday(11,11,1922,"Kurt Vonnegut, Jr.");
	setBirthday(12,11,1840,"Auguste Rodin");
	setBirthday(13,11,1850,"Robert Louis Stevenson");
	setBirthday(14,11,1840,"Claude Monet");
	setBirthday(15,11,1887,"Georgia O'Keeffe");
	setBirthday(17,11,1925,"Rock Hudson");
	setBirthday(19,11,1917,"Indira Gandhi");
	setBirthday(20,11,1925,"Robert F. Kennedy");
	setBirthday(21,11,1694,"Jean Francois Voltaire");
	setBirthday(23,11,1859,"Billy the Kid");
	setBirthday(24,11,1868,"Scott Joplin");
	setBirthday(25,11,1846,"Carry Nation");
	setBirthday(26,11,1922,"Charles Schulz");
	setBirthday(27,11,1942,"Jimi Hendrix");
	setBirthday(30,11,1835,"Mark Twain");
	setBirthday(1,12,1935,"Woody Allen");
	setBirthday(3,12,1857,"Joseph Conrad");
	setBirthday(4,12,1866,"Wassily Kandinsky");
	setBirthday(5,12,1901,"Walt Disney");
	setBirthday(6,12,1896,"Ira Gershwin");
	setBirthday(8,12,1925,"Sammy Davis, Jr.");
	setBirthday(9,12,1909,"Douglas Fairbanks, Jr.");
	setBirthday(10,12,1830,"Emily Dickinson");
	setBirthday(11,12,1882,"Fiorello La Guardia");
	setBirthday(12,12,1941,"Dionne Warwick");
	setBirthday(13,12,1925,"Dick Van Dyke");
	setBirthday(14,12,1503,"Nostradamus");
	setBirthday(15,12,1892,"J. Paul Getty");
	setBirthday(16,12,1917,"Arthur C. Clarke");
	setBirthday(21,12,1879,"Joseph Stalin");
	setBirthday(24,12,1922,"Ava Garder");
	setBirthday(25,12,1642,"Sir Isaac Newton");
	setBirthday(26,12,1791,"Charles Babbage");
	setBirthday(27,12,1822,"Louis Pasteur");
	setBirthday(28,12,1856,"Woodrow Wilson");
	setBirthday(29,12,1800,"Charles Goodyear");
	setBirthday(30,12,1865,"Rudyard Kipling");
	setBirthday(31,12,1869,"Henri Matisse");
	anniversary=showBirthday(day,month);
	if(anniversary=="") anniversary="Nobody in particular";
	document.getElementById("anniversary1").innerHTML=anniversary;
}
function y2k(number)
{
	return(number<1000)?number+1900:number;
}
function padout(number)
{
	return (number<10)?'0'+number:number;
}
function LeapYear(year)
{
	if((year/4)!=Math.floor(year/4)) return false;
	if((year/100)!=Math.floor(year/100)) return true;
	if((year/400)!=Math.floor(year/400)) return false;
	return true;
}
function HowOld(day,month,year,thisDay,thisMonth,thisYear)
{
	yearsold=thisYear-year;
	monthsold=0;
	daysold=0;
	string='';
	if(thisMonth>=month) monthsold=thisMonth-month;
	else
	{
		yearsold--;
		monthsold=thisMonth+12-month;
	}
	if(thisDay>=day) daysold=thisDay-day;
	else
	{
		if(monthsold>0) monthsold--;
		else
		{
			yearsold--;
			monthsold+=11;
		}
		daysold=thisDay+31-day;
	}
	if(yearsold<0) return '';
	if((yearsold==0)&&(monthsold==0)&&(daysold==0)) return '';
	if(yearsold>0)
	{
		string=yearsold+' year';
		if(yearsold>1) string+='s';
		string+=' ';
	}
	if(monthsold>0)
	{
		string+=monthsold+' month';
		if(monthsold>1) string+='s';
		string+=' ';
	}
	if(daysold>0)
	{
		string+=daysold+' day';
		if(daysold>1) string+='s';
		string+=' ';
	}
	return string;
}
function makeArray()
{
	this[0]=makeArray.arguments.length;
	for(i=0;i<makeArray.arguments.length;i++) this[i+1]=makeArray.arguments[i];
}
function MakeEmptyArray(size)
{
	this[0]=size;
	for(i=1;i<=size;i++) this[i]='';
}
function StarSign(day,month)
{
	if(day<horroscopes[month]) return month;
	else if(month==12) return 1;
	else return month+1;
}
function Chinese(day,month,year)
{
	if((year>1900)&&(year<1999))
	{
		newYear=chinesenewyear[year-1899];
		newMonth=Math.floor(newYear);
		newDay=Math.round((newYear*100)-(newMonth*100));
		if((month>newMonth)||((month==newMonth)&&(day>=newDay)))
		{
			chineseBranch=(year-3)%12;
			chineseStem=(year-3)%10;
			nextYear=chinesenewyear[year-1899+1];
			nextMonth=Math.floor(nextYear);
			nextDay=Math.round((nextYear*100)-(nextMonth*100));
			lastDay=nextDay-1;
			if(lastDay==0)
			{
				lastMonth=nextMonth-1;
				lastDay=31;
			}
			else lastMonth=nextMonth;
			chineseyearrange='[ '+daysofweek[DayOfWeek(newDay,newMonth,year)]+' '+newDay+Nths(newDay)+' '+monthsofyear[newMonth]+' '+year+'<br>'+daysofweek[DayOfWeek(lastDay,lastMonth,year+1)]+' '+lastDay+Nths(lastDay)+' '+monthsofyear[lastMonth]+' '+(year+1)+' ]';
		}
		else
		{
			chineseBranch=(year-4)%12;
			chineseStem=(year-4)%10;
			oldYear=chinesenewyear[year-1899-1];
			oldMonth=Math.floor(oldYear);
			oldDay=Math.round((oldYear*100)-(oldMonth*100));
			lastDay=newDay-1;
			if(lastDay==0)
			{
				lastMonth=newMonth-1;
				lastDay=31;
			}
			else lastMonth=newMonth;
			chineseyearrange='[ '+daysofweek[DayOfWeek(oldDay,oldMonth,year-1)]+' '+oldDay+Nths(oldDay)+' '+monthsofyear[oldMonth]+' '+(year-1)+'<br>'+daysofweek[DayOfWeek(lastDay,lastMonth,year)]+' '+lastDay+Nths(lastDay)+' '+monthsofyear[lastMonth]+' '+year+ ' ]';
		}
	}
	else
	{
		chineseBranch=(year-3)%12;
		chineseStem=(year-3)%10;
	}
	if(chineseBranch==0) chineseBranch=12;
	if(chineseStem==0) chineseStem=10;
	chineseyearname=' ('+stems[chineseStem]+'-'+branches[chineseBranch]+')';
	return chinese[chineseBranch];
}
function DayOfWeek(day,month,year)
{
	var a=Math.floor((14-month)/12);
	var y=year-a;
	var m=month+12*a-2;
	var d=(day+y+Math.floor(y/4)-Math.floor(y/100)+Math.floor(y/400)+Math.floor((31*m)/12))%7;
	return d+1;
}
function Nths(day)
{ 
	if(day==1||day==21||day==31) return 'st';
	if(day==2||day==22) return 'nd';
	if(day==3||day==23) return 'rd';
	return 'th';
}
function FullDate(day,month,year)
{
	return daysofweek[DayOfWeek(day,month,year)]+' '+day+Nths(day)+' '+monthsofyear[month]+' '+year;
}
function Child(dayofweek)
{
	return daysofweek[dayofweek]+'\'s child '+child[dayofweek];
}
function rnd()
{
	rnd.seed=(rnd.seed*9301+49297)%233280;
	return rnd.seed/(233280.0);
}
function rand(number)
{
	return Math.ceil(rnd()*number);
}
function ResetLotteryBalls()
{
	for(i=1;i<=lotterynumbers[0];i++) lotterynumbers[i]='';
}
function SelectLotteryBalls(numberofballs)
{
	while(numberofballs>0)
	{
		random=rand(lotterynumbers[0]);
		if(lotterynumbers[random]=='')
		{
			lotterynumbers[random]='X';
			numberofballs--;
		}
	}
}
function ShowLotteryBalls()
{
	if(k===undefined) k=0;
	coll_LotteryBalls=document.getElementsByName("l");
	for(i=1;i<=lotterynumbers[0];i++)
	{
		if(lotterynumbers[i]!='')
		{
			coll_LotteryBalls.item(k).src="http://pictures.a2zpattaya.com/epal/balls/"+(i-1)+".gif";
			coll_LotteryBalls.item(k).width=50;
			coll_LotteryBalls.item(k).height=50;
			k++;
		}
	}
}
function Birthday(day,month,year,who)
{
	this.day=day;
	this.month=month;
	this.year=year;
	this.who=who;
}
function setBirthday(day,month,year,who)
{
	myBirthday[birthdayIndex++]=new Birthday(day,month,year,who);
}
var birthdayIndex=0;
var myBirthday=new Array();
function showBirthday(day,month)
{
	var output='';
	for(i=0;i<birthdayIndex;i++)
	{
		var birthDay=myBirthday[i].day;
		var birthMonth=myBirthday[i].month;
		if(day==birthDay&&month==birthMonth)
		{
			var birthYear=myBirthday[i].year;
			var who=myBirthday[i].who;
			output+=who+' ('+birthYear+')';
		}
	}
	return output;
}
function Easter(Y)
{
	var C=Math.floor(Y/100);
	var N=Y-19*Math.floor(Y/19);
	var K=Math.floor((C-17)/25);
	var I=C-Math.floor(C/4)-Math.floor((C-K)/3)+19*N+15;
	I=I-30*Math.floor((I/30));
	I=I-Math.floor(I/28)*(1-Math.floor(I/28)*Math.floor(29/(I+1))*Math.floor((21-N)/11));
	var J=Y+Math.floor(Y/4)+I+2-C+Math.floor(C/4);
	J=J-7*Math.floor(J/7);
	var L=I-J;
	var M=3+Math.floor((L+40)/44);
	var D=L+28-31*Math.floor(M/4);
	return padout(M)+'.'+padout(D);
}
function getMM(string)
{
	return eval(string.substring(0,2));
}
function getDD(string)
{
	return eval(string.substring(3,5));
}
function getYYYY(string)
{
	return eval(string.substring(0,string.indexOf('.')));
}
function getMMDD(string)
{
	return string.substring(string.indexOf('.')+1,string.length);
}
function daysinyear(year)
{
	if(LeapYear(year)) return 366;
	else return 365;
}
function addDays(day,month,year,addition)
{
	if(LeapYear(year)) var number=day+accumulateLY[month]+addition;
	else var number=day+accumulate[month]+addition;
	var days=daysinyear(year);
	while(number>days)
	{
		number-=days;
		days=daysinyear(++year);
	}
	while(number<1)
	{
		days=daysinyear(--year);
		number+=days;
	}
	month=1;
	if(LeapYear(year))
	{
		while(number>accumulateLY[month])
		{
			month++;
		}
		day=number-accumulateLY[--month];
	}
	else
	{
		while(number>accumulate[month])
		{
			month++;
		}
 		day=number-accumulate[--month];
	}
	return year+'.'+padout(month)+'.'+padout(day);
}
function NthDay(nth,weekday,month,year)
{
	if(nth>0) return (nth-1)*7+1+(7+weekday-DayOfWeek((nth-1)*7+1,month,year))%7;
	if(LeapYear(year)) var days=daysofmonthLY[month];
	else var days=daysofmonth[month];
	return days-(DayOfWeek(days,month,year)-weekday+7)%7;
}
function Event(day,month,what)
{
	this.value=''+padout(month)+'/'+padout(day);
	this.day=day;
	this.month=month;
	this.what=what;
}
function setEvent(day,month,what)
{
	myEvent[eventIndex++]=new Event(day,month,what);
}
function showEvent(day,month)
{
	var output='';
	for(i=0;i<eventIndex;i++)
	{
		if((day==myEvent[i].day)&&(month==myEvent[i].month)) output+='['+myEvent[i].what+'] ';
	}
	return output;
}
function myObjectBubbleSort(arrayName,length)
{
	for(i=0;i<(length-1);i++)
	{
		for(j=i+1;j<length;j++)
		{
			if(arrayName[j].value<arrayName[i].value)
			{
				var dummy=arrayName[i];
				arrayName[i]=arrayName[j];
				arrayName[j]=dummy;
			}
		}
	}
}
function showAllEvents(year)
{
	var output='';
	for(i=0;i<eventIndex;i++)
	{
		output+=FullDate(myEvent[i].day,myEvent[i].month,year)+' '+myEvent[i].what+'<br>';
	}
	return output;
}
function mychoices(form)
{
	if(form.pwd.value!="")
	{
		if(form.pwd.value.length<6)
		{
			alert("Your password must be 6 characters or more!");
			form.pwd.focus();
			return;
		}
		if(form.myChoice[0].checked)
		{
			form.step.value="myEdit";
			form.action="../../cgi-bin/make_epal.cgi";
		}
		else if(form.myChoice[1].checked)
		{
			form.step.value="myMatches";
			form.action="../../cgi-bin/make_epal.cgi";
		}
		else if(form.myChoice[2].checked)
		{
			form.action="../../cgi-bin/epal_namecard.cgi";
		}
		form.submit();
	}
}
function namecard(form)
{
	if(form.pwd.value!="")
	{
		if(form.pwd.value.length<6)
		{
			alert("Your password must be 6 characters or more!");
			form.pwd.focus();
			return;
		}
		else form.submit();
	}
}
function SendEmail(handle)
{
	winql="../../cgi-bin/epal_email.cgi?handle="+handle;
	window.open(winql,'sendemail','fullscreen=no,channelmode=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no',true);
}
function ForwardEmail(handle)
{
	winql="../../cgi-bin/epal_forward.cgi?handle="+handle;
	window.open(winql,'forwardemail','fullscreen=no,channelmode=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no',true);
}
function GetPwd(handle)
{
	winql="../../cgi-bin/epal_get_pwd.cgi?handle="+handle;
	window.open(winql,'getpwd','fullscreen=no,channelmode=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no',true);
}
