
//do not remove the following
//This script was created by William
//http://www.geocities.com/william1424
//\        /  .  |  |  .    /\    |\  /|
// \  /\  /   |  |  |  |   /__\   | \/ | 
//  \/  \/    |  |  |  |  /    \  |    |  

	
	var pickgame = Math.round(5 * Math.random());	
	var usedfiftyfifty = 0
	var pickquestion = new Array(15)
	var questiona = new Array(15)
	var questionb = new Array(15)
	var questionc = new Array(15)
	var questiond = new Array(15)
	var index = 0
	var cash = 0
	var yourname = prompt("What is your name" , "enter your name")
	
	pickgame = pickgame + 1
	


if (pickgame <= 1)
	{
	pickquestion[0] = "The Largest State in geographical area is the State of:"
	pickquestion[1] = "The Great Salt Lake is located in the State of….."
	pickquestion[2] = "The length of a single term for a US Senator is how many years?"
	pickquestion[3] = "Who was George Washington's Vice President during his two-term Presidency?"
	pickquestion[4] = "Who was the first man to step foot on the surface of the moon?"
	pickquestion[5] = "What was the name of the first space shuttle to enter space and land back on earth?"
	pickquestion[6] = "Who was the first President to serve all 50 current states?"
	pickquestion[7] = "The Missouri Compromise was voided by what event or action?"
	pickquestion[8] = "Who commanded the American Expeditionary Force (AEF) during World War I?"
	pickquestion[9] = "What is the tallest structure in Washington, DC?"
	pickquestion[10] = "During the Civil War, how many states seceded from the Union?"
	pickquestion[11] = "After Andrew Jackson won the popular vote but lost  the presidency to John Q. Adams by vote of the US House of Representatives, Sec. Of State Henry Clay and Senator John Randolph did what?"
	pickquestion[12] = "What was the name of the Wright Brothers first successful airplane?"
	pickquestion[13] = "How many members of the US Senate must vote in order to end a filibuster?"
	pickquestion[14] = "Who did President Lincoln appoint US Army Superintendent of Army Nurses during the Civil War?"

	questiona[0] = "Texas"	
	questiona[1] = "Wyoming"
	questiona[2] = "8"
	questiona[3] = "John Adams"
	questiona[4] = "John Glenn"
	questiona[5] = "Challenger"
	questiona[6] = "Dwight Eisenhower"
	questiona[7] = "Emancipation Proclamation"
	questiona[8] = "John J. Pershing"
	questiona[9] = "The Washington Monument"
	questiona[10] = "9"
	questiona[11] = "Held a Public Celebration"
	questiona[12] = "Wright-Curtiss"
	questiona[13] = "60 Votes"
	questiona[14] = "Dorthea Dix"

	questionb[0] = "Alaska"
	questionb[1] = "Texas"
	questionb[2] = "6"
        questionb[3] = "Thomas Jefferson"
	questionb[4] = "Alan Shepard"
	questionb[5] = "Discovery"
	questionb[6] = "Harry S Truman"
	questionb[7] = "Marbury vs. Madison"
	questionb[8] = "Leonard Wood"
	questionb[9] = "The Capitol Dome"
	questionb[10] = "11"
	questionb[11] = "Fought a Duel"
	questionb[12] = "Flyer"
	questionb[13] = "2/3 Majority Vote"
	questionb[14] = "Clara Barton"

	questionc[0] = "Montana"
	questionc[1] = "Nevada"
	questionc[2] = "4"
	questionc[3] = "Alexander Hamilton"
	questionc[4] = "Edwin Aldrin"
	questionc[5] = "Columbia"
	questionc[6] = "John F. Kennedy"
	questionc[7] = "Dred Scott Decision"
	questionc[8] = "Theodore Roosevelt"
	questionc[9] = "The White House"
	questionc[10] = "10"
	questionc[11] = "Lodged Formal Protests"
	questionc[12] = "American Hope"
	questionc[13] = "3/4 Majority Vote"
	questionc[14] = "Dr. Mary Walker"

	questiond[0] = "California"
	questiond[1] = "Utah"
	questiond[2] = "2"
	questiond[3] = "John Quincy Adams"
	questiond[4] = "Neil Armstrong"
	questiond[5] = "Atlantis"
	questiond[6] = "Lyndon Johnson"
	questiond[7] = "13th Amendment"
	questiond[8] = "Douglas MacArthur"
	questiond[9] = "Iwo Jima Memorial"
	questiond[10] = "12"
	questiond[11] = "Asked for a recount"
	questiond[12] = "Wings"
	questiond[13] = "51 Votes (Simple Majority)"
	questiond[14] = "Dr. Elizabeth Blackwell"
	}

else if (pickgame == 2)
	{
	pickquestion[0] = "The Largest State in geographical area is the State of:"
	pickquestion[1] = "Independence Hall is located in….."
	pickquestion[2] = "How many years is a single term for a member of the US House of Representatives?"
	pickquestion[3] = "What is the Capitol City of the State of Nevada?"
	pickquestion[4] = "Who was the woman who assisted Lewis and Clark in their historic exploration to the West?"
	pickquestion[5] = "Who was the first President born in the 20th Century?"
	pickquestion[6] = "The sinking of what ship became the basis for the US entry into what became the Spanish-American War?"
	pickquestion[7] = "Who was the first President to win the Pulitzer Prize for Literature?"
	pickquestion[8] = "Each time a state is admitted to the United States, a new star is placed within a year on the US Flag.  On what date is the new flag introduced?"
	pickquestion[9] = "The easternmost location in the United States is what city or prominent point?"
	pickquestion[10] = "In Presidential succession, after the Vice President, Speaker of the House, and President Pro Tempore of the Senate, who is next?"
	pickquestion[11] = "Who was Vice President under President Gerald Ford?"
	pickquestion[12] = "In what year did Hawaii become our 50th State?"
	pickquestion[13] = "The Pledge of Allegiance to the US Flag was first introduced in celebration of what holiday?"
	pickquestion[14] = "Which of the following is NOT a term used to identify a political perk?"

	questiona[0] = "Texas"
	questiona[1] = "Pittsburgh"
	questiona[2] = "8"
	questiona[3] = "Carson City"
	questiona[4] = "Pocahontas"
	questiona[5] = "Dwight Eisenhower"
	questiona[6] = "USS Maine"
	questiona[7] = "Theodore Roosevelt"
	questiona[8] = "Independence Day"
	questiona[9] = "Eastport, ME"
	questiona[10] = "Senate Majority Leader"
	questiona[11] = "Dan Quayle"
	questiona[12] = "1950"
	questiona[13] = "Columbus Day"
	questiona[14] = "Annuities"

	questionb[0] = "Alaska" 
	questionb[1] = "Washington, DC"
	questionb[2] = "2"
        	questionb[3] = "Reno"
	questionb[4] = "Abagail Adams"
	questionb[5] = "Lyndon Johnson"
	questionb[6] = "USS Arizona"
	questionb[7] = "Franklin D. Roosevelt"
	questionb[8] = "Flag Day"
	questionb[9] = "Miami, FL"
	questionb[10] = "Secretary of State"
	questionb[11] = "Nelson Rockefeller"
	questionb[12] = "1959"
	questionb[13] = "Independence Day"
	questionb[14] = "Annie Oaklies"

	questionc[0] = "Montana"
	questionc[1] = "Valley Forge"
	questionc[2] = "4"
	questionc[3] = "Las Vegas"
	questionc[4] = "Annie Oakley"
	questionc[5] = "John F. Kennedy"
	questionc[6] = "Lusitania"
	questionc[7] = "John F. Kennedy"
	questionc[8] = "New Years Day"
	questionc[9] = "Cape Cod, ME"
	questionc[10] = "House Majority Leader"
	questionc[11] = "Jimmy Carter"
	questionc[12] = "1957"
	questionc[13] = "Memorial Day"
	questionc[14] = "Junkets"

	questiond[0] = "California"
	questiond[1] = "Philadelphia"
	questiond[2] = "6"
	questiond[3] = "Laughlin"
	questiond[4] = "Sacagawea"
	questiond[5] = "Richard Nixon"
	questiond[6] = "USS Constitution"
	questiond[7] = "Warren G. Harding"
	questiond[8] = "Anniversary of State's Admission"
	questiond[9] = "Long Island, NY"
	questiond[10] = "Chairman, Joint Chiefs of Staff"
	questiond[11] = "Spiro T. Agnew"
	questiond[12] = "1961"
	questiond[13] = "Flag Day"
	questiond[14] = "Freebies"
	}

else if (pickgame == 3)
	{
	pickquestion[0] = "The Largest State in geographical area is the State of:"
	pickquestion[1] = "George Washington built his personal home at what place?"
	pickquestion[2] = "What is the minimum age a person much be in order to become the President of the United States?"
	pickquestion[3] = "What lake forms behind the Hoover Dam?"
	pickquestion[4] = "Who was the first American to travel into space?"
	pickquestion[5] = "At the time Francis Scott Key wrote the Star Spangled Banner there were 15 states.  The flag he saw flying over Fort McHenry when he wrote it had….."
	pickquestion[6] = "What document/agreement limited the influence of European nations in the affairs of South American countries?"
	pickquestion[7] = "Who was the first US President to win the Nobel Peace Prize?"
	pickquestion[8] = "How many individual ARTICLES (excluding the Preamble) are there in the US Constitution?"
	pickquestion[9] = "What was the first state to elect a woman to the United States Congress?"
	pickquestion[10] = "Which of the following WAS NOT the scene of a World War II battle in the Pacific?"
	pickquestion[11] = "Which of the following was the FIRST in the American space program?"
	pickquestion[12] = "Who's birth name was changed from Leslie King, Jr.?"
	pickquestion[13] = "America's WWI Ace of Aces Eddie Rickenbacker began his military career as a jeep driver for a famous American military man, who then encourage him to become a pilot.  For whom did he drive?"
	pickquestion[14] = "Who won a Pulitzer prize for the biography of Abraham Lincoln?"

	questiona[0] = "Texas"
	questiona[1] = "Monticello"
	questiona[2] = "No Age Requirement"
	questiona[3] = "Lake Meade"
	questiona[4] = "Neil Armstrong"
	questiona[5] = "15 Stars & 13 Stripes"
	questiona[6] = "The Monroe Doctrine"
	questiona[7] = "Dwight D. Eisenhower"
	questiona[8] = "7"
	questiona[9] = "Montana"
	questiona[10] = "Kwajalein"
	questiona[11] = "Gemini"
	questiona[12] = "Stephen King"
	questiona[13] = "Billy Mitchell"
	questiona[14] = "Carl Sandburg"

questionb[0] = "Alaska" 
	questionb[1] = "Montpelier"
	questionb[2] = "35"
        	questionb[3] = "Lake Tahoe"
	questionb[4] = "Edwin Aldrin"
	questionb[5] = "13 Stars & 13 Stripes"
	questionb[6] = "The New Deal"
	questionb[7] = "Woodrow Wilson"
	questionb[8] = "5"
	questionb[9] = "Wyoming"
	questionb[10] = "Omaha Beach"
	questionb[11] = "Mercury"
	questionb[12] = "Gerald R. Ford"
	questionb[13] = "John J. Pershing"
	questionb[14] = "James A. Mitchner"

	questionc[0] = "Montana"
	questionc[1] = "Washington, DC"
	questionc[2] = "40"
	questionc[3] = "Pyramid Lake"
	questionc[4] = "John Glenn"
	questionc[5] = "15 Stars & 15 Stripes"
	questionc[6] = "The Treaty of Versailles"
	questionc[7] = "Theodore Roosevelt"
	questionc[8] = "10"
	questionc[9] = "California"
	questionc[10] = "Hollandia"
	questionc[11] = "Apollo"
	questionc[12] = "Leslie Nielson"
	questionc[13] = "Douglas MacArthur"
	questionc[14] = "C. S. Lewis"

	questiond[0] = "California"
	questiond[1] = "Mount Vernon"
	questiond[2] = "50"
	questiond[3] = "Hoover Lake"
	questiond[4] = "Alan Shepard"
	questiond[5] = "13 Stars & 15 Stripes"
	questiond[6] = "The Treaty of Paris"
	questiond[7] = "Harry S Truman"
	questiond[8] = "13"
	questiond[9] = "Washington State"
	questiond[10] = "Eniwtok"
	questiond[11] = "Voyager"
	questiond[12] = "Martin Luther King"
	questiond[13] = "Leonard Wood"
	questiond[14] = "Stephen Ambrose"
	}

else if (pickgame == 4)
	{
	pickquestion[0] = "The Largest State in geographical area is the State of:"
	pickquestion[1] = "How many justices usually sit on the US Supreme Court?"
	pickquestion[2] = "In what year was Pearl Harbor attacked by the Japanese?"
	pickquestion[3] = "What was the FIRST U.S. military medal to be authorized and presented?"
	pickquestion[4] = "What document begins with the words WE THE PEOPLE?"
	pickquestion[5] = "Who said GIVE ME LIBERTY OR GIVE ME DEATH?"
	pickquestion[6] = "Dr. Jonas Salk believed so much in his research, he tested his early vaccine on himself and members of his family in an effort to eradicate what disease?"
	pickquestion[7] = "Which President was born on the 4th of July?"
	pickquestion[8] = "How many Amendments (including those repealed), have been added to the US Constitution?"
	pickquestion[9] = "What State was the first state to elect a woman governor?"
	pickquestion[10] = "What personal goal did William H. Taft speak of often, and finally attain?"
	pickquestion[11] = "What World War II aviation equipment became known as the MAE WEST?"
	pickquestion[12] = "In the early 1900s, Jackie Cochran became a well known American figure for her efforts in what area?"
	pickquestion[13] = "Which of the following States does not have a Capitol City named for a US President?"
	pickquestion[14] = "Upton Sinclair's THE JUNGLE (1910) exposed what problem in Chicago that led to a series of sweeping reforms and introduced the 24-year old writer to the American public?"

	questiona[0] = "Texas"
	questiona[1] = "7"
	questiona[2] = "1940"
	questiona[3] = "Badge for Military Merit"
	questiona[4] = "Declaration of Independence"
	questiona[5] = "Nathan Hale"
	questiona[6] = "Polio"
	questiona[7] = "Ulysses S. Grant"
	questiona[8] = "27"
	questiona[9] = "Wyoming"
	questiona[10] = "The Presidency"
	questiona[11] = "Inflatable Life Rafts"
	questiona[12] = "Olympic Sports"
	questiona[13] = "Washington State"
	questiona[14] = "Meat Packing"

	questionb[0] = "Alaska" 
	questionb[1] = "5"
	questionb[2] = "1941"
     	 questionb[3] = "The Purple Heart"
	questionb[4] = "The Bill of Rights"
	questionb[5] = "John Hancock"
	questionb[6] = "Small Pox"
	questionb[7] = "Harry S Truman"
	questionb[8] = "26"
	questionb[9] = "Montana"
	questionb[10] = "Become Supreme Court Chief Justice"
	questionb[11] = "Inflatable Life Vests"
	questionb[12] = "Aviation"
	questionb[13] = "Mississippi"
	questionb[14] = "Political Corruption"

questionc[0] = "Montana"
	questionc[1] = "13"
	questionc[2] = "1939"
	questionc[3] = "The Medal of Honor"
	questionc[4] = "Magna Carta"
	questionc[5] = "Patrick Henry"
	questionc[6] = "Measles"
	questionc[7] = "Calvin Coolidge"
	questionc[8] = "29"
	questionc[9] = "California"
	questionc[10] = "Earn a Million Dollars"
	questionc[11] = "The Parachute"
	questionc[12] = "Women's Rights"
	questionc[13] = "Missouri"
	questionc[14] = "Police Corruption"

	questiond[0] = "California"
	questiond[1] = "9"
	questiond[2] = "1942"
	questiond[3] = "The Legion of Merit"
	questiond[4] = "The Constitution"
	questiond[5] = "Thomas Jefferson"
	questiond[6] = "Typhoid Fever"
	questiond[7] = "John F. Kennedy"
	questiond[8] = "24"
	questiond[9] = "Oregon"
	questiond[10] = "Travel to China"
	questiond[11] = "Aviation Goggles"
	questiond[12] = "Motion Pictures"
	questiond[13] = "Nebraska"
	questiond[14] = "Bootlegging"
	}

else if (pickgame >= 5)
	{
	pickquestion[0] = "The Largest State in geographical area is the State of:"
	pickquestion[1] = "How many verses to the Star Spangled Banner did Francis Scott Key write?"
	pickquestion[2] = "In what National Park can you see OLD FAITHFUL?"
	pickquestion[3] = "What is the date of FLAG DAY?"
	pickquestion[4] = "Where did the Pilgrims land after their voyage on the Mayflower?"
	pickquestion[5] = "Who said, 'I only regret that I have but one life to give for my Country?'"
	pickquestion[6] = "What American novel introduced the character Simon Legree?"
	pickquestion[7] = "Which of the following Presidents can NOT been seen on Mount Rushmore?"
	pickquestion[8] = "Which Amendment to the US Constitution gave women the right to vote?"
	pickquestion[9] = "The Statue of Liberty was a gift to the United States from what country?"
	pickquestion[10] = "Which US President was buried with a copy of the Constitution under his head as a pillow?"
	pickquestion[11] = "The Medal of Honor has been symbolically awarded to how many UNKNOWN soldiers?"
	pickquestion[12] = "Who's BIRTH name was William Blythe?"
	pickquestion[13] = "On July 1, 1847 the US Post Office issued their first two government-sponsored stamps.  The 10 cent stamp pictured George Washington.  What was on the 5 cent stamp?"
	pickquestion[14] = "The MOLLY MAGUIRES were?"

	questiona[0] = "Texas"
	questiona[1] = "1"
	questiona[2] = "Yosemite"
	questiona[3] = "June 14th"
	questiona[4] = "Jamestown"
	questiona[5] = "Patrick Henry"
	questiona[6] = "Uncle Tom's Cabin"
	questiona[7] = "Thomas Jefferson"
	questiona[8] = "19th"
	questiona[9] = "France"
	questiona[10] = "James Monroe"
	questiona[11] = "3"
	questiona[12] = "William Billy Mitchell"
	questiona[13] = "Benjamin Franklin"
	questiona[14] = "Radical Coal Miners"

	questionb[0] = "Alaska" 
	questionb[1] = "2"
	questionb[2] = "Yellowstone"
        questionb[3] = "July 4th"
	questionb[4] = "Roanoke"
	questionb[5] = "John Hancock"
	questionb[6] = "Tom Sawyer"
	questionb[7] = "Theodore Roosevelt"
	questionb[8] = "18th"
	questionb[9] = "England"
	questionb[10] = "Andrew Johnson"
	questionb[11] = "9"
	questionb[12] = "William Clinton"
	questionb[13] = "Thomas Jefferson"
	questionb[14] = "Revolutionary War Women"

	questionc[0] = "Montana"
	questionc[1] = "3"
	questionc[2] = "Grand Teton"
	questionc[3] = "November 11th"
	questionc[4] = "Boston"
	questionc[5] = "Nathan Hale"
	questionc[6] = "Little Women"
	questionc[7] = "Andrew Jackson"
	questionc[8] = "20th"
	questionc[9] = "Canada"
	questionc[10] = "Thomas Jefferson"
	questionc[11] = "4"
	questionc[12] = "Willie Mayes"
	questionc[13] = "Marquis D. Lafayette"
	questionc[14] = "A WWII singing group"

	questiond[0] = "California"
	questiond[1] = "4"
	questiond[2] = "Glacier"
	questiond[3] = "February 12"
	questiond[4] = "Plymouth Rock"
	questiond[5] = "George Washington"
	questiond[6] = "For Whom The Bell Tolls"
	questiond[7] = "George Washington"
	questiond[8] = "21st"
	questiond[9] = "Spain"
	questiond[10] = "Washington"
	questiond[11] = "5"
	questiond[12] = "William McKinley"
	questiond[13] = "The Capitol Building"
	questiond[14] = "A Political Action Committee"
	}

	function play()
	{
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]



	}

	function play()
	{
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
		
	function a()
	{
	if (confirm(yourname + "," + " " + "Is that your final answer"))
	{
	if (index == 0)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"

	}
	
	else if (index == 1)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}

	else if (index == 2)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}

	else if (index == 3)
	{
	alert(yourname + "," + " " + "That is Correct for 500 Dollars")
	alert("Now for the 1,000 Dollars question")
	index = index + 1
	cash = 500
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}

	else if (index == 4)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 5)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 6)
	{
	alert(yourname + "," + " " + "That is Correct for 4,000 Dollars")
	alert("Now for the 8,000 Dollars question")
	index = index + 1
	cash = "4,000"
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
	else if (index == 7)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 8)
	{
	alert(yourname + "," + " " + "That is Correct for 16,000 Dollars")
	alert("Now for the 32,000 Dollars question")
	index = index + 1
	cash = "16,000"
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
	else if (index == 9)
	{
	alert(yourname + "," + " " + "That is Correct for 32,000 Dollars")
	alert("Now for the 64,000 Dollars question")
	index = index + 1
	cash = "32,000"
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
	else if (index == 10)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 11)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 12)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 13)
	{
	alert(yourname + "," + " " + "That is Correct for 500,000 Dollars")
	alert("Now for the 1,000,000 Dollars question")
	index = index + 1
	cash = "500,000"
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
	else if (index == 14)
	{
	alert(yourname + "," + " " + "That is Correct for 1,000,000 Dollars!!!")
	parent.location.href="youwon.html" 		
	window.open('youwon.php','Millionare', config='height=300,width=300')
	index = index + 1
	cash = "1,000,000"
	document.millionare.cash.value = cash
	}
	}
	}


	function b()
	{

	if (confirm(yourname + "," + " " + "Is that your final answer") )
	{
	if (index == 0)
	{
	alert(yourname + "," + " " + "That is Correct for 100 Dollars")
	alert("Now for the 200 Dollars question")
	index = index + 1
	cash = 100
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}

	else if (index == 1)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	
	else if (index == 2)
	{
	alert(yourname + "," + " " + "That is Correct for 300 Dollars")
	alert("Now for the 500 Dollars question")
	index = index + 1
	cash = 300
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}

	else if (index == 3)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}

	else if (index == 4)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 5)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 6)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 7)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 8)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 9)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 10)
	{
	alert(yourname + "," + " " + "That is Correct for 64,000 Dollars")
	alert("Now for the 125,000 Dollars question")
	index = index + 1
	cash = "64,000"
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
	else if (index == 11)
	{
	alert(yourname + "," + " " + "That is Correct for 125,000 Dollars")
	alert("Now for the 250,000 Dollars question")
	index = index + 1
	cash = "125,000"
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
	else if (index == 12)
	{
	alert(yourname + "," + " " + "That is Correct for 250,000 Dollars")
	alert("Now for the 500,000 Dollars question")
	index = index + 1
	cash = "250,000"
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
	else if (index == 13)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 14)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	}
	}


	function c()
	{
	if (confirm(yourname + "," + " " + "Is that your final answer") )
	{
	if (index == 0)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}

	else if (index == 1)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 2)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 3)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}

	else if (index == 4)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 5)
	{
	alert(yourname + "," + " " + "That is Correct for 2,000 Dollars")
	alert("Now for the 4,000 Dollars question")
	index = index + 1
	cash = "2,000"
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
	else if (index == 6)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 7)
	{
	alert(yourname + "," + " " + "That is Correct for 8,000 Dollars")
	alert("Now for the 16,000 Dollars question")
	index = index + 1
	cash = "8,000"
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
	else if (index == 8)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 9)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 10)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 11)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 12)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 13)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 14)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	}
	}


	function d()
	{
	if (confirm(yourname + "," + " " + "Is that your final answer") )
	{
	if (index == 0)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}

	else if (index == 1)
	{
	alert(yourname + "," + " " + "That is Correct for 200 Dollars")
	alert("Now for the 300 Dollars question")
	index = index + 1
	cash = 200
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}

	else if (index == 2)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 3)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}

	else if (index == 4)
	{
	alert(yourname + "," + " " + "That is Correct for 1,000 Dollars")
	alert("Now for the 2,000 Dollars question")
	index = index + 1
	cash = "1,000"
	document.millionare.cash.value = cash
	document.millionare.question.value = pickquestion[index]
	
	document.millionare.answera.value = questiona[index]
	document.millionare.answerb.value = questionb[index]
	document.millionare.answerc.value = questionc[index]
	document.millionare.answerd.value = questiond[index]
	}
	else if (index == 5)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 6)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 7)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 8)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 9)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 10)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 11)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 12)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 13)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	else if (index == 14)
	{alert(yourname + "," + " " + "I'm sorry but you are incorrect")
	parent.location.href="youlose.html"
	}
	}
	}

	function fiftyfifty()
	{
	

	if (usedfiftyfifty == 5)
	{alert("You have already used the fifty fifty")}

	else  
	
	{
	if (index == 0)
	{document.millionare.answera.value = "--------"
	document.millionare.answerc.value = "--------"}
	else if (index == 1)
	{document.millionare.answerb.value = "--------"
	document.millionare.answerc.value = "--------"}
	else if (index == 2)
	{document.millionare.answerd.value = "--------"
	document.millionare.answerc.value = "--------"}
	else if (index == 3)
	{document.millionare.answerd.value = "--------"
	document.millionare.answerc.value = "--------"}
	else if (index == 4)
	{document.millionare.answera.value = "--------"
	document.millionare.answerb.value = "--------"}
	else if (index == 5)
	{document.millionare.answera.value = "--------"
	document.millionare.answerd.value = "--------"}
	else if (index == 6)
	{document.millionare.answerb.value = "--------"
	document.millionare.answerd.value = "--------"}
	else if (index == 7)
	{document.millionare.answera.value = "--------"
	document.millionare.answerb.value = "--------"}
	else if (index == 8)
	{document.millionare.answerd.value = "--------"
	document.millionare.answerc.value = "--------"}
	else if (index == 9)
	{document.millionare.answerb.value = "--------"
	document.millionare.answerc.value = "--------"}
	else if (index == 10)
	{document.millionare.answera.value = "--------"
	document.millionare.answerd.value = "--------"}
	else if (index == 11)
	{document.millionare.answera.value = "--------"
	document.millionare.answerc.value = "--------"}
	else if (index == 12)
	{document.millionare.answerd.value = "--------"
	document.millionare.answerc.value = "--------"}
	else if (index == 13)
	{document.millionare.answerb.value = "--------"
	document.millionare.answerd.value = "--------"}
	else if (index == 14)
	{document.millionare.answerc.value = "--------"
	document.millionare.answerd.value = "--------"}
	
	}
	document.millionare.fiftyfiftybutton.value = "XXXXX"
	usedfiftyfifty = 5
	}
	


	function callafriend()
	{
	if (document.millionare.phoneafriend.value == "XXXXX")
	{alert("You have already used the Phone a Friend")}

	else if (document.millionare.phoneafriend.value == "phone a friend") 
	{

	var whotocall = prompt("Who do you wish to call" , "Enter a name")

	while (whotocall == " ")
	{alert("You have to enter a name")
	var whotocall = prompt("Who do you wish to call" , " ")}
	
	
	
	alert("ok, we will get" + " " + whotocall + " " + "on the line")
	alert("Ring.....")
	alert("Hello...." + " " + whotocall + ",")
	alert("We have" + " " + yourname + " " + "In the hotseat and he has won" +  " " + cash + " " + "Dollars, and needs your help")
	alert("The next voice you here will be" + " " + yourname + "'s" + " " + "and will read you the question and the 4 posible answers")
	alert("Hey," + " " + whotocall + " " + " " + " " + " " + "'" + pickquestion[index] + "'")
	alert("Is it A," + " " + questiona[index])
	alert("Is it B," + " " + questionb[index])
	alert("Is it C," + " " + questionc[index])
	alert("Or Is it D," + " " + questiond[index])


	if (index == 0)
	{alert(yourname + "," + " " + "the answer is B," + " " + questionb[index])}
	else if (index == 1)
	{alert(yourname + "," + " " + "the answer is D," + " " + questiond[index])}
	else if (index == 2)
	{alert(yourname + "," + " " + "the answer is B," + " " + questionb[index])}
	else if (index == 3)
	{alert(yourname + "," + " " + "the answer is A," + " " + questiona[index])}
	else if (index == 4)
	{alert(yourname + "," + " " + "the answer is D," + " " + questiond[index])}
	else if (index == 5)
	{alert(yourname + "," + " " + "I am not possitive but I would say C," + " " + questionc[index])}
	else if (index == 6)
	{alert(yourname + "," + " " + "Well I am positive about this one, and the answer is A," + " " + questiona[index])}
	else if (index == 7)
	{alert(yourname + "," + " " + "I'm not sure but I would lean twords C," + " " + questionc[index])}
	else if (index == 8)
	{alert("I'm sorry," + " " + yourname + " " + "But I just don't know this one")}
	else if (index == 9)
	{alert(yourname + "," + " " + "I have no Idea, but I would guess C," + " " + questionc[index])}
	else if (index == 10)
	{alert(yourname + "," + " " + "The Correct answer is B," + " " + questionb[index])}
	else if (index == 11)
	{alert(yourname + "," + " " + "I'm Sorry I have no idea")}
	else if (index == 12)
	{alert(yourname + "," + " " + "I'm sorry but I don't know know this one")}
	else if (index == 13)
	{alert(yourname + "," + " " + "I am 100 % sure that the Correct answer is A," + " " + questiona[index])}
	else if (index == 14)
	{alert(yourname + "," + " " + "Wow!, This ones hard , I have to say that I don't know")}
	
	alert("thanks," + " " + whotocall)


	}
	document.millionare.phoneafriend.value = "XXXXX"

	
	}



	function pollaudience()
	{

	if (document.millionare.askaudience.value == "XXXXX")
	{alert(yourname + "," + " " + "You have already asked the Audience")}

	else if (document.millionare.askaudience.value == "ask the audience") 
	{

	if (index == 0)
       {window.open('pictures/askaud100.gif', 'milliongame' , config='height=170,width=120')}
	
	else if (index == 1)
       {window.open('pictures/askaud200.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 2)
	{window.open('pictures/askaud300.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 3)
	{window.open('pictures/askaud500.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 4)
	{window.open('pictures/askaud1000.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 5)
	{window.open('pictures/askaud2000.gif', 'milliongame' , config='height=170,width=120')}	

	else if (index == 6)
	{window.open('pictures/askaud4000.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 7)
	{window.open('pictures/askaud8000.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 8)
	{window.open('pictures/askaud16000.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 9)
	{window.open('pictures/askaud32000.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 10)
	{window.open('pictures/askaud64000.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 11)
	{window.open('pictures/askaud125000.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 12)
	{window.open('pictures/askaud250000.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 13)
	{window.open('pictures/askaud500000.gif', 'milliongame' , config='height=170,width=120')}

	else if (index == 14)
	{window.open('pictures/askaud1000000.gif', 'milliongame' , config='height=170,width=120')}


	}
	document.millionare.askaudience.value = "XXXXX"
	}


	function walkaway()
	{
	if (confirm(yourname + "," + " " + "Is that your final desision, to walk away") )
	{alert("Congradulations," + " " + yourname + "," + " " +  "you won" + " " + cash + " " + "Dollars")
	parent.location.href="thankyou.html"}
	}
