﻿// myA = array to pass in
// begI = starting index for the I col
// endI = end index
// begJ = starting index for the j row
// endJ = end index
// rowGrp = how many rows to group in highlight
// mod= value to mod by
function PrintPlans (myA, begI, endI, begJ, endJ, rowGrp, mod)
{
	var tmp=0;
	var strOutput = "<table class='costTbl'><tr><th style='width:25%'>Plan</th><th style='width:10%'>Under 4 Years</th><th style='width:10%'>4-10 Years</th><th style='width:10%'>Over 10 Years</th><th>Description</th></tr>";

	for (i=begI; i < endI; i++) {
		(tmp%rowGrp <= mod) ? 	strOutput += "<tr style='background-color:#ccffdd;'>" : 
			strOutput += "<tr>";
	tmp++;

		for (j=begJ; j < endJ; j++) {
			((0==j)||(endJ-1==j)) ? strOutput += "<td>" + myA[i][j] + "</td>" :
				strOutput += "<td>$" + myA[i][j] + "</td>";
			}

		strOutput += "</tr>";
	}
	
	strOutput += "</table>";
	return strOutput;
}
