<!-- GET2 Quiz - Author: Dr Sally Caird -->

/***********************************************
* JavaScriptKit.com Multiple Choice Quiz Script (http://www.javascriptkit.com)
* Copyright 2003 JavaScript Kit- http://www.javascriptkit.com
* This notice and footnote must stay intact for use
* Visit JavaScript Kit (http://www.javascriptkit.com/) for full source code
***********************************************/

//Enter total number of questions:
var totalquestions=54;

//Enter the solutions corresponding to each question:
var correctchoices=new Array();
correctchoices[1]= 'b'; 
correctchoices[2]= 'a'; 
correctchoices[3]= 'b';
correctchoices[4]= 'a';
correctchoices[5]= 'b';
correctchoices[6]= 'a';
correctchoices[7]= 'b';
correctchoices[8]= 'a';
correctchoices[9]= 'b';
correctchoices[10]='a';
correctchoices[11]='b';
correctchoices[12]='a';
correctchoices[13]='b';
correctchoices[14]='a';
correctchoices[15]='b';
correctchoices[16]='a';
correctchoices[17]='b';
correctchoices[18]='a';
correctchoices[19]='b';
correctchoices[20]='a';
correctchoices[21]='b';
correctchoices[22]='a';
correctchoices[23]='b';
correctchoices[24]='a';
correctchoices[25]='b';
correctchoices[26]='a';
correctchoices[27]='b';
correctchoices[28]='a';
correctchoices[29]='b';
correctchoices[30]='a';
correctchoices[31]='b';
correctchoices[32]='a';
correctchoices[33]='b';
correctchoices[34]='a';
correctchoices[35]='b';
correctchoices[36]='a';
correctchoices[37]='b';
correctchoices[38]='a';
correctchoices[39]='b';
correctchoices[40]='a';
correctchoices[41]='b';
correctchoices[42]='a';
correctchoices[43]='b';
correctchoices[44]='a';
correctchoices[45]='b';
correctchoices[46]='a';
correctchoices[47]='b';
correctchoices[48]='a';
correctchoices[49]='b';
correctchoices[50]='a';
correctchoices[51]='b';
correctchoices[52]='a';
correctchoices[53]='b';
correctchoices[54]='a';

var score=new Array();
score[1] = 1;
score[2] = 1;
score[3] = 1;
score[4] = 1;
score[5] = 1;
score[6] = 1;
score[7] = 1;
score[8] = 1;
score[9] = 1;
score[10]= 1;
score[11]= 1;
score[12]= 1;
score[13]= 1;
score[14]= 1;
score[15]= 1;
score[16]= 1;
score[17]= 1;
score[18]= 1;
score[19]= 1;
score[20]= 1;
score[21]= 1;
score[22]= 1;
score[23]= 1;
score[24]= 1;
score[25]= 1;
score[26]= 1;
score[27]= 1;
score[28]= 1;
score[29]= 1;
score[30]= 1;
score[31]= 1;
score[32]= 1;
score[33]= 1;
score[34]= 1;
score[35]= 1;
score[36]= 1;
score[37]= 1;
score[38]= 1;
score[39]= 1;
score[40]= 1;
score[41]= 1;
score[42]= 1;
score[43]= 1;
score[44]= 1;
score[45]= 1;
score[46]= 1;
score[47]= 1;
score[48]= 1;
score[49]= 1;
score[50]= 1;
score[51]= 1;
score[52]= 1;
score[53]= 1;
score[54]= 1;

// Total= 54, of which:
// Achievement      - 12
// Autonomy         - 6
// Creativetendency - 12
// Risktaking       - 12
// Locusofcontrol   - 12

var classification=new Array();
classification[1]= 'Achievement';
classification[2]= 'Risktaking';
classification[3]= 'Autonomy';
classification[4]= 'Locusofcontrol';
classification[5]= 'Creativetendency';
classification[6]= 'Achievement';
classification[7]= 'Locusofcontrol';
classification[8]= 'Creativetendency';
classification[9]= 'Risktaking';
classification[10]='Achievement';
classification[11]='Risktaking';
classification[12]='Autonomy';
classification[13]='Locusofcontrol';
classification[14]='Creativetendency';
classification[15]='Achievement';
classification[16]='Locusofcontrol';
classification[17]='Creativetendency';
classification[18]='Risktaking';
classification[19]='Achievement';
classification[20]='Risktaking';
classification[21]='Autonomy';
classification[22]='Locusofcontrol';
classification[23]='Creativetendency';
classification[24]='Achievement';
classification[25]='Locusofcontrol';
classification[26]='Creativetendency';
classification[27]='Risktaking';
classification[28]='Achievement';
classification[29]='Risktaking';
classification[30]='Autonomy';
classification[31]='Locusofcontrol';
classification[32]='Creativetendency';
classification[33]='Achievement';
classification[34]='Locusofcontrol';
classification[35]='Creativetendency';
classification[36]='Risktaking';
classification[37]='Achievement';
classification[38]='Risktaking';
classification[39]='Autonomy';
classification[40]='Locusofcontrol';
classification[41]='Creativetendency';
classification[42]='Achievement';
classification[43]='Locusofcontrol';
classification[44]='Creativetendency';
classification[45]='Risktaking';
classification[46]='Achievement';
classification[47]='Risktaking';
classification[48]='Autonomy';
classification[49]='Locusofcontrol';
classification[50]='Creativetendency';
classification[51]='Achievement';
classification[52]='Locusofcontrol';
classification[53]='Creativetendency';
classification[54]='Risktaking';

///////////////////////////////////////

///////////////////////////////////////
// Function: gradeit()
// Purpose: Score the quiz
///////////////////////////////////////
function gradeit(){
var _incorrect=null // _incorrect is a private variable only used this function
var actualchoices=new Array();
for (q=1;q<=totalquestions;q++){
    var thequestion=eval("document.myquiz.question"+q)
    for (c=0;c<thequestion.length;c++){
        if (thequestion[c].checked==true)
          actualchoices[q]=thequestion[c].value
    }
	if (actualchoices[q]!=correctchoices[q]){ // process an incorrect choice
        if (_incorrect==null)
          _incorrect=q // first time around
        else
          _incorrect+="/"+q // q= list will be all the incorrect answers
    }
}

if (_incorrect==null)
    _incorrect="a/b"
    document.cookie='q='+_incorrect // _incorrect passed by reference to cookie
if (document.cookie=='')
    alert("Your browser does not accept cookies. Please adjust your browser settings to allow GET2 to operate correctly.")
else
	window.location="results.htm"
}
