Usually, in javascript, I use [""] to convert a string into a variable:
["variable_name"] = variable_value;
// same as variable_name = variable_value
And to be clear I've used window["variable_name"] = varialbe_value. IE just dont' understand the [""] part.
eval() can work but I've been told not to use eval() (cause it's dangerous). So is there any other option?