
function checkRadio(myObj, errorMes){
	var mylen = myObj.length;

	if (mylen == null) {
		if(myObj.checked==true)
			return true;
	} else {
		for(i=0;i<mylen;i++) {
			if(myObj[i].checked==true)
				return true;
		}
	}
        
    //Radio button arrays don't support the focus method
    return noFocusErrorHandler(myObj,errorMes);
}


// This function returns the selected radio button value
function getValueRadio(myObj)
{
	var mylen = myObj.length;
	// check to see if there is only one
	if (mylen == null)
	{
      	if (myObj.checked==true) 
      		return myObj.value;
  	} else {
            for(i=0;i<mylen;i++)
            {
                if(myObj[i].checked==true)
                    return myObj[i].value;
            }
	}

	return "";
}	
