if your going to use MyOldPM like that, you need to declare it as global... outside of any functions put
code:
var MyOldPM;
and then just use MyOldPM like normal in ur script once it's been set, but you don't use var MyOldPM again, just in that initial declaration
EDIT: Beaten x2