Possible Duplicates:
Is there a way to access a javascript variable using a string that contains the name of the variable?
JavaScript: Get local variable dynamicly by name string
A simple code to illustrate my problem -
var chat_1 = "one";
var chat_2 = "two";
var id = "1";
var new = ?? variabalize( 'chat_' + id )
I want the variable new to be assigned the value of variable - chat_1 which is "one"