assign it in a function, not in the definition.

Code:
function initpan_startup(){
  test1_pan.emask |= ENABLE_CLICK;
  test1_pan.event = b;
}