/*--------------------------------------------------------------------------

  FILE:  JavaScript/tests/cartoon_char.js
  Date:  May 2, 2001

  Which cartoon character are you?

1-a 4      2-a 2       3-a 2      4-a 4        5-a 5
1-b 2      2-b 1       3- b 1     4-b 5       5-b 4
1-c 5      2-c 4       3-c 3      4-c 3        5-c 2
1-d 1      2-d 5       3-d 4      4-d 2       5-d 1
1-e 3      2-e 3       3-e 5      4-e 1        5-e 3

6-a 1      7-a 3       8-a 1      9-a 4      10-a 5
6-b 5      7-b 2       8-b 3      9-b 5     10-b 2
6-c 3      7-c 1       8-c 2   !   9-c 1      10-c 1
6-d 2      7-d 4       8-d 4      9-d 2     10-d 3
6-e 4      7-e 5       8-e 5      9-e 3      10-e 4
--------------------------------------------------------------------------*/


function cartoonResult( form ) {

text = ""
missing = ""
total = 0

/* 4 2 5 1 3 */
if ( form.one[0].checked )
	total += 4
else if ( form.one[1].checked ) 
	total += 2
else if ( form.one[2].checked )
	total += 5
else if ( form.one[3].checked )
	total += 1
else if ( form.one[4].checked )
	total += 3
else 
	missing += " 1"


/* 2 1 4 5 3 */
if ( form.two[0].checked )
	total += 2
else if ( form.two[1].checked ) 
	total += 1
else if ( form.two[2].checked ) 
	total += 4
else if ( form.two[3].checked )
	total += 5
else if ( form.two[4].checked )
	total += 3
else 
	missing += " 2"


/* 2 1 3 4 5 */
if ( form.three[0].checked )
	total += 2
else if ( form.three[1].checked ) 
	total += 1
else if ( form.three[2].checked )
	total += 3
else if ( form.three[3].checked ) 
	total += 4
else if ( form.three[4].checked )
	total += 5
else 
	missing += " 3"


/* 4 5 3 2 1 */
if ( form.four[0].checked ) 
	total += 4
else if ( form.four[1].checked )
	total += 5
else if ( form.four[2].checked )
	total += 3
else if ( form.four[3].checked )
	total += 2
else if ( form.four[4].checked )
	total += 1
else 
	missing += " 4"


/* 5 4 2 1 3 */
if ( form.five[0].checked ) 
	total += 5
else if ( form.five[1].checked )
	total += 4
else if ( form.five[2].checked )
	total += 2
else if ( form.five[3].checked ) 
	total += 1
else if ( form.five[4].checked ) 
	total += 3
else 
	missing += " 5"


/* 1 5 3 2 4 */
if ( form.six[0].checked ) 
	total += 1
else if ( form.six[1].checked )
	total += 5
else if ( form.six[2].checked )
	total += 3
else if ( form.six[3].checked )
	total += 2
else if ( form.six[4].checked )
	total += 4
else 
	missing += " 6"


/* 3 2 1 4 5 */
if ( form.seven[0].checked ) 
	total += 3
else if ( form.seven[1].checked )
	total += 2
else if ( form.seven[2].checked )
	total += 1
else if ( form.seven[3].checked )
	total += 4
else if ( form.seven[4].checked ) 
	total += 5
else
	missing += " 7"


/* 1 3 2 4 5 */
if ( form.eight[0].checked ) 
	total += 1
else if ( form.eight[1].checked ) 
	total += 3
else if ( form.eight[2].checked ) 
	total += 2
else if ( form.eight[3].checked )
	total += 4
else if ( form.eight[4].checked )
	total += 5
else 
	missing += " 8"


/* 4 5 1 2 3 */
if ( form.nine[0].checked )
	total += 4
else if ( form.nine[1].checked )
	total += 5
else if ( form.nine[2].checked ) 
	total += 1
else if ( form.nine[3].checked ) 
	total += 2
else if ( form.nine[4].checked ) 
	total += 3
else 
	missing += " 9"


/* 5 2 1 3 4 */
if ( form.ten[0].checked )
	total += 5
else if ( form.ten[1].checked )
	total += 2
else if ( form.ten[2].checked ) 
	total += 1
else if ( form.ten[3].checked )
	total += 3
else if ( form.ten[4].checked )
	total += 4
else 
	missing += " 10"


// Tally up total.
if (total<=17) {
	text = "You are TAZ.\n\n"
	+ "You are wild and crazy and you know it.  You know how to have fun, \n"
	+ "you may take it to extremes.  You know what you are doing though,\n"
	+ "and are much in control of your own life.  People don't always see\n"
	+ "things your way, but that doesn't mean that you should do away with\n"
	+ "your beliefs.  Try to remember that your wild spirit can lead to\n"
	+ "hurting yourself and others."
} else if (total<=26) {
	text = "You are Bugs Bunny.\n\n"
	+ "You are fun, friendly, and popular.  You are a real crowd  pleaser.\n"
	+ "You have probably been out on the town your share of times, yet you\n"
	+ "come home with the values that your mother taught you.  Marriage and\n"
	+ "children are important to you, but only after you  have fun.  Don't\n"
	+ "let the people you please influence you to stray."
} else if (total<=34) {
	text = "You are Tweety.\n\n"
	+ "You are cute, and everyone loves you.  You are a best friend that\n"
	+ "no one takes the chance of losing.  You never hurt feelings and\n"
	+ "seldom have your own feelings hurt.  Life is a breeze.  You are\n"
	+ "witty, and calm most of the time.  Just keep clear of back stabbers,\n"
	+ "and you are worry-free."
} else if (total<=42) {
	text = "You are Peppe le Pew (without the smell).\n\n"
	+ "You are a lover.  Romance, flowers, and wine are all you need to\n"
	+ "enjoy yourself.  You are serious about all commitments.  A family\n"
	+ "person.  You call your Mom every Sunday, and never forget a Birthday.\n"
	+ "Don't let your passion for romance get confused with the real thing."
} else if (total<=50) {
	text = "Your are Speedy Gonzales.\n\n"
	+ "You are smart, a real thinker.  Every situation is approached with\n"
	+ "a plan.  You are very healthy in mind and body.  You teach strong\n"
	+ "family values.  Keep your feet planted in them, but don't over look\n"
	+ "a bad situation when it does happen."
} 

if (missing) {
	text = "\n\nFYI, you did not answer the following question(s):\n\n        " 
	+ missing + "\n\nThe above interpretations were incorrectly determined."
}

document.forms[1].displayCartoon.value = text

} 

/*
(10-17 points): You are TAZ
(18-26 points) You are Bugs Bunny
(27-34 points) You are Tweety
(35-42 points) You are Peppe Le Pew (without the smell)
(43-50 points) You are Speedy Gonzales
*/