Here is an example of how to keep a door open while the player is near it, then close the door as the player leaves the area. The concept can be used in many other situations. Feel free to use this setup in your maps wherever you need it, just give me credit in your readme file.
I like the door itself too
http://www.gamedesign.net/book/view/6