AC problem

My AC blows cold while driving, but when I have to stop and sit for a few minutes it begins to blow hot air. When I resume driving, it begins to blow cold again.

See this thread also from today: http://community.cartalk.com/posts/list/2144208.page