function process()
{
var chop = 0;
var clever = 0;
var window = 0;
var sniper = 0;
var closet = 0;
var shopaholic = 0;
var f = document.f;
var i = 0;
for (i = 0; i < f.a.length; i++) if (f.a[i].checked) value = f.a[i].value;
if (value == "1") { chop++; }
if (value == "2") { clever++; }
if (value == "3") { window++; }
if (value == "4") { sniper++; }
if (value == "5") { closet++; }
if (value == "6") { shopaholic++; }
for (i = 0; i < f.b.length; i++) if (f.b[i].checked) value = f.b[i].value;
if (value == "1") { chop++; }
if (value == "2") { clever++; }
if (value == "3") { window++; }
if (value == "4") { sniper++; }
if (value == "5") { closet++; }
if (value == "6") { shopaholic++; }
for (i = 0; i < f.c.length; i++) if (f.c[i].checked) value = f.c[i].value;
if (value == "1") { chop++; }
if (value == "2") { clever++; }
if (value == "3") { window++; }
if (value == "4") { sniper++; }
if (value == "5") { closet++; }
if (value == "6") { shopaholic++; }
2007-10-09
00:16:50 ·
update #1
for (i = 0; i < f.d.length; i++) if (f.d[i].checked) value = f.d[i].value;
if (value == "1") { chop++; }
if (value == "2") { clever++; }
if (value == "3") { window++; }
if (value == "4") { sniper++; }
if (value == "5") { closet++; }
if (value == "6") { shopaholic++; }
for (i = 0; i < f.e.length; i++) if (f.e[i].checked) value = f.e[i].value;
if (value == "1") { chop++; }
if (value == "2") { clever++; }
if (value == "3") { window++; }
if (value == "4") { sniper++; }
if (value == "5") { closet++; }
if (value == "6") { shopaholic++; }
for (i = 0; i < f.f.length; i++) if (f.f[i].checked) value = f.f[i].value;
if (value == "1") { chop++; }
if (value == "2") { clever++; }
if (value == "3") { window++; }
if (value == "4") { sniper++; }
if (value == "5") { closet++; }
if (value == "6") { shopaholic++; }
2007-10-09
00:17:25 ·
update #2
for (i = 0; i < f.g.length; i++) if (f.g[i].checked) value = f.g[i].value;
if (value == "1") { chop++; }
if (value == "2") { clever++; }
if (value == "3") { window++; }
if (value == "4") { sniper++; }
if (value == "5") { closet++; }
if (value == "6") { shopaholic++; }
/* -------------------------------- */
i = 0;
var dupe = 0;
var out1 = "";
var out2 = "";
var out3 = "";
var output = "";
var error = 0;
var count = chop + clever + window + sniper + closet + shopaholic;
if (count < 7) { error = 1; }
if (chop > i) { out1 ="chop"; i = chop; }
if (clever == i) { i = clever; dupe++; out1 = "chop"; out2 = "clever"; }
if (clever > i) { out1 ="clever"; i = clever; dupe = 0; }
if (window == i) { i = window; dupe++; if (dupe == 1) { out2 = "window"; } if (dupe == 2) { out3 = "window"; } }
if (window > i) { out1 ="window"; i = window; dupe = 0; }
if (sniper == i) { i = sniper; dupe++; if (dupe == 1) { out2 = "sniper"; } if (dupe == 2) { out3 = "sniper"; } }
2007-10-09
00:18:31 ·
update #3
if (sniper > i) { out1 ="sniper"; i = sniper; dupe = 0; }
if (closet == i) { i = closet; dupe++; if (dupe == 1) { out2 = "closet"; } if (dupe == 2) { out3 = "closet"; } }
if (closet > i) { out1 ="closet"; i = closet; dupe = 0; }
if (shopaholic == i) { i = shopaholic; dupe++; if (dupe == 1) { out2 = "shopaholic"; } if (dupe == 2) { out3 = "shopaholic"; } }
if (shopaholic > i) { out1 ="shopaholic"; i = shopaholic; dupe = 0; }
if (out1 == "chop") {out1 = "Chop and change clicker";}
if (out2 == "chop") {out2 = "Chop and change clicker";}
if (out3 == "chop") {out3 = "Chop and change clicker";}
if (out1 == "clever") {out1 = "Clever clicker";}
if (out2 == "clever") {out2 = "Clever clicker";}
if (out3 == "clever") {out3 = "Clever clicker";}
if (out1 == "window") {out1 = "Window shopper";}
if (out2 == "window") {out2 = "Window shopper";}
if (out3 == "window") {out3 = "Window shopper";}
if (out1 == "sniper") {out1 = "Sniper shopper";}
if (out2 == "sniper") {out2 = "Sniper shopper";}
2007-10-09
00:19:04 ·
update #4
if (out3 == "sniper") {out3 = "Sniper shopper";}
if (out1 == "closet") {out1 = "Closet shopper";}
if (out2 == "closet") {out2 = "Closet shopper";}
if (out3 == "closet") {out3 = "Closet shopper";}
if (out1 == "shopaholic") {out1 = "Shopaholic";}
if (out2 == "shopaholic") {out2 = "Shopaholic";}
if (out3 == "shopaholic") {out3 = "Shopaholic";}
if (dupe == 0) { output = out1; }
if (dupe == 1) { output = out1 + " / " + out2; }
if (dupe == 2) { output = out1 + " / " + out2 + " / " + out3; }
if (error == 1) { output = "Please answer all questions"}
document.getElementById('score').innerHTML = "You are a " + output;
//}//close of process()
score = Math.round(score/numQues*100);
form.percentage.value = score + "%";
var correctAnswers = "";
for (i=1; i<=numQues; i++) {
correctAnswers += i + ". " + answers[i-1] + "\r\n";
}
form.solutions.value = correctAnswers;
}
2007-10-09
00:19:47 ·
update #5