how do u validate three checkboxeS?
i can only validate two checkboxes.

these are the code that i m using to validate two checkboxes. these codes work when i want to validate two checkboxes.
else if((PaymentBy[0].checked == false) && (PaymentBy[1].checked == false)
{
alert('Please state the method of payment');
return false;
}

else{
return true;
}

</script>
<body>
<input name="PaymentBy" type="checkbox" value="cash" />
<input name="PaymentBy" type="checkbox" value="credit card" />
<input name="PaymentBy" type="checkbox" value="company" />
<input type="submit" name="submit" value="Submit">
</body>

but now, i just want to validate three checkboxes. can someone shine the light over here?