hello,
if i'm right, your using wm2002/2003, and when the batteries go dead with those platforms it's the equivalent to a hard reset.The backup battery is only good for 30 minutes or so.there is no way to stop this, you just have to keep it charged. If you upgrade to a wm5 device then you won't have this problem because unlike your current os that stores all your info in the ram, wm5 handles memory differently, storing all your info in rom memory and so you don't lose it wen the battery dies.
i'm 99% sure i'm pointing you in the right direction, and i'm 100% sure that if i'm not then the more knowledgeable people here will correct me!. you've come to the right place, it's a great site!