window.onload = function(){formHelp();}

function formHelp(){

	var searchbox = document.getElementById('searchbox');
	var cal = document.getElementById('cal_search');
		
	cal.onsubmit = processForm;
	
	function processForm(){
			
		if(searchbox.value)
		{	
			var str = searchbox.value;
			var reg07 = new RegExp("[^A-Za-z0-9'\\s]","g");
			var trans = str.match(reg07);
					
			if(trans != null)
			{
				var msg = 'No special search characters are needed. Please only use letters and numbers.\n\n';
				alert(msg);
				searchbox.focus();
				var toggle = 1;
			}
						
			if(trans == null)
			{
				var toggle = 0;
			}		
		}
				
		if(toggle == 1)
		{
			return false;
		}
					
		if(toggle == 0)
		{
			return true;
		}
	}
}