/* $Change: 2021583 $ $DateTime: 2007/09/07 09:32:12 $ $Revision: #3 $ */

function verifyshipto(form, msg)
{ 
   alert(msg);
   form.form.submit();
}
function have_quantity(form, msg)
{
   if (!(form.qty.length > 0))
   {
      if (form.qty.value > 0)
      {
         return true;
      }
   }
   for (var i = 0; i < form.qty.length; i++)
   {
      if (form.qty[i].value > 0)
      {
         return true;
      }
   }
   alert(msg);
   return false;
}
function verifycart(form, msg1, msg2)
{ 
   if (have_quantity(form, msg2))
   {
      return confirm(msg1);
   }
   return false;
}
function have_seats(f, msg)
  {
  for (var j = 0; j < f.qty.length; j++)
    {
    a = f.qty[j].value - 0;
    b = document.num_enroll.st[j].value - 0;
    if (a > b)
      {
      alert(msg + document.num_enroll.cl_name[j].value);
      return false;
      }
    }
  return true
  }
function enroll_check(f, msg1, msg2)
  {
  if (have_quantity(f, msg1))
    {
    return have_seats(f, msg2);
    }
  else
    {
    return false;
    }
  }

