function checkFields() {                       // field validation -
var mes = "";
var bad = 0;
if (document.problemform.room.value=="")  // checks if fields are blank.
     {
	 document.problemform.room.style.backgroundColor = '#ffffcc';
	 mes = "Please indicate the room where the issue occured\n";
	 bad = 1;
	 }
if (document.problemform.equip.value=="")  // checks if fields are blank.
     {
	 document.problemform.equip.style.backgroundColor = '#ffffcc';
	 mes += "Please indicate the equipment used.\n";
	 bad = 1;
	 }
if (document.problemform.username.value=="")  // checks if fields are blank.
     {
	 document.problemform.username.style.backgroundColor = '#ffffcc';
	 mes += "Please indicate your IU username.\n";
	 bad = 1;
	 }
if (document.problemform.Problem.value=="")  // checks if fields are blank.
     {
	 document.problemform.Problem.style.backgroundColor = '#ffffcc';
	 mes += "Please indicate the equipment issue that you are experiencing.";
	 bad = 1;
	 }	 
if (bad == 1)
	{
	alert(mes);
	return false;
	}
else
	return true;
}
