Beginnings of the map editor created, common functions from lord2.js moved into l2lib.js for sharing.