// JavaScript Document

function checkForm()
{
	var cwords;
	with(window.document.search_form)
	{
		cwords			= words;
		
	}
	
	if(trim(cwords.value) == '')
	{
		alert("Please enter a search term.");
		cwords.focus();
		return false;
	}
	
	else
	{
		cwords.value		= trim(cwords.value);
		return true;
	}
}
/*
Strip whitespace from the beginning and end of a string
Input : a string
*/
function trim(str)
{
	return str.replace(/^\s+|\s+$/g,'');
}