/*
	Name: RadioGroup.class
	Author: WilC <wilz04@gmail.com>
	Date: 2007.
*/

function RadioGroup(me) {
	
	this.me = me;
	
	this.getValue = function () {
		with (this) {
			var j = me.length;
			if (j) {
				for (var i=0; i<j; i++) {
					if (me[i].checked) {
						return me[i].value;
					}
				}
				return null;
			} else {
				return me.value;
			}
		}
	};
	
	this.isChecked = function () {
		with (this) {
			var j = me.length;
			if (j) {
				for (var i=0; i<j; i++) {
					if (me[i].checked) {
						return true;
					}
				}
				return false;
			} else {
				return me.checked;
			}
		}
	};
	
}

