javascript more compatible + start of doc
Merge pull request #13 from lecousin/master

javascript more compatible + start of doc