Need assistance - About.com Personality Quiz Script
<p>Hello I am a beginner at writing javascripts and I need help with this script that can be found at <a href="http://javascript.about.com/library/blnpquiza.htm" rel="nofollow">http://javascript.about.com/library/blnpquiza.htm</a>. It is a simple personality quiz script which was easy to install. The only problem is I installed it on my blogspot and this script relies on .htm pages to show results after the user finishes the quiz. Since I can't have pages in my blogspot directory is there some way this script can be modified to instead of calculating results and displaying them on pages within my sites directory, display the results on different urls. For example something like PersonalityQuizResultA.blogspot.com PersonalityQuizResultB.blogspot.com PersonalityQuizResultC.blogspot.com etc.. </p>

<p>Here is my personal test script</p>

<pre><code>
var quizArray = [
'What is your favorite Color?~red~blue~white~purple~pink~~~',
'What is your favorite movie?~stell~movie~doie~lksk~lurk~~~'
];

var resPage = 'ABCDE';
var qpp = 2; // questions per page to display

(function(quizArray,qpp,resPage) {var perPage = 0; var n1 = 475; var n2 = 13;function randOrd(){return (Math.round(Math.random())-0.5);}
var qsParm = []; function qs() {var query = window.location.search.substring(1); var parms = query.split('&'); for (var i=0; i 0) {var key = parms[i].substring(0,pos); var val = parms[i].substring(pos+1); qsParm[key] = val;}}} qsParm['qnum'] = 0;  qsParm['fin'] = 0;  qsParm['aa'] = 0; qsParm['bb'] = 0; qsParm['cc'] = 0; qsParm['dd'] = 0; qsParm['ee'] = 0; qsParm['ff'] = 0; qsParm['gg'] = 0; qsParm['hh'] = 0; var cntarry = []; qs(); var qnum = qsParm['qnum']; cntarry[0] = qsParm['aa']%n1; cntarry[1] = qsParm['bb']%n1; cntarry[2] = qsParm['cc']%n1;  cntarry[3] = qsParm['dd']%n1; cntarry[4] = qsParm['ee']%n1; cntarry[5] = qsParm['ff']%n1; cntarry[6] = qsParm['gg']%n1; cntarry[7] = qsParm['hh']%n1;
var pageLoaded = 0; window.onload = function() {pageLoaded = 1;}; function loaded(i,f) {if (document.getElementById && document.getElementById(i) != null) f(); else if (!pageLoaded) setTimeout('loaded(\''+i+'\','+f+')',100);} loaded('quiz'+qpp,loadQuiz);
function loadQuiz() {if (qnum>=quizArray.length) displayResult(); else {displayQuiz(ent = document.getElementById('quiz1'),qnum++); for(var j=2; j >'); newB.appendChild(newTb); ent.appendChild(newB);}}
function displayQuiz(ent,qnum) {perPage++; var qna = quizArray[qnum].split('~');
var od = []; for (var i = 1; qna[i] != null && qna[i] != ''; i++) od.push(i); od.sort( randOrd ); od.sort( randOrd ); var newF = document.createElement("form"); var newDq = document.createElement("div"); newDq.className = 'question'; newDq.appendChild(document.createTextNode(Number(qnum+1)+ ': ' +qna[0])); newF.appendChild(newDq); newDq = document.createElement("div"); newDq.className = 'answers'; for (var i = 1; qna[i] != null && qna[i] != ''; i++) {var newDa = document.createElement("label"); newDa.htmlFor = 'a'+qnum+i; /*@cc_on @if (@_jscript) var newR = document.createElement(""); @else */ var newR = document.createElement("input"); newR.name = 'a'+qnum; /* @end @*/ newR.type = 'radio'; newR.id = 'a'+qnum+i; newR.value = od[i-1]; newDa.appendChild(newR); newDa.appendChild(document.createTextNode(' '+qna[od[i-1]]+' ')); newDq.appendChild(newDa);} newF.appendChild(newDq); document.getElementById('quiz'+perPage).appendChild(newF);}
function displayResult() {var res = []; var mx = Math.max(cntarry[0],cntarry[1],cntarry[2],cntarry[3],cntarry[4],cntarry[5],cntarry[6],cntarry[7]); for (var i = cntarry.length-1; i >= 0; i--) {if (cntarry[i] == mx) res.push(i);} var ch = String.fromCharCode(res[Math.floor(Math.random()*res.length)]+64); resPage = resPage + ch + '.htm';  var newP = document.createElement("p");newP.style.textAlign = 'center'; var newB = document.createElement("b"); newB.appendChild(document.createTextNode('Congratulations.')); newB.appendChild(document.createElement("br")); newB.appendChild(document.createTextNode(' You have completed the quiz.')); newP.appendChild(newB); newP.appendChild(document.createElement("br")); newP.appendChild(document.createElement("br")); var newL = document.createElement("a");newL.href = resPage; newL.appendChild(document.createTextNode('Your Results')); newP.appendChild(newL); document.getElementById('quiz1').appendChild(newP); var newC = document.createElement("button"); newC.style.styleFloat = 'right'; newC.onclick = function() {nextPage(0);return false;}; newC.appendChild(document.createTextNode('Try Again')); document.getElementById('quiz1').appendChild(newC);}
function checkAnswer(e,c){for (var i=1; document.getElementById(e+i); i++) {if (document.getElementById(e+i).checked) c[+document.getElementById(e+i).value--]++;} return c;}
function nextPage(qnum) {for (var i=qnum-perPage; i  0)  nxt += '?qnum='+ qnum +'&aa='+cntarry[0]+'&bb='+cntarry[1]+'&cc='+cntarry[2]+'&dd='+cntarry[3]+'&ee='+cntarry[4]+'&ff='+cntarry[5]+'&gg='+cntarry[6]+'&hh='+cntarry[7]; if (qnum >= quizArray.length) nxt += '&fin=1'; top.location.href = nxt;}
function encryptResult(c) {for (var i = c.length-1; i >= 0; i--) {p = Math.floor((Math.random() * n2) + 2); c[i] = (p * n1) +c[i]; } return c;}
})(quizArray,qpp,resPage);
</code></pre>

<p>Thank you in advance for any help or advice you can give.</p>
