Javascript useful functions in case of you don't want to use jQuery in your project