javascript more compatible + start of doc