Email field can be of type "text" in HTML4 while web bowsers that support the new HTML5 type="email" might see that type as "email" instead in your JavaScript.
Given he fact that any email field will most likely include the string "email" in he field's name you coud just use:
if(e.name.indexOf('email')!=-1 && !checkEmail(e){ return false; }
For the checkbox keep in mind that your HTML might contain mutilple checkboxes with different names or use an array to group them under one name (e.g. myboxes[] )
In either case you'd certainly only to have at least one checkbox ticked.
The array naming is more JavaScript friendly because you can just use a for loop to determine whether there is a selected checkbox or not.
However using the logic you already have in place:
if(e.type='checkbox' && !e.checked){ return false; }
There is really no need for the chkBox function is you have to test the checkboxes one at a time.
function check (f) {
var done = true, e, i = 0;
while (e = f.elements[i++]) {
if (e.type == 'text' && !/\S/.test (e.value)) { done=false; break;}
else if(e.name.indexOf('email)!=-1 == 'email' && !checkEmail(e.value)){
done=false; break;
}
else if(e.type == 'checkbox'' && !e.checked){done=false; break;}
}//end while loop
if(!done) {
e.parentNode.className = 'highlight';
e.onfocus = function () {this.parentNode.className = '';}
done = false;
}
return done;
}