Armenian ex-president Kocharyan detained after court ruling - lawyer