pr = new Project();

nResearch = pr.getSize();
var n=5;
var type = new Array(n);
var text = new Array(n);
type[2] = 'mg';
text[2] = 'Modeling:';
type[1] = 'f';
text[1] = 'Field:';
type[0] = 'c';
text[0] = 'Process:';
type[3] = 'm';
text[3] = 'Models:';
type[4] = 'r';
text[4] = 'Regulatory Support:';
type[5] = 'i';
text[5] = 'Information Pages:';

now = new Date();
var mon = now.getMonth() + 1;
var yr = now.getYear();
if (yr<1900) {yr = yr + 1900;}



var ttype;

document.write("<table width=100%>");
//cycle through each type of project
for (k=0;k<type.length;k++)
{
  ttype = type[k];
  document.write("<tr>");
  document.write("<td valign=top>");
  document.write("<strong>" + text[k] + "</strong>");
  document.write("</td>");
  document.write("<td valign=top>");
  document.write("<span>")
 
  //There is no sorting, all projects are listed as entered in the projects.js file
 
  for (i=0;i<nResearch;i++)
  {
    if (ttype==pr.getFeaturedProject('kind',i+1))
    {
      document.write("<a href=" + "'" + pr.getFeaturedProject('web',i+1)+ "'>");   
      document.write(pr.getFeaturedProject('shorttitle',i+1) + "</A>");
      if (pr.getFeaturedProject('year',i+1)==yr && pr.getFeaturedProject('month',i+1)>=mon-1)
      {
        if (pr.getFeaturedProject('datestatus',i+1) == 'n') 
        {
          document.write("<img src=\"images/new.gif\" alt=\"New Graphic\">");
        }
        if (pr.getFeaturedProject('datestatus',i+1) == 'r') 
        {
          document.write("<img src=\"images/revised.gif\" alt=\"Revised Graphic\">");
        }

      }
     // document.write("&nbsp;");
	 document.write("&nbsp; &nbsp;");
    }
  }
  document.write("</span>")
  document.write("</td>");
  document.write("</tr>");
}
document.write("</table>");
