function getCheckedValue(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 setCheckedValue(radioObj, newValue) {

	if(!radioObj)

		return;

	var radioLength = radioObj.length;

	if(radioLength == undefined) {

		radioObj.checked = (radioObj.value == newValue.toString());

		return;

	}



for(var j = 1; j <= radioLength; j++) {

	

	var box=document.getElementById ("checkbox" + j);

	

	if (j == newValue) 

		box.className = ("gjr_voteactive" + j);

	else

		box.className = ("gjr_votebutton" + j);

	}





for(var i = 0; i < radioLength; i++) {

		radioObj[i].checked = false;

		if(radioObj[i].value == newValue.toString()) {

			radioObj[i].checked = true;

		}

	}

}