function getSelectedCheckbox(buttonGroup) {

   // Go through all the check boxes. return an array of all the ones

   // that are selected (their position numbers). if no boxes were checked,

   // returned array will be empty (length will be zero)

   var retArr = new Array();

   var lastElement = 0;

   if (buttonGroup[0]) { // if the button group is an array (one check box is not an array)

      for (var i=0; i<buttonGroup.length; i++) {

         if (buttonGroup[i].checked) {

            retArr.length = lastElement;

            retArr[lastElement] = i;

            lastElement++;

         }

      }

   } else { // There is only one check box (it's not an array)

      if (buttonGroup.checked) { // if the one check box is checked

         retArr.length = lastElement;

         retArr[lastElement] = 0; // return zero as the only array value

      }

   }

   return retArr;

} // Ends the "getSelectedCheckbox" function



function _gCV(radioObj) {

	if(!radioObj)

		return "";

	var radioLength = radioObj.length;

	if(radioLength == undefined)

		if(radioObj.checked)

			return radioObj.value;

		else

			return "";

	for(var i = 0; i < radioLength; i++) {

		if(radioObj[i].checked) {

			return radioObj[i].value;

		}

	}

	return "";

}

function check(fr) {

	for (var i = 0; i < fr.elements.length; i++) {

		var e = fr.elements[i];

		if ((e.checked == true) && (e.type == 'checkbox'))

			return true;

	}

	return false;

}