Improvements and some additional functionality

Hi OberstK,
as promised, I did some improvements to your javascript.
I added some comments to my changes and some questions.

I didn't know how much you actually know about Javascript...
If you want, I could expand on a few things.

Otherwise, have fun reviewing the request and have some nice LoL-Games :wink:
valentinouno.
that makes sense :)