/* Account form */

function initAccountForm()
{
   var validator = $("#accountform").validate({
       debug: false,
       errorElement: "span",
       errorClass:'error',
       errorContainer: $("#warning"),
       showErrors: function(errors, errorList) {
          validator.defaultShowErrors();
       },
       success: function(label) {
            label.text("OK").addClass("success");
       }
   });
}

function changeCompanyType()
{
   var type = document.forms["accountform"].companytype.value;
   if (type == "soletrader" || type == "partnership")
   {
      $('#companynumber').hide();
   }
   else
   {
      $('#companynumber').show();
   }
}

