JavaScript overloading sucks