function bFormValid(oForm, aRule) {
	iClicked++;
	if (bFormValid.arguments.length > 1) {
		if (! bCheckFormRules(oForm, aRule)) {
			iClicked--;
			return false;
		}
	}
	if (iClicked > 1) {
		alert("You have already pressed the submit button.");
		return false;
	}
	return true;
}

function linkWin(sScript, iComm, sUser, iKey, sPage) {
	/*
		This script takes the query string values as passed parameters
		because we cannot put CFOUTPUT tags within the SCRIPT tag.
		The 'dependent' attribute, if changed to yes, causes the window to
		lose focus permanently for the rest of the browser session, so
		I have set it to no for now.
	*/
	window.open(sScript + '.CFM?I=0&C= ' + iComm + '&U=' + sUser + '&K=' + iKey
		+ '&P=' + sPage, sScript,
		'dependent=no,height=360,resizable=yes,scrollbars=yes,status=yes,titlebar=yes,width=400')
	//	'toolbar=no,location=no,directories=no,menubar=no,copyhistory=no');
}

function ListAddItem(oForm, sList) {
	var s = "";
	var s = prompt("Add a " + sList + " to the list:", s);
	if (s != null) {
		var oList = oForm[sList];
		//	Add the new item to the control.
		oList.options[oList.options.length] = new Option(s, s, false, false);
		//	Make the item the selected item.
		oList.selectedIndex = oList.options.length - 1;
	}
	return s;
}
