var colorCode = document.getElementsByTagName("td")// finding all the TD tags
var i=0;
for (i=0;i
{
if (colorCode[i].className=="Building 1")
{
if (colorCode[i].innerHTML=="West Des Moines")//finding the word to which the color has to be set
{
colorCode[i].style.backgroundColor='lightblue'; // setting the color depending upon the value
colorCode[i].style.color='Black'; // setting the color of the words inside the content
}
if (colorCode[i].innerHTML=="Started")
{
colorCode[i].style.backgroundColor='Brown';
colorCode[i].style.color='Black';
}
if (colorCode[i].innerHTML=="In Progress")
{
colorCode[i].style.backgroundColor='Orange';
colorCode[i].style.color='Black';
}
if (colorCode[i].innerHTML=="Completed")
{
colorCode[i].style.backgroundColor='green';
colorCode[i].style.color='Black';
}
if (colorCode[i].innerHTML=="Deffered")
{
colorCode[i].style.backgroundColor='Red';
colorCode[i].style.color='Black';
}
}
}