Small project rewriting Javascript from Yahoo weather widget