flipbox function

A flipBox based on the W3C example