function RawToProtonormTableSource(){
 this.writeSource = writeSource;
 this.explanation = explanation;
}

function writeSource(test){
 var numberOfNorms = test.p.length;
 var qualityOfNorms = test.qualityOfNorms;
 var minimumCor = test.minimumCor;
 var source = "";
 source += "<table border=\"1\" cellspacing=\"0\">\n";
 source += "<tr><th><a href=\"explained.html#raw\">Raw</a></th><th><a href=\"protonorms/\">Protonorm</a></th></tr>\n";
 for(var i = 0; i < numberOfNorms; i++)
  source += "<tr><td>" + test.p[i].raw + "</td><td>" + test.p[i].protonorm + "</td></tr>\n";
 source += "</table>\n";
 source += this.explanation(qualityOfNorms,minimumCor);
 return source;
}

function explanation(qualityOfNorms,minimumCor){
 var source = "<ul><li><a href=\"explained.html#qualnorm\">Quality of norms</a>: " + qualityOfNorms.toFixed(2) + "</li></ul>\n\n";
 source += "<p>Used for norming are all of the known scores from tests correlating " + minimumCor.toFixed(2) + " or higher with this test. The used scores are if needed converted to <a href=\"explained.html#proto\">protonorms</a> using the relevant conversion formula or table. The <a href=\"explained.html#raw\">raw scores</a> on this test that form pairs with the used scores are <a href=\"explained.html#rankeq\">rank-equated</a> to the used scores, and where needed there is interpolation or extrapolation.</p>\n";
 return source;
}
