I have the following code in Javascript:
jQuery(document).ready(function(){ var actions = new Object(); var actions; actions[0] = \'create\';
You'll need a reference to the scope object in which you want to create the functions. If it's the global scope you can use window:
window
window[ actions[key] + "Dialog" ] = function(){ ... }