Javascript stupidity