stuff from eric javascript goodness

:)