added average time over intervals
added checks to input
Added javascript that executes on page load
Merge pull request #2 from jonathanmeisel/jm

Jm