
function isaPosNum(s) {
	return (parseInt(s) >= 0)  }

function valcheck(item, min, max, fname) {
	var retval = 0
	if ( !isaPosNum(item.value))
		alert("Positive numbers in "+fname+" field only please")
	else if (parseInt(item.value) < min )
		alert("Enter " + fname + " greater than " + min)
	else if (parseInt(item.value) > max )
		alert("Enter " + fname + " less than " + max)
	else
		retval = item.value
	return retval  }



function recalculate(f) {
	document.jsfrm.pp.value= eval(f.cp.value)				<!-- xfer previous on-air pts to bottom -->
	document.jsfrm.ns.value=eval(eval(f.ct.value)+eval(f.or.value)*2+eval(f.ow.value)*2+eval(f.ok.value)) <!-- seals collected  -->
	document.jsfrm.sl.value = eval(f.sp.value)				<!-- xfer spl to bottom -->
	document.jsfrm.TCH.value=(eval(f.CH.value)*10);
	document.jsfrm.TCS.value=(eval(f.CS.value)*10);
	document.jsfrm.TCM.value=(eval(f.CM.value)*10);
	document.jsfrm.THC.value=(eval(f.HC.value)*5);
	document.jsfrm.THL.value=(eval(f.HL.value)*5);
	document.jsfrm.THM.value=(eval(f.HM.value)*5);
	document.jsfrm.TFS.value=(eval(f.FS.value)*3);
	document.jsfrm.TFC.value=(eval(f.FC.value)*3);
	document.jsfrm.TFP.value=(eval(f.FP.value)*3);
	document.jsfrm.TDX.value=(eval(f.DX.value)*3);
	document.jsfrm.TOther.value=eval(f.Other.value);
	document.jsfrm.Total.value=(eval(f.TCH.value)+eval(f.TCS.value)+eval(f.TCM.value)+eval(f.THC.value)+eval(f.THL.value)+eval(f.THM.value)+eval(f.TFS.value)+eval(f.TFC.value)+eval(f.TFP.value)+eval(f.TDX.value)+eval(f.TOther.value));

	document.jsfrm.ob.value=eval(f.nh.value)+eval(f.oc.value) <!-- Add collected and banked points -->
	document.jsfrm.kb.value=eval(f.ob.value);			
	document.jsfrm.tu.value=eval(eval(f.ns.value) +		<!-- calculate ug pts -->
			eval(f.sl.value) ) ;


	document.jsfrm.nv.value=eval(eval(f.tu.value) +		<!-- calculate new pts -->
			eval(f.pp.value)) 

}

<!-- Here down OK -->

<!-- This sets todays date in the field of the form -->
  var timerID = null
  var timerRunning = false


  function MakeArray(size) 
<!-- line 90 -->
  {
  this.length = size;
  for(var i = 1; i <= size; i++)
  {
  this[i] = "";
  }
  return this;
  }

  function stopclock (){
  if(timerRunning)
  clearTimeout(timerID);
  timerRunning = false

  }

  function showtime ()
 {
<!-- line 100 -->
  var now = new Date();
  year = new String(now.getYear())
  yearLen = year.length
  year = year.split("")
  year = year[yearLen - 2] + year[yearLen - 1]
  var month = now.getMonth() + 1;
  var date = now.getDate();

  var timeValue = "";
  timeValue += ((month < 10) ? " 0" : " ") + month + "-";
  timeValue += date + "-" + year + " ";

  document.jsfrm.fd.value = timeValue;
  timerID = setTimeout("showtime()",1000);
  timerRunning = true
  }




  function startclock () 
 {
stopclock();
showtime() 
 }


