// JavaScript Document
var ques = new Array("Which time of day do you prefer?","Which of these things do you prize most about yourself?","Which of these describes your personality?","Which do you like better?","Which leisure activity do you enjoy the most?","If you could have only one wish, what would you wish for? (You can't wish for more wishes you Slytherins!)","which is your favorite holiday?")
var ans1 = new Array()
ans1[0] = new Array()
ans1[1] = new Array()
ans1[2] = new Array()
ans1[3] = new Array()
ans1[4] = new Array()
ans1[5] = new Array()
ans1[6] = new Array()
<!-- first question answers
ans1[0][0] = "Morning"; 
ans1[0][1] = "Afternoon";
ans1[0][2] = "Evening";
ans1[0][3] = "Night";
<!-- second question answers
ans1[1][0] = "The ability to help others"
ans1[1][1] = "How much money you have"
ans1[1][2] = "A logical mind"
ans1[1][3] = "Intuition"
ans1[1][4] = "Your memory"
ans1[1][5] = "Really good luck"
ans1[1][6] = "That people think good of you"
ans1[1][7] = "Passionate love of things"
ans1[1][8] = "Strength"
ans1[1][9] = "Success"
ans1[1][10] = "Deep spirituality"
ans1[1][11] = "Pure spirit"
ans1[1][12] = "Good health"
ans1[1][13] = "Your ability to protect people"
ans1[1][14] = "Beauty"
ans1[1][15] = "Fertile mind"
ans1[1][16] = "Love of people"
ans1[1][17] = "Connection with the past"
ans1[1][18] = "Intelligence"
ans1[1][19] = "Ability to lead"
ans1[1][20] = "Yourself"
<!-- third question answers
ans1[2][0] = "Fiery"
ans1[2][1] = "Passionate"
ans1[2][2] = "Beautiful"
ans1[2][3] = "Serene"
ans1[2][4] = "Strong"
ans1[2][5] = "Adaptable"
<!-- forth question answers
ans1[3][0] = "gold"
ans1[3][1] = "silver"
ans1[3][2] = "bronze"
ans1[3][3] = "copper"
<!-- fifth question answers
ans1[4][0] = "Sleeping"
ans1[4][1] = "Watching Muggle television"
ans1[4][2] = "Hiking"
ans1[4][3] = "Swimming"
ans1[4][4] = "Reading"
ans1[4][5] = "Creating things (writing, drawing etc)"
ans1[4][6] = "Listening to the wireless (music)"
ans1[4][7] = "Talking"
ans1[4][8] = "Being outdoors"
ans1[4][9] = "Playing games"
ans1[4][10] = "Muggle internet"
ans1[4][11] = "Getting into trouble"
ans1[4][12] = "Collecting things"
ans1[4][13] = "Flying on broom/driving muggle cars"
ans1[4][14] = "Fighting/arguing/debating"
<!-- sixth question answers
ans1[5][0] = "Money"
ans1[5][1] = "Power"
ans1[5][2] = "Beauty"
ans1[5][3] = "Entertainment"
ans1[5][4] = "Contentment"
<!-- seventh question answers
ans1[6][0] = "Christmas/Chanukah"
ans1[6][1] = "Halloween"
ans1[6][2] = "Easter"
ans1[6][3] = "Independence Day"
ans1[6][4] = "New Years"
ans1[6][5] = "Thanksgiving"
ans1[6][6] = "Valentines Day"
ans1[6][7] = "St. Patrick's Day"
ans2 = new Array()
ans2[0] = new Array()
ans2[0][0] = "apple"
ans2[0][1] = "ash"
ans2[0][2] = "birch"
ans2[0][3] = "cherry"
ans2[0][4] = "chestnut"
ans2[0][5] = "koa"
ans2[0][6] = "mahogany"
ans2[0][7] = "maple"
ans2[0][8] = "oak"
ans2[0][9] = "poplar"
ans2[0][10] = "rosewood"
ans2[0][11] = "teak"
ans2[0][12] = "walnut"
ans2[0][13] = "elder"
ans2[0][14] = "aspen"
ans2[0][15] = "olive"
ans2[0][16] = "tulip"
ans2[0][17] = "yew"
ans2[0][18] = "holly"
ans2[0][19] = "ebony"
ans2[0][20] = "hawthorn"
ans2[1] = new Array()
ans2[1][0] = "Phoenix Feather"
ans2[1][1] = "Dragon Heartstring"
ans2[1][2] = "Veela Hair"
ans2[1][3] = "Unicorn Hair"
ans2[1][4] = "Gryffon Feather"
ans2[1][5] = "Kelpie Hair"
ans2[2] = new Array()
ans2[2][0] = "8"
ans2[2][1] = "9"
ans2[2][2] = "10"
ans2[2][3] = "10½"
ans2[2][4] = "11"
ans2[2][5] = "11½"
ans2[2][6] = "12"
ans2[2][7] = "12½"
ans2[2][8] = "13"
ans2[2][9] = "13½"
ans2[2][10] = "14"
ans2[2][11] = "14½"
ans2[2][12] = "15"
ans2[2][13] = "15½"
ans2[2][14] = "16"




var done = new Array()
var i = 0

function starttest()
{
	var inhtml = ""
	var t = 1
	
	for(o=0;o<ans1[i].length;o++)
	{
		 inhtml = inhtml + "<option value=" + ans1[i][o] + " id=" + t + ">" + ans1[i][o] + "</option>";
		 t++;
	}

	document.getElementById("questtable").innerHTML = "<div id=question>" + ques[i] + "</div><br>" +
		"<form name='awnser' id='awnser'><select name='color' id='color' size='1'>" + inhtml + "</select></form><br><br>" +
						                              "<input type='button' name='butt' id='butt' value='Submit Answer' width='100' height='30' onClick='javascript:getanswer()'>";
	
	
	
}


function getanswer()
{
	done[i] = document.awnser.color.options.selectedIndex
	
	i++
	if(i + 1>ques.length)
		{
			var inhtml = ""
			inhtml =  "<center><a href=http://www.diagonalley.5u.com/ollivanders/index.html><img src=http://i76.photobucket.com/albums/j35/pandora_6666/ollivanders/" + ans2[0][done[1]] + ".gif border=0></a><br><table width=292 style='border: 2px groove #000000; background-color: #FFFFFF;' border=2 cellspacing=0 cellpadding=0><tr><td align='center'><font size=4 style='text-transform: capitalize;'>Wood type: " + ans2[0][done[1]] + "<br>Length: " + ans2[2][done[4]] + " inches <br>Core: " + ans2[1][done[2]] + "</font><P><a href=http://www.diagonalley.5u.com/ollivanders/index.html><font size=5 style='text-transform: capitalize;'>get your own wand!</font></a></td></tr></table></center><br>"
			
			document.getElementById("questtable").innerHTML = inhtml + "<center><textarea name= cols= rows=4>" + inhtml + "</textarea><P><a href=wand.html>Learn More About Your Wand</a></center>"
			
		}
	else
		{
			starttest()
		}
	
	
		
		
}