How to fix undefined variable error in JavaScript

visit shbcf.ru