<!-- Copy from <html> below THROUGH the </html>, way below, 
and Paste into 
NotePad or SimpleText and Save As
cpScorer.htm -- while having the bottom textbox set to All Files 
OR put cpScorer.htm in quotes: "cpScorer.htm"

<html>
<head>
<meta name="robots" content="noindex,nofollow">
<title>JavaScript Universal Test/Inventory Scorer</title>

<script language="javascript">
var myArray;
var pssArray = new Array();
var fpssArray = new Array();
var ansArray = new Array();
var results = new Array();
var noIS = 0;
var whStr = 0;
var time = 1;
var impStr;
var myRegEx1;
var b;
var theLet = new Array("x","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z");
var fval = "";
var myRegEx2;
var temp = new Array();
var temp2;
var ssLines = new Array();
var l;


function DoIt()

temp[0] = new Array("hi","there");
ansArray[0] = "a";
if(time>1)
{
DoIt2();

document.form2.myTextarea.value = fval;
return;

}
else
{
impStr = document.form2.myTextarea.value

temp2= new Array();
if(navigator.appVersion.indexOf("Win") != -1)
{myRegEx1 = /\n/;}
else{myRegEx1 = /\r/;}
b = impStr.split(myRegEx1)
myArray = new Array(b.length);
myRegEx2 = /\b.*\b/


for (var i=0; i<b.length; i++)
{

myArray[i] = b[i];
myArray[i] = myRegEx2.exec(myArray[i])

}

for (var i=0; i<myArray.length; i++)
{


if((myArray[i]).toString().length == 3)
{

ssLines[noIS] = whStr;
temp[noIS] = temp2;

fpssArray = temp;
noIS += 1;
whStr = 0;
temp2 = new Array("hi","there");


}
else
{ if((myArray[i]).toString().length > 3)

whStr += 1;


temp2[whStr] = (myArray[i]).toString()



}

}



}
time = time + 1;
document.form2.myTextarea.value = "";
}
return;
}

function DoIt2()
{
impStr = document.form2.myTextarea.value
if(navigator.appVersion.indexOf("Win") != -1)
{myRegEx1 = /\n/;}
else {myRegEx1 = /\r/;}
b = impStr.split(myRegEx1)

ansArray = new Array(b.length + 1);
myRegEx2 = /\b.*\b/


for (var i=0; i<b.length; i++)
{
l = i+1;
ansArray[l] = b[i];
ansArray[l] = myRegEx2.exec(ansArray[l])

}

for(i=1;i<=noIS;i++)
{
results[i] = 0;
for(var j=1;j<=ssLines[i];j++)
{

var tempx;
for(var m=0;m<Math.floor(((fpssArray[i][j].toString()).length)/3);m++)
{

tempx = parseInt(parseFloat(((fpssArray[i][j]).toString()).substring((m*3),(m*3)+3)) + .9);

if(ansArray[tempx] == "T") {ansArray[tempx] = "a";}
if(ansArray[tempx] == "F") {ansArray[tempx] = "b";}
if(ansArray[tempx] == theLet[j]) {results[i] = results[i] + 1;}
}

}
}

for(var i=1;i<=noIS;i++)
{
fval += "Scale/Item " + i + " Score: " + results[i] + "\n";

}
return;

}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<center><h1>Universal Objective Test/Inventory Scorer<br>
(This is the Mac/PC Cross-Platform Version)</h1>
<h2> This scores any objective test or personality inventory automatically.<br>
(The only restriction is that each test or inventory item can have only 1<br> answer (i.e. one response); for inventories, items may count on <br>
more than one scale and/or be weighted -- by entering an item <br>
number more than once in the scoring system.)</h2></center>
<form name="form2" method="post" action="">
<p><font size="4">In the textarea you paste the scoring system THEN click the DoIt button; 
paste the answers <br>and click the DoIt button again. The scoring system must be in a particular format
which is described <br>at the bottom of this page. Just as with the Java version, client/student answers must simply <br>
be a,b,c, ... or T or F and one answer per line in a raw text file (like NotePad, TextPad, <br>
or SimpleText) -- with no extra spaces or returns anywhere. <br>Each 'answer' is an answer to a test/inventory item; of course, they are in order.</font> </p>
<p>
<form name="form2" method="post" action="">

<textarea name="myTextarea" rows="25" cols="100" wrap="OFF" scroll="yes"></textarea>
</p>
<p>
<input type="button" name="myButton" value="DoIt" onClick="DoIt();">
</p>
</form>
<br>
<p align="center"><font size="5">Modified Directions for Making &quot;Scoring
System Text File&quot;<br>
for The JavaScript Version of the Universal (Generalized) <br>
Inventory/Test Scorer</font></p>
<p align="left"><font size="4">You should begin by reading all the directions on
my <a href="http://cyberper.cnc.net/quick_start.htm">quick_start.htm</a> and <br>
<a href="http://cyberper.cnc.net/ANNOUNCEMENT.htm">ANNOUNCEMENT.htm</a> web pages.&nbsp; The directions
for how the student/client <br>
answers are to be formatted for the JS version of the Scorer are identical to
the <br>
directions for the Java version.</font></p>
<p align="left"><font size="4">Regarding the &quot;scoring system text
file&quot;, you should begin by following the <br>
directions on the two web pages mentioned above.&nbsp; Making the scoring file <br>
for the Java version is an excellent way to begin to make the scoring system <br>
file for this JS version. These directions are also on the 2 web pages noted
above.</font></p>
<p align="left"><font size="4">After you have followed those directions for
making the scoring system file <br>
you should then make the following modifications:</font></p>
<p align="left"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp; ** Remove all the blank
(empty) LINES between the scoring for the <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; individual test
items/inventory scales.&nbsp; No blank LINES are to be <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in the scoring file for
the JS version.</font></p>
<p align="left"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp; ** Add a scoring section
for a last BOGUS item.&nbsp; It should look like this: </font></p>
<p align="left"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
084<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
0000</font></p>
<p align="left"><font size="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(in this example, the test had 83 items OR the inventory had 83 scales) </font></p>
<p align="left"><font size="4">&nbsp;&nbsp;&nbsp; ** Leave the cursor right
after this final set of 4 zeros (0000) -- you do NOT <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do two returns as you do for
the Java scoring system file. </font></p>
<p align="left"><font size="4">That's it. </font></p>
<p align="left"><font size="4">You paste the scoring system (with modifications
noted). Click the DoIt button. <br>
Paste in the student/client answers and Click the DoIt button AGAIN. <br>
No need for a third button click, like in the Java version.<br>
<br>
<br>
To use for a second student/client, Click Reload Button on the browser, then CLICK <br>
BEHIND the address in the browser's address blank and hold down the Shift key <br>
and hit RETURN. This procedure ensures a clean new loading of the program. <br>
<br>
**********************<br>
<br>
All users of this JavaScript Scorer program are to be individually granted <br>
permission to use it AND it is for THEIR USE ONLY. Furthermore, <br>
all users of either version of the program are asked to go to my main web <br>
page and read it.&nbsp; This is <a href="http://cyberper.cnc.net/index.htm">index.htm</a>.</font></p>
<p align="left">&nbsp;</p>

</body>
</html>

end what you copy with the </html> above -->