//  File provided free and as is
//  Programmed by Shawn Olson
//  http://www.shawnolson.net
//  Permission is granted to use this file provided credit is given to Shawn Olson
//  and a link is provided somewhere on your site to www.shawnolson.net


function smo_selectRadioValues(value,theElements) {
	//Programmed by Shawn Olson
	//Copyright (c) 2007
	//Permission to use this function provided that it always includes this credit text
	//  http://www.shawnolson.net
	//Find more JavaScripts at http://www.shawnolson.net/topics/Javascript/
	//This script was modified from the function checkUncheckSome() also
	//created by Shawn Olson

	//theElements is an array of objects designated as a comma separated list of their IDs
    //All Radio inputs with a value matching value will be selected inside theElements


     var formElements = theElements.split(',');
	 for(var z=0; z<formElements.length;z++){
	  theItem = document.getElementById(formElements[z]);
	  if(theItem){
	  theInputs = theItem.getElementsByTagName('input');
	  for(var y=0; y<theInputs.length; y++){
	   if(theInputs[y].type == 'radio'){
         theName = theInputs[y].name;
         if(theInputs[y].value==value){
		   theInputs[y].checked='checked';
		 }
	    }
	  }
	  }
     }
    }