<!--
//This script is intended for use within a form.

var COLOR = "#FFD36D";
function setColor(objElement, strBG) 
{
	if (objElement.style) objElement.style.backgroundColor = strBG;
}

function errColor(objElement)
{
	if (objElement.style) objElement.style.backgroundColor = COLOR;
	objElement.focus();
}

function trim(objEntry)
{
	var strValue = objEntry.value;
	var intLen = strValue.length;
		
	for (var intA = 0; intA < intLen; intA++)
	{
		if (strValue.charAt(intA) != " ") break;
	}
	for (var intZ= intLen - 1; intZ > 0; intZ--)
	{
		if (strValue.charAt(intZ) != " ") break;
	}
	strValue = strValue.slice (intA,intZ + 1);
	objEntry.value = strValue;
}

function Reset(frmF)
{
	/* Reset the background color of all form elements to white.*/
	for(var intM = 0; intM < frmF.length; intM++)
	{
		var objP = frmF.elements[intM];
		if (objP.type == "text") setColor(objP, "#ffffff");
		if (objP.type == "select-one") setColor(objP, "ffffff");
	}	
}
//-->
