Figured it out finally, it had to do with freeze_mode. I thought I was being clever by setting freeze_mode = is(panel1,SHOW). That messed it up but it was very well disguised as working for a while. I changed it to freeze_mode = (freeze_mode==0) and now it works perfectly.

Moral of the story is that the is() macro doesn't return 1's and 0's per se, so don't set a variable to it as though it returns a numerical value. Lesson learned.

Thanks for everyone's help. MrGuest, I was able to use bits of your code to really improve the movement and make the box not "snap" to the mouse in the upper left corner. Thank you--I really appreciate that.