function validatesearch(frm){
	
if(!wordCount(frm.query.value)){
	alert('You must supply a search term.');
	frm.query.focus();
	return false;
}		

return true;	
}


function wordCount(obj){
  	if(obj.length == 0){
		wordTotal = 0;
   	}else{
		regSpace = /\s/g;
  		aWords = obj.split(regSpace);
  		wordTotal = aWords.length;
	}	
return wordTotal;	
}


function isEmail(addy){
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(addy)){
return (true)
} else {
return (false)
}
}

