Degrade gracefully

Removed dependency for Javascript while retaining Javascript
functionality. I also fixed the issue with some browsers rendering the
top left/right corners incorrectly.