// Determine whether or not the input 'inputId' has been clicked yet.  If it hasn't, clear it.
// (This script requires that the '<input>' elements contain 'id' attributes.  It also calls for the presence of an '<input type="hidden" />' after each one, the 'id' of which must be the original '<input>' 'id' with 'Clicked' added to the end.)

function clearElement(inputId) {
	if (document.getElementById(inputId + 'Clicked').value == '0') {
    	document.getElementById(inputId).value = ''; // This should work as planned, assuming that no two DOM objects can have the same ID.  Otherwise, there may be namespace issues.
		document.getElementById(inputId + 'Clicked').value = '1'; // (i.e., the element has been clicked)
	}
}

