<!--
//********************************************************************************
//	these 3 functions are used only on FS013/profileInformation/demographicsQuestions.asp
//	and FS019/reports/operatorMaintenance/demographics.asp
//********************************************************************************
// this method is used to clear the three options: not applicable, unknown, and refuse to answer
function clearGeneralOptions() {
	// get the number of input tags on the form
	var lNumberOfInput = document.all.tags("input").length;
	// we need to calculate the begin number "backward"
	// because in the case of options and checkboxes, 
	// we don't know how many input tags will be there before we display these three options
	// on the other hand, we always know that after displaying these three options,
	// there is an input for the OK button, an input for the Reset button,
	// an input for the Cancel button, and an input for the fact number.
	// This lets us know that the three options start at element (total number of tags - 7)
	// and the options end at element (total number of tags - 5)	
	var lBeginCount = lNumberOfInput - 7;
	var lEndCount = lNumberOfInput - 5;
	// uncheck each option
	for (lCount=lBeginCount; lCount <=lEndCount; lCount++) {
		document.form1.elements[lCount].checked = false;
	}
}

// this method is used to clear the input text box
function clearAnswer() {
	// we know that the text box is always the first element on the form
	document.form1.elements[0].value = "";
}

// this method is used to clear the answer when the type is option or check box
function clearOptions() {
	// get the number of input tags on the form
	var lNumberOfInput = document.all.tags("input").length;
	// we don't know how many "answer" input tags will be there
	// but we always know that after displaying these answer options (or checkboxes),
	// there are three input for the general options (not applicable, unknown, and refuse to answer),
	// an input for the OK button, an input for the Reset button,
	// an input for the Cancel button, and an input for the fact number.
	// This lets us know that the answer options (or checkboxes) end at element (total number of tags - 8)	
	var lEndCount = lNumberOfInput - 8;
	for (lCount=0; lCount <=lEndCount; lCount++) {
		// uncheck each option
		document.form1.elements[lCount].checked = false;
	}
}
// -->