I've wrote a security gate script with a
codepad.
The difference with my script is that I use a object that represent a button (with addactions) to activate them and the doors open sideways.
Actually, the math was borrowed from another script (author unknown)
Your script is something I couldn't figure out, they sway open, very nice stuff indeed