Israeli troops have detained a top member of the Palestinian militant group Hamas during a raid on an apartment building in the West Bank city of Tulkarem .