Microsoft to take $6.2 bln writedown for online ad service