cyclegadget:
Might be other problems but, "enable" needs to be set as OUTPUT.
Additionally, "enable" is always set to 255 after either of the doorup() or doordown() function calls. It's never set to anything but "i", and "i' isn't set to anything but the default 255. If it doesn't need to be anything else, ever, you could analogWrite(enable, i); in init() after you set it to output.
Cheers ! Geoff