// Written this to get the form field names in the order how it's displayed in the form.
// This function won't get the hidden fields, submit and reset button values, but it adds the hidden fields starts with optional,required
// Sangamaeswaran.T done for Leadmine Forms 
function getValues() {
	var strValues = "";
	for (i = 0; i <= document.the_form.length - 1; i++) {
		var substring = document.the_form.elements[i].name.substring(0, 8);
		if ((document.the_form.elements[i].type != "hidden" || (document.the_form.elements[i].type == "hidden" && (substring == "optional" || substring == "required"))) 
		&& document.the_form.elements[i].type != "submit" && document.the_form.elements[i].type != "reset") {
			strValues += document.the_form.elements[i].name;
			if (i != document.the_form.length - 1) {
				strValues += ",";
			}
		}
	}
	document.the_form.ordered_param.value = strValues;
	return true;
}


