    function fValidate(vHost, vChHost)
    {  
      var vCust, vId, vUrl, vParam
      var validRegExp = "^[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9]@[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9][\.][a-z0-9]{2,4}$";

      vCust = document.fForm.vCust.value; 
      if (vCust == "") 
      {
        alert("Please enter your Campus ID.");
        document.fForm.vCust.focus();
        return;
      }

      vId = document.fForm.vId.value; 
      if (vId == "") 
      {
        alert("Please enter your E-mail Address.");
        document.fForm.vId.focus();
        return;
      }

      if (document.fForm.vId.value.toLowerCase().search(validRegExp) == -1)
      {
        alert("Please enter a valid E-mail Address.");
        document.fForm.vId.focus();
        return (false);
      }

      var vFirstName = document.fForm.vFirstName.value; 
      if (vFirstName == "") 
      {
        alert("Please enter your First Name.");
        document.fForm.vFirstName.focus();
        return;
      }

      var vLastName = document.fForm.vLastName.value; 
      if (vLastName == "") 
      {
        alert("Please enter your Last Name.");
        document.fForm.vLastName.focus();
        return;
      }

      var vInfc = document.fForm.vInfc.value; 
      if (document.fForm.vInfc.selectedIndex < 0)
      {
        alert("Please select your Institution & Faculty.");
        document.fForm.vInfc.focus();
        return;
      }

			var aInfc = vInfc.split("|");
      var vInst = aInfc[0];
      var vFacu = aInfc[1];

/*
      var vInst = document.fForm.vInst.value; 
      if (document.fForm.vInst.selectedIndex < 1)
      {
        alert("Please select your Institution.");
        document.fForm.vInst.focus();
        return;
      }

      var vFacu = document.fForm.vFacu.value; 
      if (document.fForm.vFacu.selectedIndex < 1)
      {
        alert("Please select your Faculty.");
        document.fForm.vFacu.focus();
        return;
      }
*/

      var vStId = document.fForm.vStId.value; 
      if (vStId == "") 
      {
        alert("Please enter your Student Id.");
        document.fForm.vStId.focus();
        return;
      }

      var vYear = document.fForm.vYear.value; 
      if (document.fForm.vYear.selectedIndex < 1)
      {
        alert("Please select your Year.");
        document.fForm.vYear.focus();
        return;
      }
      var vCour = document.fForm.vCour.value; 
      vCour = vCour.replace("&", "~1")
      if (vCour == "") 
      {
        alert("Please enter your Course name.");
        document.fForm.vCour.focus();
        return;
      }


      vUrl = "wsWorkSmart.asp";
      vParam = "vFunction=WorkSmart_Enroll&vCust=" + escape(document.fForm.vCust.value) + "&vId=" + escape(document.fForm.vId.value);
      vWs = WebService(vUrl, vParam);

      if (vWs == "error")
      {
        alert("We are unable to provide this service, please contact support.");
        return (false);
      }

      if (vWs == "invalid cust")
      {
        alert("Please enter the correct Campus ID.");
        document.fForm.vCust.focus();
        return;
      }

      if (vWs == "invalid id")
      {
        alert("That Email Address is already on file. If you are already enrolled, then please signin.");
        document.fForm.vId.focus();
        return;
      }


      vUrl = "http://" + vHost + "/Default.asp";
      vUrl += "?vCust=MEVT2747";
      vUrl += "&vSource=http://" + vChHost + "/Worksmart/Default.asp";
      vUrl += "&vId=" + vId;
      vUrl += "&vFirstName=" + vFirstName;
      vUrl += "&vLastName=" + vLastName;
      vUrl += "&vEmail=" + vId;
      vUrl += "&vCriteria=" + vInfc;
      vUrl += "&vMemo=" + vStId + "|" + vInst + "|" + vFacu + "|" + vYear + "|" + vCour;

//    alert(vUrl);

      document.fForm.action = vUrl;
      document.fForm.submit();
    }
