function chkcholsgn() 
{
  var valid = "0123456789"
  var lenxx ;
  var pyear ;
  var vok  = "Y" ;
  fixfocus  = "N";

  missinginfo = "";

  if (document.calform.p_unit.value == "") 
  {
    if (document.calform.p_scan.value == "") 
      {
        missinginfo += "\n     -  Scan ID or Blood Unit ID";
         if (fixfocus == "N")
           {
                document.calform.p_unit.focus();
                fixfocus = "Y";
            }
      }
  }

  if (document.calform.p_year.value == "") 
  {
    missinginfo += "\n     -  Year of Birth";
    if (fixfocus == "N")
    {
      document.calform.p_year.focus();
      fixfocus = "Y";
    }
  }
  else
  {
    pyear = document.calform.p_year.value;	
    lenxx = pyear.length;
    if (lenxx != 4)
    {
	missinginfo += "\n     -  Length of Birth Year is Invalid";
	if (fixfocus == "N")
	{
	  document.calform.p_year.focus();
	   fixfocus = "Y";
	}	 		
    }
        else
    {
      for (i=0; i<lenxx; i++) 
      {
	if (valid.indexOf(pyear.substring(i, i+1)) == "-1")
	{
	  vok = "N";
	}	
      } 
      if (vok == "N")
      {
	missinginfo += "\n     -  Invalid entry!  Only numbers are accepted for Birth Year!";
	if (fixfocus == "N")
	{
	  document.calform.p_year.focus();
  	  fixfocus = "Y";
	}
      }
    }
  }



  if (missinginfo != "") 
  {
    missinginfo ="_____________________________\n" +
    "The following information is missing:\n" +
    missinginfo + "\n_____________________________" +
    "\nPlease re-enter and submit again!";
    alert(missinginfo);
    return false;
  }
  else return true;
}