var e=0;
var k=0;
var x=0;
var y=0;
var z=0;
var c=0;
var t=0;
var tt=0;
var ty=0;
var ct=0;
var stype="";
var ts=" qualities: ";
var words=new Array(40);
var typeA=new Array("0","Inner","Feeling","Concrete","Static");
var typeB=new Array("0","Outer","Reason","Abstract","Changing");
var keys=new Array("GUIDE","IMAGO","SHADOW","SPECTRE","SOUL","PERSONA","GIANT","DWARF","STATION","BATTLE","DESTINY");
var i=0;
var f=0;
var s=0;
var j=0;
var ix="";
var fx="";
var sx="";
var jx="";
var ip=0;
var fp=0;
var sp=0;
var jp=0;
var hold=0;

function begin(){
e=0;
k=0;
x=0;
y=0;
z=0;
c=0;
t=0;
ty=0;
tt=0;
ct=0;
i=0;
f=0;
s=0;
j=0;
ix="";
fx="";
sx="";
jx="";
ip=0;
fp=0;
sp=0;
jp=0;
stype="";
hold=0;
for (x=0;x<41;x++){
words[x]="";
}
document.forms.matrix.Messages.value="The Watchword Test will enable you to explore your psychological type and personality dynamics";
document.forms.matrix.Messages0.value="You should allow about 30 minutes to complete and fully interpret the test";
document.forms.matrix.Messages3.value="Use of this online test is entirely FREE and none of your data is collected by us";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Start";
document.forms.matrix.B2.disabled=true;
document.forms.matrix.B3.disabled=true;
document.forms.matrix.B2.value="";
document.forms.matrix.B3.value="";

document.forms.matrix.B4.disabled=true;
document.forms.matrix.B5.disabled=true;
document.forms.matrix.B6.disabled=true;

document.forms.matrix.B4.value="";
document.forms.matrix.B5.value="";
document.forms.matrix.B6.value="";

document.forms.matrix.Messages.style.fontSize="12pt";
clearmat();
clearcolors();
document.forms.matrix.Messages1.value="";
document.forms.matrix.Messages2.value="";

disabtrue();
clearcheck();
clearlabs();

}


function clearlabs(){

document.forms.matrix.J1.value="";
document.forms.matrix.J2.value="";
document.forms.matrix.J3.value="";
document.forms.matrix.J4.value="";
document.forms.matrix.J5.value="";
document.forms.matrix.J6.value="";
document.forms.matrix.J7.value="";
document.forms.matrix.J8.value="";

}

function clearcheck(){
document.forms.matrix.JT1[0].checked=false;
document.forms.matrix.JT1[1].checked=false;
document.forms.matrix.JT2[0].checked=false;
document.forms.matrix.JT2[1].checked=false;
document.forms.matrix.JT3[0].checked=false;
document.forms.matrix.JT3[1].checked=false;
document.forms.matrix.JT4[0].checked=false;
document.forms.matrix.JT4[1].checked=false;
}

function cleartypes(){
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Dynamics";
document.forms.matrix.B2.value="Type";
clearcheck();
clearlabs();
clearcolors();
disabtrue();
hold=0;
x=0;
i=0;
f=0;
s=0;
j=0;
}

function control(){
if (document.forms.matrix.B1.value==""){return;}

if (document.forms.matrix.B1.value=="Cancel"){clearcolors();cleartypes();clearlevs();display2();return;}

if (document.forms.matrix.B1.value=="Dynamics"){clearcolors();clearlevs();ty=2;tt=1;arch();return;}
if (ty==1){tt=2;types();return;}
if(t==1){return;}
t=1;
setTimeout("t=0;",1000);
document.forms.matrix.B1.disabled=true;
document.forms.matrix.B1.value="";
if (c==0){mat1();ct=0;c++;return;}
if (c==1){
if ((document.forms.matrix.M1.value=="")||(document.forms.matrix.M2.value=="")||(document.forms.matrix.M3.value=="")||(document.forms.matrix.M4.value=="")||(document.forms.matrix.M5.value=="")||(document.forms.matrix.M6.value=="")||(document.forms.matrix.M7.value=="")||(document.forms.matrix.M8.value=="")){alert("Please start again - you must write a word in all eight boxes");begin();return;}else{
mat2();ct=8;c++;return;
}
}

if (c==2){
if ((document.forms.matrix.M9.value=="")||(document.forms.matrix.M10.value=="")||(document.forms.matrix.M11.value=="")||(document.forms.matrix.M12.value=="")||(document.forms.matrix.M13.value=="")||(document.forms.matrix.M14.value=="")||(document.forms.matrix.M15.value=="")||(document.forms.matrix.M16.value=="")){alert("Please start this row again - you must write a word in all eight boxes");ct=8;secondrow();return;}else{
mat3();ct=16;c++;return;
}
}

if (c==3){if(document.forms.matrix.M17.value==""){document.forms.matrix.M17.value="17";alert("Please write a word in the box marked 17");ct=16;return;}else{mat4();ct=17;c++;return;}}
if (c==4){if(document.forms.matrix.M18.value==""){document.forms.matrix.M18.value="18";alert("Please write a word in the box marked 18");ct=17;return;}else{mat5();ct=18;c++;return;}}
if (c==5){if(document.forms.matrix.M19.value==""){document.forms.matrix.M19.value="19";alert("Please write a word in the box marked 19");ct=18;return;}else{mat6();ct=19;c++;return;}}
if (c==6){if(document.forms.matrix.M20.value==""){document.forms.matrix.M20.value="20";alert("Please write a word in the box marked 20");ct=19;return;}else{mat7();ct=20;c++;return;}}
if (c==7){if(document.forms.matrix.M21.value==""){document.forms.matrix.M21.value="21";alert("Please write a word in the box marked 21");ct=20;return;}else{mat8();ct=21;c++;return;}}
if (c==8){if(document.forms.matrix.M22.value==""){document.forms.matrix.M22.value="22";alert("Please write a word in the box marked 22");ct=21;return;}else{mat9();ct=22;c++;return;}}
if (c==9){if(document.forms.matrix.M23.value==""){document.forms.matrix.M23.value="23";alert("Please write a word in the box marked 23");ct=22;return;}else{mat10();ct=23;c++;return;}}
if (c==10){if(document.forms.matrix.M24.value==""){document.forms.matrix.M24.value="24";alert("Please write a word in the box marked 24");ct=23;return;}else{mat11();ct=24;c++;return;}}
if (c==11){if(document.forms.matrix.M25.value==""){document.forms.matrix.M25.value="25";alert("Please write a word in the box marked 25");ct=24;return;}else{mat12();ct=25;c++;return;}}
if (c==12){if(document.forms.matrix.M26.value==""){document.forms.matrix.M26.value="26";alert("Please write a word in the box marked 26");ct=25;return;}else{mat13();ct=26;c++;return;}}
if (c==13){if(document.forms.matrix.M27.value==""){document.forms.matrix.M27.value="27";alert("Please write a word in the box marked 27");ct=26;return;}else{mat14();ct=27;c++;return;}}
if (c==14){if(document.forms.matrix.M28.value==""){document.forms.matrix.M28.value="28";alert("Please write a word in the box marked 28");ct=27;return;}else{mat15();ct=28;c++;return;}}
if (c==15){if(document.forms.matrix.M29.value==""){document.forms.matrix.M29.value="29";alert("Please write a word in the box marked 29");ct=28;return;}else{mat16();ct=29;c++;return;}}
if (c==16){if(document.forms.matrix.M30.value==""){document.forms.matrix.M30.value="30";alert("Please write a word in the box marked 30");ct=29;return;}else{mat17();ct=30;c++;return;}}
if (c==17){if(document.forms.matrix.M31.value==""){document.forms.matrix.M31.value="31";alert("Please write a word in the box marked 31");ct=30;return;}else{mat18();ct=31;c++;return;}}
if (c==18){if(document.forms.matrix.M32.value==""){document.forms.matrix.M32.value="32";alert("Please write a word in the box marked 32");ct=31;return;}else{mat19();ct=32;c++;return;}}
if (c==19){if(document.forms.matrix.M33.value==""){document.forms.matrix.M33.value="33";alert("Please write a word in the box marked 33");ct=32;return;}else{mat20();ct=33;c++;return;}}
if (c==20){if(document.forms.matrix.M34.value==""){document.forms.matrix.M34.value="34";alert("Please write a word in the box marked 34");ct=33;return;}else{mat21();ct=34;c++;return;}}
if (c==21){if(document.forms.matrix.M35.value==""){document.forms.matrix.M35.value="35";alert("Please write a word in the box marked 35");ct=34;return;}else{mat22();ct=35;c++;return;}}
}


function arch(){
setkeynos();
document.forms.matrix.Messages.style.fontSize="14pt";
document.forms.matrix.Messages.value="Click the highlighted boxes to explore your key dynamics";
document.forms.matrix.Messages0.value="The numbers indicate the suggested order in which you should consider your words";
document.forms.matrix.Messages3.value="";
document.forms.matrix.Messages1.value="DISCLAIMER: The analyses provided are NOT formal psychological assessments and should be used only to support self-exploration";
document.forms.matrix.Messages2.value="No warranty is given regarding the accuracy of these analyses, nor their suitability for any purpose";

document.forms.matrix.B2.value="Type";
document.forms.matrix.B1.disabled=true;
document.forms.matrix.B1.value="";
setlime();
}

function setkeynos(){
document.forms.matrix.M31.value="1";
document.forms.matrix.M32.value="2";
document.forms.matrix.M29.value="3";
document.forms.matrix.M30.value="4";
document.forms.matrix.M25.value="5";
document.forms.matrix.M26.value="6";
document.forms.matrix.M27.value="7";
document.forms.matrix.M28.value="8";
document.forms.matrix.M33.value="9";
document.forms.matrix.M34.value="10";
document.forms.matrix.M35.value="11";
}

function showkey(){
document.forms.matrix.Messages.style.fontSize="14pt";
document.forms.matrix.Messages.value="Your "+keys[k-25]+" = ' "+words[k]+" '";
document.forms.matrix.B2.value="Type";
showinterp();
}

function showinterp(){
document.forms.matrix.Messages1.value="";
if(k==25){document.forms.matrix.Messages0.value="GUIDE represents the principle of INNER PROGRESSION in your personality or situation";
document.forms.matrix.Messages3.value="GUIDE typically indicates your higher intuitions, inner sense of goodness and rightness, or unconscious power";
}

if(k==26){document.forms.matrix.Messages0.value="IMAGO represents the principle of OUTER PROGRESSION in your personality or situation";
document.forms.matrix.Messages3.value="IMAGO typically indicates your ego-ideals, conscious values, goals or needs, or an imagined future situation";;
}

if(k==27){document.forms.matrix.Messages0.value="SHADOW represents the principle of INNER REGRESSION in your personality or situation";
document.forms.matrix.Messages3.value="SHADOW typically indicates your hidden side, qualities you have failed to develop, or irrational sensitivities";
}

if(k==28){document.forms.matrix.Messages0.value="SPECTRE represents the principle of OUTER REGRESSION in your personality or situation";
document.forms.matrix.Messages3.value="SPECTRE typically indicates difficulties, anxieties or conscious dislikes, or areas where help is sought or needed";
}

if(k==29){document.forms.matrix.Messages0.value="SOUL represents the principle of INWARDNESS in your personality or situation";
document.forms.matrix.Messages3.value="SOUL typically indicates your private thoughts and feelings, or your basic inner personality";
}

if(k==30){document.forms.matrix.Messages0.value="PERSONA represents the principle of OUTWARDNESS in your personality or situation";
document.forms.matrix.Messages3.value="PERSONA typically indicates the way you express yourself publicly, your social roles, or basic outer personality";
}

if(k==31){document.forms.matrix.Messages0.value="GIANT represents the principle of PROGRESSION in your personality or situation";
document.forms.matrix.Messages3.value="GIANT typically indicates your driving forces, creative impulses, or features that are carrying you forward";
}

if(k==32){document.forms.matrix.Messages0.value="DWARF represents the principle of REGRESSION in your personality or situation";
document.forms.matrix.Messages3.value="DWARF typically indicates your inertial tendencies, weaknesses, or features that are holding you back";
}

if(k==33){document.forms.matrix.Messages0.value="STATION represents the principle of INNER-OUTER BALANCE in your personality or situation";
document.forms.matrix.Messages3.value="STATION typically indicates your basic style or approach to life, general emotional quality, or identity issues";
}

if(k==34){document.forms.matrix.Messages0.value="BATTLE represents the principle of PROGRESSIVE-REGRESSIVE TENSION in your personality or situation";
document.forms.matrix.Messages3.value="BATTLE typically indicates your personal task or quest, an area of moral conflict, or a battle to be fought";
}

if(k==35){document.forms.matrix.Messages0.value="DESTINY represents the principle of FINAL RESOLUTION in your personality or situation";
document.forms.matrix.Messages3.value="DESTINY typically indicates an anticipated final outcome, ultimate achievement, or what is needed for change";
}
document.forms.matrix.Messages1.value="To interpret your word, you should carefully consider its meaning, together with its possible associations, in the light of the key principle and suggested indications";
document.forms.matrix.Messages2.value="It is important, and often necessary, to explore the potential symbolism of your words in order to fully appreciate their psychological significance";
}

function setlime(){
document.forms.matrix.M25.style.backgroundColor="lime";
document.forms.matrix.M26.style.backgroundColor="lime";
document.forms.matrix.M27.style.backgroundColor="lime";
document.forms.matrix.M28.style.backgroundColor="lime";
document.forms.matrix.M29.style.backgroundColor="lime";
document.forms.matrix.M30.style.backgroundColor="lime";
document.forms.matrix.M31.style.backgroundColor="lime";
document.forms.matrix.M32.style.backgroundColor="lime";
document.forms.matrix.M33.style.backgroundColor="lime";
document.forms.matrix.M34.style.backgroundColor="lime";
document.forms.matrix.M35.style.backgroundColor="lime";
}


function types2(){
clearlevs();
clearcolors();
printkey0();
document.forms.matrix.B2.value="Back";
if((ix=="I")&&(sx=="S")&&(fx=="F")&(jx=="J")){isfj();}
if((ix=="I")&&(sx=="S")&&(fx=="F")&(jx=="P")){isfp();}
if((ix=="I")&&(sx=="S")&&(fx=="T")&(jx=="J")){istj();}
if((ix=="I")&&(sx=="S")&&(fx=="T")&(jx=="P")){istp();}
if((ix=="I")&&(sx=="N")&&(fx=="F")&(jx=="J")){infj();}
if((ix=="I")&&(sx=="N")&&(fx=="F")&(jx=="P")){infp();}
if((ix=="I")&&(sx=="N")&&(fx=="T")&(jx=="J")){intj();}
if((ix=="I")&&(sx=="N")&&(fx=="T")&(jx=="P")){intp();}
if((ix=="E")&&(sx=="S")&&(fx=="F")&(jx=="J")){esfj();}
if((ix=="E")&&(sx=="S")&&(fx=="F")&(jx=="P")){esfp();}
if((ix=="E")&&(sx=="S")&&(fx=="T")&(jx=="J")){estj();}
if((ix=="E")&&(sx=="S")&&(fx=="T")&(jx=="P")){estp();}
if((ix=="E")&&(sx=="N")&&(fx=="F")&(jx=="J")){enfj();}
if((ix=="E")&&(sx=="N")&&(fx=="F")&(jx=="P")){enfp();}
if((ix=="E")&&(sx=="N")&&(fx=="T")&(jx=="J")){entj();}
if((ix=="E")&&(sx=="N")&&(fx=="T")&(jx=="P")){entp();}
}

function isfj(){
document.forms.matrix.Messages0.value="Your scores:      Introverted ("+String(ip)+"%)      Sensing ("+String(sp)+"%)      Feeling ("+String(fp)+"%)      Judging ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ISFJ"+ts+"Loyal, helpful, trusting, conventional, hardworking";
document.forms.matrix.Messages3.value="Keirsey Role Type: Conservator-Protector (Securing)";
}

function isfp(){
document.forms.matrix.Messages0.value="Your scores:   Introverted ("+String(ip)+"%)      Sensing ("+String(sp)+"%)      Feeling ("+String(fp)+"%)      Perceiving ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ISFP"+ts+"Realistic, discriminating, practical, adaptable";
document.forms.matrix.Messages3.value="Keirsey Role Type: Entertainer-Composer (Synthesizing)";
}

function istj(){
document.forms.matrix.Messages0.value="Your scores:   Introverted ("+String(ip)+"%)      Sensing ("+String(sp)+"%)      Thinking ("+String(fp)+"%)      Judging ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ISTJ"+ts+"Analytical, logical, factual, decisive, punctual";
document.forms.matrix.Messages3.value="Keirsey Role Type: Administrator-Inspector (Certifying)";
}

function istp(){
document.forms.matrix.Messages0.value="Your scores:   Introverted ("+String(ip)+"%)      Sensing ("+String(sp)+"%)      Thinking ("+String(fp)+"%)      Perceiving ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ISTP"+ts+"Practical interests, well-organised, efficient";
document.forms.matrix.Messages3.value="Keirsey Role Type: Operator-Crafter (Instrumenting)";
}

function infj(){
document.forms.matrix.Messages0.value="Your scores:   Introverted ("+String(ip)+"%)      Intuitive ("+String(sp)+"%)      Feeling ("+String(fp)+"%)      Judging ("+String(jp)+"%)";
document.forms.matrix.Messages.value="INFJ"+ts+"Purposeful, helping the needy, crusading";
document.forms.matrix.Messages3.value="Keirsey Role Type: Mentor-Counselor (Guiding)";
}

function infp(){
document.forms.matrix.Messages0.value="Your scores:   Introverted ("+String(ip)+"%)      Intuitive ("+String(sp)+"%)      Feeling ("+String(fp)+"%)      Perceiving ("+String(jp)+"%)";
document.forms.matrix.Messages.value="INFP"+ts+"Imaginative, fantasy-prone, optimistic, enthusiastic";
document.forms.matrix.Messages3.value="Keirsey Role Type: Advocate-Healer (Conciliating)";
}

function intj(){
document.forms.matrix.Messages0.value="Your scores:   Introverted ("+String(ip)+"%)      Intuitive ("+String(sp)+"%)      Thinking ("+String(fp)+"%)      Judging ("+String(jp)+"%)";
document.forms.matrix.Messages.value="INTJ"+ts+"Independent, private, perfectionist, innovative";
document.forms.matrix.Messages3.value="Keirsey Role Type: Coordinator-Mastermind (Entailing)";
}

function intp(){
document.forms.matrix.Messages0.value="Your scores:   Introverted ("+String(ip)+"%)      Intuitive ("+String(sp)+"%)      Thinking ("+String(fp)+"%)      Perceiving ("+String(jp)+"%)";
document.forms.matrix.Messages.value="INTP"+ts+"Precise, intellectual, curious, principled";
document.forms.matrix.Messages3.value="Keirsey Role Type: Engineer-Architect (Designing)";
}

function esfj(){
document.forms.matrix.Messages0.value="Your scores:   Extraverted ("+String(ip)+"%)      Sensing ("+String(sp)+"%)      Feeling ("+String(fp)+"%)      Judging ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ESFJ"+ts+"Sociable, good life, generous, emotional, conservative";
document.forms.matrix.Messages3.value="Keirsey Role Type: Conservator-Provider (Supplying)";
}

function esfp(){
document.forms.matrix.Messages0.value="Your scores:   Extraverted ("+String(ip)+"%)      Sensing ("+String(sp)+"%)      Feeling ("+String(fp)+"%)      Perceiving ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ESFP"+ts+"Fun-loving, impulsive, sensation-seeking, friendly";
document.forms.matrix.Messages3.value="Keirsey Role Type: Entertainer-Performer (Demonstrating)";
}

function estj(){
document.forms.matrix.Messages0.value="Your scores:   Extraverted ("+String(ip)+"%)      Sensing ("+String(sp)+"%)      Thinking ("+String(fp)+"%)      Judging ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ESTJ"+ts+"Matter-of-fact, rule-following, deliberate, orthodox";
document.forms.matrix.Messages3.value="Keirsey Role Type: Administrator-Supervisor (Enforcing)";
}

function estp(){
document.forms.matrix.Messages0.value="Your scores:   Extraverted ("+String(ip)+"%)      Sensing ("+String(sp)+"%)      Thinking ("+String(fp)+"%)      Perceiving ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ESTP"+ts+"Proactive, competitive, spontaneous, good judgment";
document.forms.matrix.Messages3.value="Keirsey Role Type: Operator-Promoter (Persuading)";
}

function enfj(){
document.forms.matrix.Messages0.value="Your scores:   Extraverted ("+String(ip)+"%)      Intuitive ("+String(sp)+"%)      Feeling ("+String(fp)+"%)      Judging ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ENFJ"+ts+"Big picture, insightful, charismatic, benevolent";
document.forms.matrix.Messages3.value="Keirsey Role Type: Mentor-Teacher (Educating)";
}

function enfp(){
document.forms.matrix.Messages0.value="Your scores:   Extraverted ("+String(ip)+"%)      Intuitive ("+String(sp)+"%)      Feeling ("+String(fp)+"%)      Perceiving ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ENFP"+ts+"Charming, outgoing, attention-seeking, unconventional";
document.forms.matrix.Messages3.value="Keirsey Role Type: Advocate-Champion (Motivating)";
}

function entj(){
document.forms.matrix.Messages0.value="Your scores:   Extraverted ("+String(ip)+"%)      Intuitive ("+String(sp)+"%)      Thinking ("+String(fp)+"%)      Judging ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ENTJ"+ts+"Planner, organiser, director, problem-solving";
document.forms.matrix.Messages3.value="Keirsey Role Type: Coordinator-Fieldmarshal (Mobilizing)";
}

function entp(){
document.forms.matrix.Messages0.value="Your scores:   Extraverted ("+String(ip)+"%)      Intuitive ("+String(sp)+"%)      Thinking ("+String(fp)+"%)      Perceiving ("+String(jp)+"%)";
document.forms.matrix.Messages.value="ENTP"+ts+"Ingenious, quick-witted, enjoys games, argumentative";
document.forms.matrix.Messages3.value="Keirsey Role Type: Engineer-Inventor (Devising)";
}

function checkrats(){
if((document.forms.matrix.JT1[0].checked==false)&&(document.forms.matrix.JT1[1].checked==false)){alert("Please select 'Inner' or 'Outer'");hold=1;return;}
if((document.forms.matrix.JT2[0].checked==false)&&(document.forms.matrix.JT2[1].checked==false)){alert("Please select 'Feeling' or 'Reason'");hold=1;;return;}
if((document.forms.matrix.JT3[0].checked==false)&&(document.forms.matrix.JT3[1].checked==false)){alert("Please select 'Concrete' or 'Abstract'");hold=1;return;}
if((document.forms.matrix.JT4[0].checked==false)&&(document.forms.matrix.JT4[1].checked==false)){alert("Please select 'Static' or 'Changing'");hold=1;return;}
incrtypes();
}

function disablevs(){
document.forms.matrix.B4.disabled=true;
document.forms.matrix.B5.disabled=true;
document.forms.matrix.B6.disabled=true;
document.forms.matrix.B4.value="";
document.forms.matrix.B5.value="";
document.forms.matrix.B6.value="";
}

function incrtypes(){
if(document.forms.matrix.JT1[0].checked==true){i++;}
if(document.forms.matrix.JT2[0].checked==true){f++;}
if(document.forms.matrix.JT3[0].checked==true){s++;}
if(document.forms.matrix.JT4[0].checked==true){j++;}
}

function clearlevs(){
document.forms.matrix.B4.disabled=false;
document.forms.matrix.B5.disabled=true;
document.forms.matrix.B6.disabled=true;
document.forms.matrix.B4.disabled=false;
document.forms.matrix.B4.value="Levels";
document.forms.matrix.B5.value="";
document.forms.matrix.B6.value="";

}

function types(){
if(e==1){return;}
if(t==1){return;}
disablevs();
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Cancel";
if(document.forms.matrix.B2.value=="Next"){checkrats();
if(hold==1){hold=0;return;}
}

printkey0();
t=1;
setTimeout("t=0;",1000);
clearcolors();

disabfalse();
clearcheck();


document.forms.matrix.Messages3.value="";
document.forms.matrix.Messages2.value="";

x++;

if(x>11){x=1;gotype();e=1;return;}

document.forms.matrix.B2.value="Next";

document.forms.matrix.Messages.style.fontSize="14pt";
document.forms.matrix.Messages.value=words[24+x];
document.forms.matrix.Messages1.value="";
document.forms.matrix.Messages2.value="";
document.forms.matrix.Messages3.value="(i.e., select Inner or Outer, Feeling or Reason, Concrete or Abstract, and Static or Changing)";

setcolors();

document.forms.matrix.J1.value=typeA[1];
document.forms.matrix.J2.value=typeB[1];
document.forms.matrix.J3.value=typeA[2];
document.forms.matrix.J4.value=typeB[2];
document.forms.matrix.J5.value=typeA[3];
document.forms.matrix.J6.value=typeB[3];
document.forms.matrix.J7.value=typeA[4];
document.forms.matrix.J8.value=typeB[4];

document.forms.matrix.Messages0.value="Choose the idea from each pair which, in your opinion, best describes the word shown above, then click Next";
document.forms.matrix.Messages1.value="You will do this for all eleven words inside the central rectangle. Click 'Cancel' if you wish to do this later";

}

function disabfalse(){
document.forms.matrix.Radio1.disabled=false;
document.forms.matrix.Radio2.disabled=false;
document.forms.matrix.Radio3.disabled=false;
document.forms.matrix.Radio4.disabled=false;
document.forms.matrix.Radio5.disabled=false;
document.forms.matrix.Radio6.disabled=false;
document.forms.matrix.Radio7.disabled=false;
document.forms.matrix.Radio8.disabled=false;
}

function disabtrue(){
document.forms.matrix.Radio1.disabled=true;
document.forms.matrix.Radio2.disabled=true;
document.forms.matrix.Radio3.disabled=true;
document.forms.matrix.Radio4.disabled=true;
document.forms.matrix.Radio5.disabled=true;
document.forms.matrix.Radio6.disabled=true;
document.forms.matrix.Radio7.disabled=true;
document.forms.matrix.Radio8.disabled=true;
}

function clearcolors(){
document.forms.matrix.M1.style.backgroundColor="white";
document.forms.matrix.M2.style.backgroundColor="white";
document.forms.matrix.M3.style.backgroundColor="white";
document.forms.matrix.M4.style.backgroundColor="white";
document.forms.matrix.M5.style.backgroundColor="white";
document.forms.matrix.M6.style.backgroundColor="white";
document.forms.matrix.M7.style.backgroundColor="white";
document.forms.matrix.M8.style.backgroundColor="white";
document.forms.matrix.M9.style.backgroundColor="white";
document.forms.matrix.M10.style.backgroundColor="white";
document.forms.matrix.M11.style.backgroundColor="white";
document.forms.matrix.M12.style.backgroundColor="white";
document.forms.matrix.M13.style.backgroundColor="white";
document.forms.matrix.M14.style.backgroundColor="white";
document.forms.matrix.M15.style.backgroundColor="white";
document.forms.matrix.M16.style.backgroundColor="white";
document.forms.matrix.M17.style.backgroundColor="white";
document.forms.matrix.M18.style.backgroundColor="white";
document.forms.matrix.M19.style.backgroundColor="white";
document.forms.matrix.M20.style.backgroundColor="white";
document.forms.matrix.M21.style.backgroundColor="white";
document.forms.matrix.M22.style.backgroundColor="white";
document.forms.matrix.M23.style.backgroundColor="white";
document.forms.matrix.M24.style.backgroundColor="white";
document.forms.matrix.M25.style.backgroundColor="white";
document.forms.matrix.M26.style.backgroundColor="white";
document.forms.matrix.M27.style.backgroundColor="white";
document.forms.matrix.M28.style.backgroundColor="white";
document.forms.matrix.M29.style.backgroundColor="white";
document.forms.matrix.M30.style.backgroundColor="white";
document.forms.matrix.M31.style.backgroundColor="white";
document.forms.matrix.M32.style.backgroundColor="white";
document.forms.matrix.M33.style.backgroundColor="white";
document.forms.matrix.M34.style.backgroundColor="white";
document.forms.matrix.M35.style.backgroundColor="white";
}

function setcolors(){
if(x==1){document.forms.matrix.M25.style.backgroundColor="lime";}
if(x==2){document.forms.matrix.M26.style.backgroundColor="lime";}
if(x==3){document.forms.matrix.M27.style.backgroundColor="lime";}
if(x==4){document.forms.matrix.M28.style.backgroundColor="lime";}
if(x==5){document.forms.matrix.M29.style.backgroundColor="lime";}
if(x==6){document.forms.matrix.M30.style.backgroundColor="lime";}
if(x==7){document.forms.matrix.M31.style.backgroundColor="lime";}
if(x==8){document.forms.matrix.M32.style.backgroundColor="lime";}
if(x==9){document.forms.matrix.M33.style.backgroundColor="lime";}
if(x==10){document.forms.matrix.M34.style.backgroundColor="lime";}
if(x==11){document.forms.matrix.M35.style.backgroundColor="lime";}
}


function gotype(){
disabtrue();
clearcheck();
clearlabs();
clearlevs();
clearcolors();
printkey0();
document.forms.matrix.Messages3.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Dynamics";
if(i<6){ix="E";ip=Math.ceil(((11-i)*100)/11);}else{ix="I";ip=Math.ceil((i*100)/11);}
if(f<6){fx="T";fp=Math.ceil(((11-f)*100)/11);}else{fx="F";fp=Math.ceil((f*100)/11);}
if(s<6){sx="N";sp=Math.ceil(((11-s)*100)/11);}else{sx="S";sp=Math.ceil((s*100)/11);}
if(j<6){jx="P";jp=Math.ceil(((11-j)*100)/11);}else{jx="J";jp=Math.ceil((j*100)/11);}
document.forms.matrix.Messages.style.fontSize="14pt";
document.forms.matrix.Messages.value="Your responses suggest that your Watchword Type is:  "+ix+" "+sx+" "+fx+" "+jx;
stype="";
if(ix=="E"){stype=stype+"Extraverted ";}
if(ix=="I"){stype=stype+"Introverted ";}
if(sx=="N"){stype=stype+" Intuitive ";}
if(sx=="S"){stype=stype+" Sensing ";}
if(fx=="T"){stype=stype+" Thinking ";}
if(fx=="F"){stype=stype+" Feeling ";}
if(jx=="P"){stype=stype+" Perceiving";}
if(jx=="J"){stype=stype+" Judging";}
document.forms.matrix.Messages0.value="This means that your psychological tendencies are:  "+stype; 
document.forms.matrix.Messages3.value="Click 'More' for further information on your type";
document.forms.matrix.Messages1.value="DISCLAIMER: This analysis is NOT a formal psychological assessment and should be used only to support self-exploration. No warranty is given regarding the";
document.forms.matrix.Messages2.value="accuracy of this analysis, nor its suitability for any purpose. Please note that Watchword Type is not always consistent with other measures of Jungian Type";
document.forms.matrix.B2.value="More";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Dynamics";
}

function back(){
if(document.forms.matrix.B2.value==""){return;}
if (document.forms.matrix.B2.value=="More"){types2();return;}
if (document.forms.matrix.B2.value=="Type"){ty=1;x=0;y=1;if(e==1){gotype();return;}}
if (document.forms.matrix.B2.value=="Type"){types();return;}
if (document.forms.matrix.B2.value=="Back"){gotype();return;}
if (document.forms.matrix.B2.value=="Next"){types();return;}
begin();
}

function mat0(){
begin();
}

function mat1(){
clearmat();
document.forms.matrix.Messages.value="Take a few moments to relax and clear your mind";
document.forms.matrix.Messages0.value="Then write eight different words (any words at all), from left to right, in boxes 1 - 8";
document.forms.matrix.Messages3.value="Do not write a phrase or sentence - just write eight separate words. Then click Next";
document.forms.matrix.Messages1.value="Hint: You can use the TAB key to move from one box to the next";
document.forms.matrix.M1.value="1";
document.forms.matrix.M2.value="2";
document.forms.matrix.M3.value="3";
document.forms.matrix.M4.value="4";
document.forms.matrix.M5.value="5";
document.forms.matrix.M6.value="6";
document.forms.matrix.M7.value="7";
document.forms.matrix.M8.value="8";
document.forms.matrix.B1.disabled=true;
document.forms.matrix.B1.value="";
document.forms.matrix.B2.value="";
}

function mat2(){
words[1]=document.forms.matrix.M1.value;
words[2]=document.forms.matrix.M2.value;
words[3]=document.forms.matrix.M3.value;
words[4]=document.forms.matrix.M4.value;
words[5]=document.forms.matrix.M5.value;
words[6]=document.forms.matrix.M6.value;
words[7]=document.forms.matrix.M7.value;
words[8]=document.forms.matrix.M8.value;
secondrow();
}

function secondrow(){
clearmat();
document.forms.matrix.Messages.value="Now write ANOTHER eight different words (any words), from left to right, in boxes 9 - 16";
document.forms.matrix.Messages0.value="Do not write a phrase or sentence - just write eight separate words. Then click Next";
document.forms.matrix.Messages3.value="";
document.forms.matrix.M9.value="9";
document.forms.matrix.M10.value="10";
document.forms.matrix.M11.value="11";
document.forms.matrix.M12.value="12";
document.forms.matrix.M13.value="13";
document.forms.matrix.M14.value="14";
document.forms.matrix.M15.value="15";
document.forms.matrix.M16.value="16";
}

function mat3(){
words[9]=document.forms.matrix.M9.value;
words[10]=document.forms.matrix.M10.value;
words[11]=document.forms.matrix.M11.value;
words[12]=document.forms.matrix.M12.value;
words[13]=document.forms.matrix.M13.value;
words[14]=document.forms.matrix.M14.value;
words[15]=document.forms.matrix.M15.value;
words[16]=document.forms.matrix.M16.value;
clearmat();
document.forms.matrix.Messages.value="Now think of another word that, in your opinion, SOMEHOW CONNECTS the two words shown";
document.forms.matrix.Messages0.value="The connection can be anything that makes sense to you. Don't worry if someone else might not understand it";
document.forms.matrix.Messages3.value="Write the connecting word in box 17. Then click Next";
document.forms.matrix.Messages1.value="You can write a word that you have used elsewhere, but it should be different from the two words you are connecting"; 
document.forms.matrix.M1.value=words[1];
document.forms.matrix.M2.value=words[2];
document.forms.matrix.M17.value="17";
}

function mat4(){
words[17]=document.forms.matrix.M17.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 18. Then click Next";
document.forms.matrix.M3.value=words[3];
document.forms.matrix.M4.value=words[4];
document.forms.matrix.M18.value="18";
}

function mat5(){
words[18]=document.forms.matrix.M18.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 19. Then click Next";
document.forms.matrix.M5.value=words[5];
document.forms.matrix.M6.value=words[6];
document.forms.matrix.M19.value="19";
}

function mat6(){
words[19]=document.forms.matrix.M19.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 20. Then click Next";
document.forms.matrix.M7.value=words[7];
document.forms.matrix.M8.value=words[8];
document.forms.matrix.M20.value="20";
}

function mat7(){
words[20]=document.forms.matrix.M20.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 21. Then click Next";
document.forms.matrix.M9.value=words[9];
document.forms.matrix.M10.value=words[10];
document.forms.matrix.M21.value="21";
}

function mat8(){
words[21]=document.forms.matrix.M21.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 22. Then click Next";
document.forms.matrix.M11.value=words[11];
document.forms.matrix.M12.value=words[12];
document.forms.matrix.M22.value="22";
}

function mat9(){
words[22]=document.forms.matrix.M22.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 23. Then click Next";
document.forms.matrix.M13.value=words[13];
document.forms.matrix.M14.value=words[14];
document.forms.matrix.M23.value="23";
}

function mat10(){
words[23]=document.forms.matrix.M23.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 24. Then click Next";
document.forms.matrix.M15.value=words[15];
document.forms.matrix.M16.value=words[16];
document.forms.matrix.M24.value="24";
}

function mat11(){
words[24]=document.forms.matrix.M24.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 25. Then click Next";
document.forms.matrix.M17.value=words[17];
document.forms.matrix.M18.value=words[18];
document.forms.matrix.M25.value="25";
}

function mat12(){
words[25]=document.forms.matrix.M25.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 26. Then click Next";
document.forms.matrix.M19.value=words[19];
document.forms.matrix.M20.value=words[20];
document.forms.matrix.M26.value="26";
}

function mat13(){
words[26]=document.forms.matrix.M26.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 27. Then click Next";
document.forms.matrix.M21.value=words[21];
document.forms.matrix.M22.value=words[22];
document.forms.matrix.M27.value="27";
}

function mat14(){
words[27]=document.forms.matrix.M27.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 28. Then click Next";
document.forms.matrix.M23.value=words[23];
document.forms.matrix.M24.value=words[24];
document.forms.matrix.M28.value="28";
}

function mat15(){
words[28]=document.forms.matrix.M28.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 29. Then click Next";
document.forms.matrix.M25.value=words[25];
document.forms.matrix.M27.value=words[27];
document.forms.matrix.M29.value="29";
}

function mat16(){
words[29]=document.forms.matrix.M29.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 30. Then click Next";
document.forms.matrix.M26.value=words[26];
document.forms.matrix.M28.value=words[28];
document.forms.matrix.M30.value="30";
}

function mat17(){
words[30]=document.forms.matrix.M30.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 31. Then click Next";
document.forms.matrix.M25.value=words[25];
document.forms.matrix.M26.value=words[26];
document.forms.matrix.M31.value="31";
}

function mat18(){
words[31]=document.forms.matrix.M31.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 32. Then click Next";
document.forms.matrix.M27.value=words[27];
document.forms.matrix.M28.value=words[28];
document.forms.matrix.M32.value="32";
}

function mat19(){
words[32]=document.forms.matrix.M32.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 33. Then click Next";
document.forms.matrix.M29.value=words[29];
document.forms.matrix.M30.value=words[30];
document.forms.matrix.M33.value="33";
}

function mat20(){
words[33]=document.forms.matrix.M33.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 34. Then click Next";
document.forms.matrix.M31.value=words[31];
document.forms.matrix.M32.value=words[32];
document.forms.matrix.M34.value="34";
}

function mat21(){
words[34]=document.forms.matrix.M34.value;
clearmat();
document.forms.matrix.Messages3.value="Write the connecting word in box 35. Then click Next";
document.forms.matrix.M33.value=words[33];
document.forms.matrix.M34.value=words[34];
document.forms.matrix.M35.value="35";
}

function mat22(){
words[35]=document.forms.matrix.M35.value;
display();
}

function display(){
document.forms.matrix.Messages.style.fontSize="12pt";
document.forms.matrix.M1.value=words[1];
document.forms.matrix.M2.value=words[2];
document.forms.matrix.M3.value=words[3];
document.forms.matrix.M4.value=words[4];
document.forms.matrix.M5.value=words[5];
document.forms.matrix.M6.value=words[6];
document.forms.matrix.M7.value=words[7];
document.forms.matrix.M8.value=words[8];
document.forms.matrix.M9.value=words[9];
document.forms.matrix.M10.value=words[10];
document.forms.matrix.M11.value=words[11];
document.forms.matrix.M12.value=words[12];
document.forms.matrix.M13.value=words[13];
document.forms.matrix.M14.value=words[14];
document.forms.matrix.M15.value=words[15];
document.forms.matrix.M16.value=words[16];
document.forms.matrix.M17.value=words[17];
document.forms.matrix.M18.value=words[18];
document.forms.matrix.M19.value=words[19];
document.forms.matrix.M20.value=words[20];
document.forms.matrix.M21.value=words[21];
document.forms.matrix.M22.value=words[22];
document.forms.matrix.M23.value=words[23];
document.forms.matrix.M24.value=words[24];
document.forms.matrix.M25.value=words[25];
document.forms.matrix.M26.value=words[26];
document.forms.matrix.M27.value=words[27];
document.forms.matrix.M28.value=words[28];
document.forms.matrix.M29.value=words[29];
document.forms.matrix.M30.value=words[30];
document.forms.matrix.M31.value=words[31];
document.forms.matrix.M32.value=words[32];
document.forms.matrix.M33.value=words[33];
document.forms.matrix.M34.value=words[34];
document.forms.matrix.M35.value=words[35];
document.forms.matrix.B3.value="Reset";
document.forms.matrix.Messages.value="You have successfully completed the Watchword Matrix !";
document.forms.matrix.Messages0.value="Your full set of words is shown. Click 'Dynamics' to explore your personality dynamics, or";
document.forms.matrix.Messages3.value="'Type' to assess your psychological type, or 'Levels' to explore the levels of word association";
document.forms.matrix.Messages1.value="If you wish to keep a record of your words, you may print out this page";
document.forms.matrix.Messages2.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Dynamics";
document.forms.matrix.B2.disabled=false;
document.forms.matrix.B3.disabled=false;
document.forms.matrix.B4.disabled=false;
document.forms.matrix.B2.value="Type";
document.forms.matrix.B4.disabled=false;
document.forms.matrix.B4.value="Levels";
}

function display2(){
document.forms.matrix.Messages.style.fontSize="12pt";
document.forms.matrix.Messages.value="You have successfully completed the Watchword Matrix !";
document.forms.matrix.Messages0.value="Your full set of words is shown. Click 'Dynamics' to explore your personality dynamics, or";
document.forms.matrix.Messages3.value="'Type' to assess your psychological type, or 'Levels' to explore the levels of word association";
document.forms.matrix.Messages1.value="If you wish to keep a record of your words, you may print out this page";
document.forms.matrix.Messages2.value="";
}

function clearmat(){
document.forms.matrix.M1.value="";
document.forms.matrix.M2.value="";
document.forms.matrix.M3.value="";
document.forms.matrix.M4.value="";
document.forms.matrix.M5.value="";
document.forms.matrix.M6.value="";
document.forms.matrix.M7.value="";
document.forms.matrix.M8.value="";
document.forms.matrix.M9.value="";
document.forms.matrix.M10.value="";
document.forms.matrix.M11.value="";
document.forms.matrix.M12.value="";
document.forms.matrix.M13.value="";
document.forms.matrix.M14.value="";
document.forms.matrix.M15.value="";
document.forms.matrix.M16.value="";
document.forms.matrix.M17.value="";
document.forms.matrix.M18.value="";
document.forms.matrix.M19.value="";
document.forms.matrix.M20.value="";
document.forms.matrix.M21.value="";
document.forms.matrix.M22.value="";
document.forms.matrix.M23.value="";
document.forms.matrix.M24.value="";
document.forms.matrix.M25.value="";
document.forms.matrix.M26.value="";
document.forms.matrix.M27.value="";
document.forms.matrix.M28.value="";
document.forms.matrix.M29.value="";
document.forms.matrix.M30.value="";
document.forms.matrix.M31.value="";
document.forms.matrix.M32.value="";
document.forms.matrix.M33.value="";
document.forms.matrix.M34.value="";
document.forms.matrix.M35.value="";
}

function printkey(){
if (k==25){document.forms.matrix.M25.style.backgroundColor="yellow";document.forms.matrix.M25.value=words[k];}
if (k==26){document.forms.matrix.M26.style.backgroundColor="yellow";document.forms.matrix.M26.value=words[k];}
if (k==27){document.forms.matrix.M27.style.backgroundColor="yellow";document.forms.matrix.M27.value=words[k];}
if (k==28){document.forms.matrix.M28.style.backgroundColor="yellow";document.forms.matrix.M28.value=words[k];}
if (k==29){document.forms.matrix.M29.style.backgroundColor="yellow";document.forms.matrix.M29.value=words[k];}
if (k==30){document.forms.matrix.M30.style.backgroundColor="yellow";document.forms.matrix.M30.value=words[k];}
if (k==31){document.forms.matrix.M31.style.backgroundColor="yellow";document.forms.matrix.M31.value=words[k];}
if (k==32){document.forms.matrix.M32.style.backgroundColor="yellow";document.forms.matrix.M32.value=words[k];}
if (k==33){document.forms.matrix.M33.style.backgroundColor="yellow";document.forms.matrix.M33.value=words[k];}
if (k==34){document.forms.matrix.M34.style.backgroundColor="yellow";document.forms.matrix.M34.value=words[k];}
if (k==35){document.forms.matrix.M35.style.backgroundColor="yellow";document.forms.matrix.M35.value=words[k];}
}

function printkey0(){
document.forms.matrix.M25.value=words[25];
document.forms.matrix.M26.value=words[26];
document.forms.matrix.M27.value=words[27];
document.forms.matrix.M28.value=words[28];
document.forms.matrix.M29.value=words[29];
document.forms.matrix.M30.value=words[30];
document.forms.matrix.M31.value=words[31];
document.forms.matrix.M32.value=words[32];
document.forms.matrix.M33.value=words[33];
document.forms.matrix.M34.value=words[34];
document.forms.matrix.M35.value=words[35];
}

function cl(z){
if((ty==2)&&(z>24)){k=z;printkey();showkey();return;}

if(ct==0){
if ((z==1)&&(document.forms.matrix.M1.value=="1")){document.forms.matrix.M1.value="";}else{return;}
}

if(ct==1){
if ((z==2)&&(document.forms.matrix.M2.value=="2")){document.forms.matrix.M2.value="";}else{return;}
}

if(ct==2){
if ((z==3)&&(document.forms.matrix.M3.value=="3")){document.forms.matrix.M3.value="";}else{return;}
}

if(ct==3){
if ((z==4)&&(document.forms.matrix.M4.value=="4")){document.forms.matrix.M4.value="";}else{return;}
}

if(ct==4){
if ((z==5)&&(document.forms.matrix.M5.value=="5")){document.forms.matrix.M5.value="";}else{return;}
}

if(ct==5){
if ((z==6)&&(document.forms.matrix.M6.value=="6")){document.forms.matrix.M6.value="";}else{return;}
}

if(ct==6){
if ((z==7)&&(document.forms.matrix.M7.value=="7")){document.forms.matrix.M7.value="";}else{return;}
}

if(ct==7){
if ((z==8)&&(document.forms.matrix.M8.value=="8")){document.forms.matrix.M8.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==8){
if ((z==9)&&(document.forms.matrix.M9.value=="9")){document.forms.matrix.M9.value="";}else{return;}
}

if(ct==9){
if ((z==10)&&(document.forms.matrix.M10.value=="10")){document.forms.matrix.M10.value="";}else{return;}
}

if(ct==10){
if ((z==11)&&(document.forms.matrix.M11.value=="11")){document.forms.matrix.M11.value="";}else{return;}
}

if(ct==11){
if ((z==12)&&(document.forms.matrix.M12.value=="12")){document.forms.matrix.M12.value="";}else{return;}
}

if(ct==12){
if ((z==13)&&(document.forms.matrix.M13.value=="13")){document.forms.matrix.M13.value="";}else{return;}
}

if(ct==13){
if ((z==14)&&(document.forms.matrix.M14.value=="14")){document.forms.matrix.M14.value="";}else{return;}
}

if(ct==14){
if ((z==15)&&(document.forms.matrix.M15.value=="15")){document.forms.matrix.M15.value="";}else{return;}
}

if(ct==15){
if ((z==16)&&(document.forms.matrix.M16.value=="16")){document.forms.matrix.M16.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==16){
if ((z==17)&&(document.forms.matrix.M17.value=="17")){document.forms.matrix.M17.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==17){
if ((z==18)&&(document.forms.matrix.M18.value=="18")){document.forms.matrix.M18.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==18){
if ((z==19)&&(document.forms.matrix.M19.value=="19")){document.forms.matrix.M19.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==19){
if ((z==20)&&(document.forms.matrix.M20.value=="20")){document.forms.matrix.M20.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==20){
if ((z==21)&&(document.forms.matrix.M21.value=="21")){document.forms.matrix.M21.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==21){
if ((z==22)&&(document.forms.matrix.M22.value=="22")){document.forms.matrix.M22.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==22){
if ((z==23)&&(document.forms.matrix.M23.value=="23")){document.forms.matrix.M23.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==23){
if ((z==24)&&(document.forms.matrix.M24.value=="24")){document.forms.matrix.M24.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==24){
if ((z==25)&&(document.forms.matrix.M25.value=="25")){document.forms.matrix.M25.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==25){
if ((z==26)&&(document.forms.matrix.M26.value=="26")){document.forms.matrix.M26.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==26){
if ((z==27)&&(document.forms.matrix.M27.value=="27")){document.forms.matrix.M27.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==27){
if ((z==28)&&(document.forms.matrix.M28.value=="28")){document.forms.matrix.M28.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==28){
if ((z==29)&&(document.forms.matrix.M29.value=="29")){document.forms.matrix.M29.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==29){
if ((z==30)&&(document.forms.matrix.M30.value=="30")){document.forms.matrix.M30.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==30){
if ((z==31)&&(document.forms.matrix.M31.value=="31")){document.forms.matrix.M31.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==31){
if ((z==32)&&(document.forms.matrix.M32.value=="32")){document.forms.matrix.M32.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==32){
if ((z==33)&&(document.forms.matrix.M33.value=="33")){document.forms.matrix.M33.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==33){
if ((z==34)&&(document.forms.matrix.M34.value=="34")){document.forms.matrix.M34.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}

if(ct==34){
if ((z==35)&&(document.forms.matrix.M35.value=="35")){document.forms.matrix.M35.value="";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Next";
}else{return;}
}
ct++;
}

function levels(){
if(document.forms.matrix.B4.value!="Levels"){return;}
display();
document.forms.matrix.Messages1.value="DISCLAIMER: The analyses provided are NOT formal psychological assessments and should be used only to support self-exploration";
document.forms.matrix.Messages2.value="No warranty is given regarding the accuracy of these analyses, nor their suitability for any purpose";
document.forms.matrix.B1.disabled=false;
document.forms.matrix.B1.value="Dynamics";
document.forms.matrix.B2.value="Type";
document.forms.matrix.Messages.style.fontSize="14pt";
document.forms.matrix.B6.disabled=false;
document.forms.matrix.B6.value=">>";
document.forms.matrix.B5.disabled=false;
document.forms.matrix.B5.value="<<";
lev1();
}

function lev1(){
clearcolors();
document.forms.matrix.M1.style.backgroundColor="lime";
document.forms.matrix.M2.style.backgroundColor="lime";
document.forms.matrix.M3.style.backgroundColor="lime";
document.forms.matrix.M4.style.backgroundColor="lime";
document.forms.matrix.M5.style.backgroundColor="lime";
document.forms.matrix.M6.style.backgroundColor="lime";
document.forms.matrix.M7.style.backgroundColor="lime";
document.forms.matrix.M8.style.backgroundColor="lime";
document.forms.matrix.M9.style.backgroundColor="lime";
document.forms.matrix.M10.style.backgroundColor="lime";
document.forms.matrix.M11.style.backgroundColor="lime";
document.forms.matrix.M12.style.backgroundColor="lime";
document.forms.matrix.M13.style.backgroundColor="lime";
document.forms.matrix.M14.style.backgroundColor="lime";
document.forms.matrix.M15.style.backgroundColor="lime";
document.forms.matrix.M16.style.backgroundColor="lime";
document.forms.matrix.B4.disabled=true;
document.forms.matrix.B4.value="Level 1";
document.forms.matrix.Messages.value="Your Level 1 words now shown in green";
document.forms.matrix.Messages0.value="These first level words indicate aspects of immediate or superficial concern";
document.forms.matrix.Messages3.value="Quite typically, they refer to sensory experience or to the material, external world";
}

function levback(){
if(document.forms.matrix.B5.value==""){return;}
if(document.forms.matrix.B4.value=="Level 1"){lev0();return;}
if(document.forms.matrix.B4.value=="Level 2"){lev1();return;}
if(document.forms.matrix.B4.value=="Level 3"){lev2();return;}
if(document.forms.matrix.B4.value=="Level 4"){lev3();return;}
if(document.forms.matrix.B4.value=="Level 5"){lev4();return;}
if(document.forms.matrix.B4.value=="Level 6"){lev5();return;}
}

function levforw(){
if(document.forms.matrix.B6.value==""){return;}
if(document.forms.matrix.B4.value=="Level 1"){lev2();return;}
if(document.forms.matrix.B4.value=="Level 2"){lev3();return;}
if(document.forms.matrix.B4.value=="Level 3"){lev4();return;}
if(document.forms.matrix.B4.value=="Level 4"){lev5();return;}
if(document.forms.matrix.B4.value=="Level 5"){lev6();return;}
}

function lev0(){
clearcolors();
document.forms.matrix.B5.disabled=true;
document.forms.matrix.B6.disabled=true;
document.forms.matrix.B4.disabled=false;
document.forms.matrix.B4.value="Levels";
document.forms.matrix.B5.value="";
document.forms.matrix.B6.value="";
display2();
}


function lev2(){
clearcolors();
document.forms.matrix.M17.style.backgroundColor="lime";
document.forms.matrix.M18.style.backgroundColor="lime";
document.forms.matrix.M19.style.backgroundColor="lime";
document.forms.matrix.M20.style.backgroundColor="lime";
document.forms.matrix.M21.style.backgroundColor="lime";
document.forms.matrix.M22.style.backgroundColor="lime";
document.forms.matrix.M23.style.backgroundColor="lime";
document.forms.matrix.M24.style.backgroundColor="lime";
document.forms.matrix.B4.disabled=true;
document.forms.matrix.B4.value="Level 2";
document.forms.matrix.Messages.value="Your Level 2 words now shown in green";
document.forms.matrix.Messages0.value="These second level words represent common elements in your immediate experience";
document.forms.matrix.Messages3.value="Quite typically, they refer to features that preoccupy your mind at the present moment";
}

function lev3(){
clearcolors();
document.forms.matrix.M25.style.backgroundColor="lime";
document.forms.matrix.M26.style.backgroundColor="lime";
document.forms.matrix.M27.style.backgroundColor="lime";
document.forms.matrix.M28.style.backgroundColor="lime";
document.forms.matrix.B4.disabled=true;
document.forms.matrix.B4.value="Level 3";
document.forms.matrix.Messages.value="Your Level 3 words now shown in green";
document.forms.matrix.Messages0.value="These third level words represent subjective responses to events and experiences";
document.forms.matrix.Messages3.value="Quite typically, they may indicate significant personal interests or aversions";
}

function lev4(){
clearcolors();
document.forms.matrix.M29.style.backgroundColor="lime";
document.forms.matrix.M30.style.backgroundColor="lime";
document.forms.matrix.M31.style.backgroundColor="lime";
document.forms.matrix.M32.style.backgroundColor="lime";
document.forms.matrix.B4.disabled=true;
document.forms.matrix.B4.value="Level 4";
document.forms.matrix.Messages.value="Your Level 4 words now shown in green";
document.forms.matrix.Messages0.value="These fourth level words represent psychological dynamics of change and development";
document.forms.matrix.Messages3.value="Quite typically, this may include an assessment of your personal virtues and vices";
}

function lev5(){
clearcolors();
document.forms.matrix.M33.style.backgroundColor="lime";
document.forms.matrix.M34.style.backgroundColor="lime";
document.forms.matrix.B4.disabled=true;
document.forms.matrix.B4.value="Level 5";
document.forms.matrix.B6.disabled=false;
document.forms.matrix.B6.value=">>";

document.forms.matrix.Messages.value="Your Level 5 words now shown in green";
document.forms.matrix.Messages0.value="These fifth level words represent elements of opposition or support in your personal development";
document.forms.matrix.Messages3.value="Quite typically, they may indicate areas of personal conflct, struggle or achievement";

}

function lev6(){
clearcolors();
document.forms.matrix.M35.style.backgroundColor="lime";
document.forms.matrix.B4.disabled=true;
document.forms.matrix.B4.value="Level 6";
document.forms.matrix.B6.disabled=true;
document.forms.matrix.B6.value="";

document.forms.matrix.Messages.value="Your final Level 6 word now shown in green";
document.forms.matrix.Messages0.value="This final word represents the realization of an ultimate value or condition";
document.forms.matrix.Messages3.value="Quite typically, this word encapsulates an important goal or ideal situation";

}
