/************************************************************ ** Clears a field ** By: Joshua Sowin (fireandknowledge.org) ** HTML: ***********************************************************/ function clearInput(field_id, term_to_clear) { // Clear input if it matches default value if (document.getElementById(field_id).value == term_to_clear ) { document.getElementById(field_id).value = ''; } // If the value is blank, then put back term else if (document.getElementById(field_id).value == '' ) { document.getElementById(field_id).value = term_to_clear; } } // end clearSearch()