if (wPage) CF.widget((addr)).setImage(CF.widget((addr)).getImage(0));
Yeah, I think Lyndel is on to it ... what is addr .. is it a variable you've set? If so, it should resolve to a string reference ... otherwise your script won't work. You also shouldn't need the double parens. If addr is a widget object reference that you've set like:
var addr = CF.widget("widget","page");
then you maybe should be doing something like:
addr.setImage(addr.getImage(0));
... but it all depends on what addr is. Maybe you just need quotes instead of braces ... the way you've referenced it, addr is a variable of some sort.