When you check your HTML generated, you may see the ID of the control changed. This is to prevent conflicts between other controls id. ASPX have default attribute in controls "AutoID",if you want to get the ID generated for that control, you have to use
'#<%= '+ txtID.ClientID +' %>'
or the other option not the best,but you can add the attribute
ClientIDMode="Static"
then your ID is not going to change.
An Example it's going to look like,
function checkForm() {
var errors = [];
if ($('#<%= '+ itemBrand.ClientID +'%>').value == "") {
errors[0] = "Please input a text!";
}
...
}