function isValidSearch(form){
	if(form.category.value == '- Select -' || form.category.value == '-'){
		alert('You have not selected a category!');
		return false;
	}	
	
	return true;
}

function isValidTellAFriend(form){
	
	var filter  = /^[a-zA-Z0-9-_]+(\.[a-zA-Z0-9-_]+)*@([a-zA-Z_0-9-]+\.)+[a-zA-Z]{2,7}$/;
	
	if(form.friend_s_email.value.trim() == ''){
		alert('Friend\'s Email address is empty !');
		return false;
	}
	else if(!filter.test(form.friend_s_email.value.trim())){
		alert('Friend\'s Email address seems to be incorrect. Please check again !');
		return false;
	}
	
	return true;
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}