<!--
// toggle.js
// Copyright (c) 2008 Big River Data.  All Rights Reserved.
// To obtain a legal license for this software, contact info@bigriversystems.com.
// Unauthorized usage, distribution and/or reverse engineering are strictly prohibited and may result in legal action.
// code generated by the appGenerator on November 10, 2008
// purpose: hide/show rows based on author specifications;

function toggle() {
	frm = false;
	if (document.getElementById("inputForm")) {
		// if the form exists 881097;
		var frm = document.getElementById("inputForm");
	}

	if (document.getElementById("modifyForm")) {
		// if the form exists;
		var frm = document.getElementById("modifyForm");
	}

	if (frm) {
		// ie doesn't support the table-row css2 attribute for "display", so we have to use "block" for ie, and "table-row" for firefox, safari and everything else;
		var newDisplayStyle = document.all ? "block" : "table";
		/// define variables from form input ////////
		
	}  // end-if form exists 1071097;
} // close toggle function;

// if a switch is activated to hide a set of rows, empty those values before submitting the form;

function SetValueToNull(el) {
	// if the child is a text box, checkbox, select list, radio button, clear the values;
	var elem = eval('document.inputForm.' + el);
	if (elem == null) {
		return;
	}

	if ((elem.type == "select-one") || (elem.type == "radio")) {
		for (var b = 0; b < elem.length; b++) {
			elem[b].checked = false;
		}
	} else if (elem.type == "checkbox") {
		SetCheckboxValueToNull(el);
	} else {
		elem.value = "";	
	}


}

function SetCheckboxValueToNull(el) {
	var elem = eval('document.inputForm[\'' + el + '[]\']');
	for (var b = 0; b < elem.length; b++) {
		elem[b].checked = false;
	}
}

/// end toggle.js ////
//-->