Javascript Use String As Variable Resistor