function checkWholeForm(theForm) {
    var why = "";
    why += notEmpty(theForm.FullStory.value,"* We cannot accept a story if there is none!\nPlease enter a story.\n");
    if (why != "") {
    	why = "The following problems were detected:\n\n" + why;
    	why += "\n\nPlease correct these and try again\n";
       alert(why);
       return false;
    }
return true;
};

function notEmpty (strng,error) {
 if (strng == "") {
 	return error;
 }
 else {
 	return '';
 }
};

function trimFields (theForm) {
	var leadingSpaces=/^\s+/;
	var trailingSpaces=/\s+$/;
	var numFields=17;
	while (numFields>0) {
		theForm[numFields].value=theForm[numFields].value.replace(leadingSpaces,'');
		theForm[numFields].value=theForm[numFields].value.replace(trailingSpaces,'');
		numFields--;
	};
	var re=/-+/;
	theForm.phone.value=theForm.phone.value.replace(re,' ');
	theForm.fax.value=theForm.fax.value.replace(re,' ');
};

