Functions ucfirst and strtolower in javascript

The functions ucfirst and strtolower do not exist in javascript and were replaced with the respective functions.