  function isblank(s)  {
      for(var i = 0; i < s.length; i++) {
          var c = s.charAt(i);
          if ((c != ' ') && (c != '\n') && (c != '\t')) return false;
      }
      return true;
  }
  
  function Validate_Form(f)  {
      var msg="";
      var empty_fields = "";
      var errors = "";

      msg += "Please complete the following details...\n";
      msg += "_________________________________      \n\n"
  
      if (f.artname.value.length < 5) {
        msg += " · The artist's name is required\n\n";
        errors = "Y";
      }
      if ((f.standardsize.value.length < 1) && (f.customsize_width.value.length < 1)) {
        msg += " · Please select a canvas size\n";
        errors = "Y";
      }
      if ((f.standardsize.value.length > 1) && (f.customsize_width.value.length > 1)) {
        msg += " · Please select either a standard canvas size or a custom size, not both\n";
        errors = "Y";
      }
      if ((f.customsize_width.value.length > 1) && (f.customsize_width.value.length < 1)) {
        msg += " · Please select custom width as well as a height\n";
        errors = "Y";
      }
      if ((f.customsize_width.value.length < 1) && (f.customsize_width.value.length > 1)) {
        msg += " · Please select custom height as well as a width\n";
        errors = "Y";
      }
      if (f.name.value.length < 5) {
        msg += " · Your full name is required\n";
        errors = "Y";
      }
      if (f.address1.value.length < 5) {
        msg += " · Your address is required\n";
        errors = "Y";
      }
      if (f.posttown.value.length < 6) {
        msg += " · Your postal town is required\n";
        errors = "Y";
      }
      if (f.postcode.value.length < 6) {
        msg += " · Your post code is required\n";
        errors = "Y";
      }
      if (f.email.value.length < 10) {
        msg += " · Your email address is required\n";
        errors = "Y";
      }

      if (!errors) return true;
  
      alert(msg);
  
      return false;
  }

  function Validate_Contact(f)  {
      var msg="";
      var empty_fields = "";
      var errors = "";

      msg += "Please complete the following details...\n";
      msg += "_________________________________      \n\n"
  
      if (f.email.value.length < 10) {
        msg += " · Your email address is required\n";
        errors = "Y";
      }

      if (!errors) return true;
  
      alert(msg);
  
      return false;
  }
  