						var defaultStr = 'Type your question here';
						function isBlank(q) {
							var whitespace = new String(" \t\n\r");
							for (var i = 0; i<q.length; i++) {
								if (whitespace.indexOf(q.charAt(i)) == -1) {
									return false;
								}
							}
							return true;
						}
						function submitQuestionForm() {
							var d = document.questionForm;
						  	if (!isValidForm())
						    	return;
							d.submit();
						}
						function isValidForm() {
							var d = document.questionForm;
						  	if (d.question.value==defaultStr || isBlank(d.question.value)) {
						    	return false;
							}
							else if (doCountWords(dotrim(d.question.value)) < 3) {
								tmpTxt = dotrim(d.question.value);
								d.question.focus();
								alert("Your question must contain at least 3 words and be formatted as a question (i.e. How do I apply?). Please try again. \nIf you are looking for general Hofstra information, please search the Hofstra web site using the search box above.");
								d.question.value = tmpTxt;
								return false;
							}
							else {
								d.action='http:\/\/ask.hofstra.edu/results.jsp';
							  	d.requestType.value='NormalRequest';
							  	return true;
							}
						}
						function topTen() {
							var d = document.questionForm;
							d.action='http:\/\/ask.hofstra.edu/topQuestions.jsp';
						  	d.submit();
						}
						function clearForm() {
							var d = document.questionForm;
							d.id.value=-1;
						  	d.reset();
						  	d.question.focus();
						  	d.question.value='';
						}
						function doCountWords(theString) {
							var theCount = 0;
							// REPLACE ALL TEXT BLOCKS WITH A SINGLE CHARACTER THEN REMOVE SPACES AND COUNT THE LENGTH
							theCount = theString.replace(/\S+/g, 'k').replace(/\s+/g, '').length
							return theCount;
						}						function dotrim(string_value) {
						     var estring = string_value;
						     // TRIM LEADING SPACES
						     while(''+estring.charAt(0)==' ')     {
						          estring=estring.substring(1,estring.length);
						     }
						     // TRIM TRAILING SPACES
						     while(''+estring.charAt(estring.length-1)==' ')     {
						          estring=estring.substring(0,estring.length-1);
						     }						     return estring;
						}
