How far from an openable window, door or gravity inlet shall the vent stack of a gas fired waterheater terminate?

How far from an openable window, door or gravity inlet shall the vent stack of a gas fired waterheater terminate?