(Concluded) The Company’s gross realized gains on the sale of investments for the years ended December 31, 2009, 2010 and 2011  were NT$553 million, NT$476 million and NT$137 million, respectively. The Company’s gross realized losses on the sale  of investments for the years ended December 31, 2009, 2010 and 2011 were NT$695 million, NT$654 million and NT$84  million, respectively. The carrying amounts at December 31, 2011 for debt securities classified as available-for-sale securities and held-to- maturity by contractual maturity are shown below. The following table shows the gross unrealized losses and fair value of the investments with unrealized losses that are not  deemed to be other-than-temporary impaired, aggregated by investment category and length of time that have been in a  continuous unrealized loss position as of December 31, 2011: The gross unrealized losses related to mutual funds, stocks and corporate bonds were due to fair value fluctuations.  The Company reviewed its investment portfolio to identify and evaluate investments that have indications of possible  impairment. Factors that were considered in determining whether a loss is other-than-temporary included but were  not limited to, the length of time and extent to which fair value has been less than the cost basis, credit quality and the  Company’s ability and intent to hold the investment for a period of time sufficient to allow for any anticipated recovery  in market value. As a result, the Company determined that aforementioned investments with unrealized losses were not  deemed to be other-than-temporarily impaired as of December 31, 2011. F-76 PART III Less than 12 Months 12 Months or Greater Total Fair Unrealized Fair Unrealized Fair Unrealized Value Losses Value Losses Value Losses NT$ NT$ NT$ NT$ NT$ NT$ (In Millions) Open-end-mutual funds  $  80  $  (7)  $  5  $  (2)  $  85  $  (9) Domestic listed stocks 160 (29) 36 (25) 196 (54) Corporate bond 2,546 (4) ─ ─ 2,546 (4)  $  2,786  $  (40)  $  41  $  (27)  $  2,827  $  (67) December 31, 2011 NT$ (In Millions) Due within one year or less $  1,226 Due after one year through four years 13,547 $  14,773 December 31, 2011 Carrying Amount Unrealized Gain Unrealized Loss NT$ NT$ NT$ (In Millions) Held-to-maturity securities $  13,790 $  129 $  4 Corporate bond 906 6 ─ Bank debentures 14,696 135 4 $  17,253 $  268 $  67