selLabelMatrix = {{"Codon","E[dS]","E[dN]","E[dN/dS]","Posterior Probability","Bayes Factor"}};

EVF_ResultTable = {};
EVF_ResultTable ["Codon"] 		 = "INTEGER"; /* 0 */
EVF_ResultTable ["dS"]    		 = "REAL"; /* 1 */
EVF_ResultTable ["dN"]    	 	 = "REAL"; /* 2 */
EVF_ResultTable ["dSdN"]    	 = "REAL"; /* 3 */
EVF_ResultTable ["PosPP"]   	 = "REAL"; /* 4 */
EVF_ResultTable ["NegPP"]    	 = "REAL"; /* 5 */
EVF_ResultTable ["PosBF"]    	 = "REAL"; /* 6 */
EVF_ResultTable ["NegBF"]     	 = "REAL"; /* 7 */
EVF_ResultTable ["SampleP50"]	 = "REAL"; /* 8 */
EVF_ResultTable ["SampleN50"]	 = "REAL"; /* 9 */


EFV_Resampled = {"CODON":"INTEGER", "SAMPLES": "BLOB"};


/*___________________________________________________________________________________________________________*/

function	PrintASCIITable (dataMatrix, titleMatrix, doSLACMaps)
{
	outString="";
	outString*8192;
	if (Rows(dataMatrix))
	{
		outString*"<DIV CLASS='RepClassSM'>\n<TABLE BORDER = '0'><TR CLASS='TRReport' style = 'font-size:small'>";
		nc = Columns(titleMatrix);
		for (counter1=0; counter1<nc; counter1 = counter1+1)
		{
			outString*"<td>";
			outString*titleMatrix[counter1];
			outString*"</td>\n";
		}
		
		if (doSLACMaps)
		{
			outString*"<td>Additional Information</td></tr>\n";
		}
		else
		{
			outString*"</tr>\n";
		}	
		
		for (counter1=0; counter1<Rows(dataMatrix); counter1 = counter1 + 1)
		{
			if (counter1%2)
			{
				outString*"\n<tr CLASS='TRReport2' style = 'font-size:x-small'>";
			}
			else
			{
				outString*"\n<tr CLASS='TRReport1' style = 'font-size:x-small'>";
			}
			
			for (counter2 = 0; counter2 < nc; counter2 = counter2+1)
			{
				outString*"\n<td>";
				outString*Format(dataMatrix[counter1][counter2],-1,-1);
				outString*"\n</td>\n";
			}

			if (doSLACMaps)
			{
				codonIndex = dataMatrix[counter1][0]-1;
				outString*("<TD style = 'font-size: 10px;'><a href='"+BASE_CGI_URL_STRING+"siteMap.pl?file="+filePrefix+"&site="+codonIndex+"&mode=0'>[Codons]</a>"+
						   "<a href='"+BASE_CGI_URL_STRING+"siteMap.pl?file="+filePrefix+"&site="+codonIndex+"&mode=1'>[AA]</a>"+
								 "<a href='"+BASE_CGI_URL_STRING+"siteMap.pl?file="+filePrefix+"&site="+codonIndex+"&mode=2'>[Counts]</a>"+
								 "</TD></TR>\n");
			}
			else
			{
				outString*"</tr>\n";
			}
		}
		outString*"</TABLE></DIV>\n";	
	}
	outString*0;
	return outString;
}

