Possible Duplicate:
How to execute a JavaScript function when I have its name as a string
I have this function
function myfunc() {
alert('it worked!');
}
and this variable which is a string
var callback = 'myfunc';
How do I trigger the function from that string?