// Get the values from a form where the name of the input = name ; returns an array
function getFormValue(oForm,name) {
	var aRetvals = [];
	var arrElts = getFormElements(oForm);
	var oCurrent;
	while (oCurrent = arrElts.pop()) {
		if (oCurrent.name==name) {
			var sCTName = oCurrent.tagName.toLowerCase();
			var sCName = oCurrent.name.toLowerCase();
			var sCType = ((oCurrent.type)?oCurrent.type:'').toLowerCase();

			/* handle input[type="radio|checkbox"] */
			if (sCTName == "input" && /^(?:radio|checkbox)$/.test(sCType)) {
				if (oCurrent.checked || oCurrent.selected) aRetvals.push(oCurrent.value);
			}

			/* handle select[multiple] */
			if (sCTName == "select" && oCurrent.multiple && oCurrent.options) {
				for (i=0,len=oCurrent.options.length,sTemp=''; i < len; i++)
					if (oCurrent.options[i].selected) 
						aRetvals.push(oCurrent.options[i].value);
			} else if ((sCTName == "input" && /^(?:text|password|hidden)$/.test(sCType)) || /^(?:select|textarea)$/.test(sCTName)) {
				aRetvals.push(oCurrent.value);
			}
		}
	}
	return aRetvals;
}
