"var curX = event.pageX || event.targetTouches[0].pageX;"

Can't event.pageX have a value of 0 when using MSPointer events?

OT: I could not test it, as they are only supported in IE10 version that requires avalability of spare current generation computer, which I lack thereof.