this script goes through a list of items and looks for ones with a price error
I would like to be able to change the color of the item that has a price error to red

function findMissingPrices()
{
var pricesGood = true;
var itemVal = "";
var itemVals = [];
totCount = 0;

for(var i=1;i<200; i++)
{
var prtNum = "Tank_Parts_Number_OUT" + (i + "");
var itemNum = document.getElementsByName(prtNum)[0].value;
if (itemNum != "" && !(itemNum == "WARNING" || itemNum == "ACTUAL_HEIGHT" || itemNum == "ACTUAL_DIA" || itemNum == "ACTUAL_CAPACITY" || itemNum == "ACTUAL_CONTENT" || itemNum.substr(0, 3) == "CPQ"))
{
itemVals.push(itemNum);
totCount = totCount + 1;
}
}
itemVal = "'" + itemVals.join("', '") + "'";
var q = new Query("itemCountData");
q.invoke("select count(*) from co_item_master where smartpart_num in (" + itemVal + ")" , 1, "parseCountResult('itemCountData')");

}

function parseCountResult(id)
{
document.ui.MISSING_PRICE.value = "N";
var q = queryManager.getQuery(id);
if ( q.results[0] * 1.0 < totCount )
{
document.ui.MISSING_PRICE.value = "Y";
}
else
{
findFoundationMissingPrices();
}
}