Good day. This form is working, but I want to make the "What AIS services are you interested in?" multiple selection a "required field". The other required fields are working, but I can't figure out how to make this field "required".
Code:
<blockquote><h2>Request More Information:</h2>
<script type="text/javascript">
function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
</script>
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?encoding=UTF-8" method="POST" onsubmit="MM_validateForm('first_name','','R','last_name','','R','email','','RisEmail','company','','R','phone','','RisNum');return document.MM_returnValue"><input type="hidden" name="oid" value="00Dd0000000cnUc" />
<input type="hidden" name="retURL" value="http://aissolutions.ca/thank-you" />
<p style="float:left;width:350px"><label for="first_name">First Name <span style="color:#f00">(required)</span></label><input id="first_name" type="text" name="first_name" size="50" maxlength="40" /></p>
<p style="float:left;width:350px"><label for="last_name">Last Name <span style="color:#f00">(required)</span></label><input id="last_name" type="text" name="last_name" size="50" maxlength="80" /></p>
<p style="float:left;width:350px"><label for="email">Email <span style="color:#f00">(required)</span></label><input id="email" type="text" name="email" size="50" maxlength="80" /></p>
<p style="float:left;width:350px"><label for="company">Company <span style="color:#f00">(required)</span></label><input id="company" type="text" name="company" size="50" maxlength="40" /></p>
<p style="float:left;width:350px"><label for="phone">Phone <span style="color:#f00">(required)</span></label><input id="phone" type="text" name="phone" size="50" maxlength="40" /></p>
<p style="float:left;width:350px">Best Time To Call:<select style="width:325px" id="00Nd0000004F2Mb" name="00Nd0000004F2Mb" title="Best Time To Call"><option value="">--None--</option><option value="9:00am to 12:00pm">9:00am to 12:00pm</option>
<option value="1:00pm to 5:00pm">1:00pm to 5:00pm</option>
<option value="6:00pm to 9:00pm">6:00pm to 9:00pm</option>
</select></p>
<p style="clear:left;float:left;width:350px"><label for="street">Address</label><br>
<textarea name="street" cols="47"></textarea></p>

<p style="float:left;width:350px">What AIS services are you interested in?:<select style="width:325px"  id="00Nd00000043aHr" multiple="multiple" name="00Nd00000043aHr" title="What AIS services are you interested in?"><option value="Bookkeeping">Bookkeeping</option>
<option value="Business Incorporation">Business Incorporation</option>
<option value="Catch Up/Clean Up Records">Catch Up/Clean Up Records</option>
<option value="Job Costing">Job Costing</option>
<option value="Part Time CFO">Part Time CFO</option>
<option value="Software Conversion">Software Conversion</option>
<option value="Software Customization">Software Customization</option>
<option value="Software Training">Software Training</option>
<option value="Tax Services">Tax Services</option>
</select></p>

<p style="float:left;width:350px">Anything else you think we should know:<br>
<textarea id="00Nd0000004E2rs" name="00Nd0000004E2rs" cols="47"></textarea></p>

<p style="clear:left;float:left"><input type="submit" name="submit" /></p>

</form>
Thanks.