It's not clear exactly what you're trying to accomplish, but you can access variables by name as properties of an object.
// this is the container to hold your named variables
// (which will be properties of this object)
var container = {};
function setVariableIndirectly(obj){
var second = obj.className; // returns "read"
var first = obj.parentNode.className; // returns "group"
// this is how you access a property of an object
// using a string as the property name
container[first + "_" + second] = "set this as the new variable";
// in your example container["read_group"] would now be set
}
It's probably better to put your variables on your own container object as shown above, but you can also access global variables via properties on the window
object.