Where am I going wrong with this javascript?

Printable View