function validate(matchClass) {
var reg = new RegExp("^[a-zA-Z0-9 *]*$");
var elems = document.getElementsByTagName('*'), i;
for (i in elems) {
if ((" " + elems[i].className + " ").indexOf(" " + matchClass + " ") > -1) {
if (reg.test(elems[i].value) == false) {
alert('Please enter a valid search keyword');
elems[i].value = "";
elems[i].focus();
return false;}}}
return false;}