Use onmouseup instead of onclick because IE8 will set event.button=0 for middle mouse button when using onclick!