| **Acquisitions and Intangible Assets** | 6 Months Ended                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
||
| **Business Combinations [Abstract]**   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Acquisitions and Intangible Assets     | Acquisitions and Intangible AssetsOn October 26, 2012, the Bank completed the purchase of a branch at 63 Union Street in Rockland, Maine, from Camden National Bank that was formerly operated by Bank of America. As part of the transaction, the Bank acquired approximately $32,300,000 in deposits as well as a small volume of loans. The purchase premium of $2,553,000 was allocated to assets acquired and liabilities assumed based on estimates of fair value at the date of acquisition. The fair value of the deposit accounts assumed was compared to the carrying amounts received and the difference of $432,000 was recorded as core deposit intangible. The core deposit intangible is subject to amortization over the estimated ten-year average life of the acquired core deposit base and will be evaluated for impairment periodically. The amortization expense is included in  noninterest expense in the consolidated statements of income and comprehensive income (loss) and is deductible for tax purposes.The excess of the purchase price over the fair value of the assets acquired, liabilities assumed, and the amount allocated for core deposit intangible totaled $2,121,000 and was recorded as goodwill. The goodwill is not amortizable for GAAP but is amortizable for tax purposes. On January 14, 2005, the Company acquired FNB Bankshares (“FNB”) of Bar Harbor, Maine, and its subsidiary, The First National Bank of Bar Harbor. The total value of the transaction was $47,955,000, and all of the voting equity interest of FNB was acquired in the transaction. The transaction was accounted for as a purchase and the excess of purchase price over the fair value of net identifiable assets acquired equaled $27,559,000 and was recorded as goodwill, none of which was deductible for tax purposes. The portion of the purchase price related to the core deposit intangible is being amortized over its expected economic life. Goodwill is evaluated annually for possible impairment under the provisions of FASB ASC Topic 350, “Intangibles – Goodwill and Other”.  As of December 31, 2013, in accordance with Topic 350, the Company completed its annual review of goodwill and determined there has been no impairment. The Bank also carries $125,000 in goodwill for a de minimus transaction in 2001. As of December 31, 2013, the amortization expense related to the core deposit intangible, absent any future impairment, is expected to be as follows:2014$326,000201543,000201643,000201743,000201843,000Thereafter174,000Total$672,000 |

| X                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| - Definition
The entire disclosure for a business combination (or series of individually immaterial business combinations) completed during the period, including background, timing, and recognized assets and liabilities. The disclosure may include leverage buyout transactions (as applicable).
+ References
Reference 1: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 1 -URI http://asc.fasb.org/extlink&oid=25497992&loc=d3e1383-128463Reference 2: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 2 -URI http://asc.fasb.org/extlink&oid=7488404&loc=d3e6996-128479Reference 3: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 20 -Section 50 -Paragraph 2 -URI http://asc.fasb.org/extlink&oid=6910749&loc=d3e4922-128472Reference 4: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 20 -Section 50 -Paragraph 4 -URI http://asc.fasb.org/extlink&oid=6910749&loc=d3e4934-128472Reference 5: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 20 -Section 50 -Paragraph 3 -URI http://asc.fasb.org/extlink&oid=6910749&loc=d3e4926-128472Reference 6: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 3 -URI http://asc.fasb.org/extlink&oid=7488404&loc=d3e7000-128479Reference 7: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 2 -URI http://asc.fasb.org/extlink&oid=25497992&loc=d3e1392-128463Reference 8: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 3 -URI http://asc.fasb.org/extlink&oid=25497992&loc=d3e1486-128463Reference 9: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 1 -URI http://asc.fasb.org/extlink&oid=7488404&loc=d3e6927-128479Reference 10: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 5 -URI http://asc.fasb.org/extlink&oid=25497992&loc=d3e1497-128463Reference 11: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 4 -URI http://asc.fasb.org/extlink&oid=25497992&loc=d3e1490-128463Reference 12: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 30 -Section 50 -Paragraph 4 -URI http://asc.fasb.org/extlink&oid=7488404&loc=d3e7008-128479Reference 13: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 20 -Section 50 -Paragraph 1 -URI http://asc.fasb.org/extlink&oid=6910749&loc=d3e4845-128472Reference 14: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 6 -URI http://asc.fasb.org/extlink&oid=25497992&loc=d3e1500-128463Reference 15: http://www.xbrl.org/2003/role/presentationRef -Publisher FASB -Name Accounting Standards Codification -Topic 805 -SubTopic 10 -Section 50 -Paragraph 7 -URI http://asc.fasb.org/extlink&oid=25497992&loc=d3e1524-128463
+ Details**Name:**us-gaap_BusinessCombinationDisclosureTextBlock**Namespace Prefix:**us-gaap_**Data Type:**nonnum:textBlockItemType**Balance Type:**na**Period Type:**duration |
| X                                                                                                                                                                |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| - Details**Name:**us-gaap_BusinessCombinationsAbstract**Namespace Prefix:**us-gaap_**Data Type:**xbrli:stringItemType**Balance Type:**na**Period Type:**duration |