
function checkFields(form,x) {
  var e= (i_check(form,25,"exp0")&&i_check(form,25,"exp1")&&i_check(form,25,"exp2")&&i_check(form,25,"exp3")&&i_check(form,25,"exp4"));
  var n= (i_check(form,25,"num0")&&i_check(form,25,"num1")&&i_check(form,25,"num2")&&i_check(form,25,"num3")&&i_check(form,25,"num4"));
  if( !(e && n) ) alert('Please enter data to the nearest whole number, and do not use decimal points.');
  return (e && n);
}
function i_check(form,x,fieldname)//,i)
{
	var y = 0;
	for (y = 0; y <= x; y++) {
		if (form.elements[y].name == fieldname)
			break;
	}

	var msg_addition = "";
	var decimal = "";
	inputStr = form.elements[y].value.toString();
	
	if (inputStr == "")
	{
		//msg_addition = form.elements[i].value
	}
	else
	{
		for (var c = 0; c < inputStr.length; c++)
		{
			var oneChar = inputStr.charAt(c);
			if ((c == 0 && oneChar == "-") || (oneChar == "."  && decimal == ""))
			{
				//alert('Please enter data to the nearest whole number, and do not use decimal points.');
				if (oneChar == ".")
				{
					decimal = "yes";
					return false;
				}
				return false;
				continue;
								
			}
			if (oneChar < "0" || oneChar > "9")
			{
				/*msg_addition = form.elements[i].value;*/
			}
		}
	}
	return true;
}