What are the neurological mechanisms for a fear of heights when atop a building, but not in a plane? A fear of heights (or acrophobia), can be debilitating (I know it can be for me).

My question is what is the neurological mechanisms that cause a fear of heights in a tall object such as a skyscraper or bridge, but not really occurring in a plane?

I have found that I can not stand too close to a window in the upper floors of a tall building, but will happily look out the window in a plane, inflight and while landing and taking off.
A fear of heights on buildings is very common because there are natural vestibular and vertigo responses within certain height ranges. Furthermore, the effect is heightened if you're exposed to the elements out on a balcony as opposed to within the building. 

Fear of flying is almost always related to the sensations of landing and taking off. If you've flown before you'll notice that those two events are very turbulent and it even seems amazing that some airplanes can stay together. However, once in the air you don't have the same effects of acrophobia that many people have on high buildings. Essentially, all perspective of height is removed when you look out the window of an airplane and thus the cues that trigger acrophobia. Your brain sees it like a painting of things in the distance and doesn't process it as height in the same way at all.

Brandt, T., Arnold, F., Bes, W., &amp; Kapteyn, T. S. (1989). "The mechanism of physiological height vertigo. I. Theoretical approach and psychophysics". Acta Otolaryngol, 5-6, 513-23.