// JavaScript Document

// Quiz Data
//  Array structure: questions text, Yes destination, No destination
var current = 0;
var question = 
	[["You'd rather spend the day kicking soccer balls than strolling through a museum.", 4, 1],
	["You are such an organizational queen you could be the spokesmodel for Ms. Perfect Teen, USA.", 5, 2],
	["You believe in love at first sight.", 6, 3],
	["You tend to lose your temper and act impulsively.", 7, 6],
	["You know you're good-looking, but you've got better things to do than spend your time on make-up and fussy clothes.", 8, 5],
	["Sometimes people have a hard time seeing past your good looks to the real you.", 9, 6],
	["When watching a movie, you notice the cinematography over the hot guy.", 10, 7],
	["You are very up-to-date with the latest fashion trends.", 11, 4],
	["When you see something (or someone) you want, you go for it!", 12, 9],
	["You love your friends more than you can say, but somehow they know it anyway.", 13, 10],
	["You tend to find friends in unexpected places and unlikely people.", 14, 11],
	["You develop crushes easily and can be seen as a little boy crazy.", 15, 13]];
	
function display_question(x) {
	document.getElementById("question_box").innerHTML = question[x][0];
	}

function next_question(answer) {
	if (answer == 0) current = question[current][1];
	else if (answer == 1) current = question[current][2];
	
	switch (current) {
		case 12: 
			document.getElementById("quiz_submit").style.display="none";
			document.getElementById("question_box").innerHTML = '<h1>Bridget</h1> <div id="icon"><img src="http://www.randomhouse.com/teens/sisterhoodcentral/images/ICON_Superstar.gif" width="185" height="185" border="0" /></div><p class=h1>You are an aggressive go-getter who sometimes bites off more than you can chew, but life for you is about pushing boundaries. You exude confidence and like being the center of attention. Your friends enjoy being around you.</p><a href="quiz_only.html">Take the quiz again</a>';			
			break;	
		case 13:
			document.getElementById("quiz_submit").style.display="none";
			document.getElementById("question_box").innerHTML = '<h1>Lena</h1><img src="http://www.randomhouse.com/teens/sisterhoodcentral/images/ICON_IcePrincess.gif" width="185" height="185" /><p class=h1>You are quiet and more reserved though people tend to admire you from afar. But despite your seemingly unapproachable exterior, your emotional well runs deep. You tend to excel in the arts and can always be trusted as a shoulder to cry on.</p><a href="quiz_only.html">Take the quiz again</a>';			
			break;
		case 14:
			document.getElementById("quiz_submit").style.display="none";
			document.getElementById("question_box").innerHTML = '<h1>Tibby</h1><img src="http://www.randomhouse.com/teens/sisterhoodcentral/images/ICON_Sweetheart.gif" width="185" height="185" /><p class=h1>On the surface it may seem like you don\'t have your stuff together, but you are an extraordinarily sensitive person who\'s able to see people for who they really are. You are an extremely loyal and loving individual despite outside appearances.</p><a href="quiz_only.html">Take the quiz again</a>';			
			break;
		case 15:
			document.getElementById("quiz_submit").style.display="none";
			document.getElementById("question_box").innerHTML = '<h1>Carmen</h1><img src="http://www.randomhouse.com/teens/sisterhoodcentral/images/ICON_Firecracker.gif" width="185" height="185" /><p class=h1>Your fiery personality and sense of fashion make you stand out. People who mess with you will soon find themselves put in their place. You love philosophy and psycho-chatter, so your friends can always count on you for words of wisdom.</p><a href="quiz_only.html">Take the quiz again</a>';			
			break;
		default:
			display_question(current);
			}
	}
	