Functions ucfirst and strtolower in javascript