functionality errors seem to be resolved

When using string matching, much better to set the comparison string to lowercase: eg response.toLowerCase()
Also, you don't need to check substring here just incase the server changes format etc, better to use indexOf() > -1 (-1 is returned if it doesn't match)

so  'else if (response.toLowerCase().indexOf("draw") > -1)'

Shout me if this makes no sense