FML
In some browsers like Firefox the event has to be passed as a parameter, so you have to replace this code
div.addEventListener("mousemove", function(){test(event, this)}, true);
with this
div.addEventListener("mousemove", function(event){test(event, this)}, true);
Compare carefully the two lines of code and notice the event property passed as parameter of the function added into the second row.
for old IE ver attachEvent()
has to be used;
div.attachEvent("onclick", function(event){test(event, this)});
Notice that attachEvent has been replaced in modern standard js with addEventListener and now almost all modern browser support that.
Here http://caniuse.com/#feat=addeventlistener is possible to see compatibility table.