Add type="text/javascript" to script
Replace contains with indexOf

contains is apparently only available on Firefox