| 
         Derivative Instruments and Hedging Activities (Tables)
 | 12 Months Ended | 
      
       | 
         Jun. 30, 2014 | 
      
       | General Discussion of Derivative Instruments and Hedging Activities [Abstract] |  | 
      
       | Schedule of Derivative Instruments, Location, Designated and Non-Designated, Gains (Losses) | 
         
          The locations and amounts of designated and non-designated derivative instruments’ gains and losses reported in the consolidated financial statements for the indicated periods were as follows:
          
          
           
            
             
              |  |  
              |  |  |  |  |  |  |  |  |  |  
              | 
                (In thousands)
                | 
                Location in Financial Statements
                | 
                Year ended June 30,
                |  
              | 
                2014
                | 
                
                | 
                2013
                |  
              | 
                Derivatives Designated as Hedging Instruments
                | 
                
                | 
                
                | 
                
                | 
                
                |  
              | 
                Gains in accumulated OCI on derivatives (effective portion)
                | 
                Accumulated OCI
                | 
                $
                | 
                1,641
                | 
                
 | 
                
                | 
                $
                | 
                4,929
                | 
                
 |  
              | 
                Gains (losses) reclassified from accumulated OCI into income (effective portion):
                | 
                再保险venues
                | 
                $
                | 
                3,851
                | 
                
 | 
                
                | 
                $
                | 
                2,124
                | 
                
 |  
              | 
                
                | 
                Costs of revenues
                | 
                294
                | 
                
 | 
                
                | 
                (641
                | 
                )
                |  
              | 
                
                | 
                Net gains reclassified from accumulated OCI into income (effective portion)
                | 
                $
                | 
                4,145
                | 
                
 | 
                
                | 
                $
                | 
                1,483
                | 
                
 |  
              | 
                Gains recognized in income on derivatives (ineffective portion and amount excluded from effectiveness testing)
                | 
                Interest income and other, net
                | 
                $
                | 
                18
                | 
                
 | 
                
                | 
                $
                | 
                946
                | 
                
 |  
              | 
                Derivatives Not Designated as Hedging Instruments
                | 
                
                | 
                
                | 
                
                | 
                
                |  
              | 
                Gains recognized in income
                | 
                Interest income and other, net
                | 
                $
                | 
                2,856
                | 
                
 | 
                
                | 
                $
                | 
                14,275
                | 
                
 |  | 
      
       | Schedule of Notional Amounts of Derivatives Outstanding | 
         
          The U.S. dollar equivalent of all outstanding notional amounts of hedge contracts, with maximum maturity of
          13 months
          , as of the dates indicated below was as follows:
          
          
           
            
             
              |  |  
              |  |  |  |  |  |  |  |  |  
              | 
                (In thousands)
                | 
                As ofJune 30, 2014
 | 
                
                | 
                As ofJune 30, 2013
 |  
              | 
                Cash flow hedge contracts
                | 
                
                | 
                
                | 
                
                |  
              | 
                Purchase
                | 
                $
                | 
                6,066
                | 
                
 | 
                
                | 
                $
                | 
                14,641
                | 
                
 |  
              | 
                Sell
                | 
                $
                | 
                33,999
                | 
                
 | 
                
                | 
                $
                | 
                35,178
                | 
                
 |  
              | 
                Other foreign currency hedge contracts
                | 
                
                | 
                
                | 
                
                |  
              | 
                Purchase
                | 
                $
                | 
                108,901
                | 
                
 | 
                
                | 
                $
                | 
                99,175
                | 
                
 |  
              | 
                Sell
                | 
                $
                | 
                106,322
                | 
                
 | 
                
                | 
                $
                | 
                97,901
                | 
                
 |  | 
      
       | Schedule of Derivative Instruments, Fair Value | 
         
          
          The locations and fair value amounts of the Company’s derivative instruments reported in its Consolidated Balance Sheets as of the dates indicated below were as follows:
          
          
           
            
             
              |  |  
              |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
              | 
                
                | 
                Asset Derivatives
                | 
                
                | 
                Liability Derivatives
                |  
              | 
                
                | 
                Balance Sheet Location
                | 
                
                | 
                June 30,2014
 | 
                
                | 
                June 30,2013
 | 
                
                | 
                Balance Sheet Location
                | 
                
                | 
                June 30,2014
 | 
                
                | 
                June 30,2013
 |  
              | 
                (In thousands)
                | 
                
                | 
                Fair Value
                | 
                
                | 
                
                | 
                
                | 
                Fair Value
                |  
              | 
                Derivatives designated as hedging instruments
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                |  
              | 
                Foreign exchange contracts
                | 
                Other current assets
                | 
                
                | 
                $
                | 
                120
                | 
                
 | 
                
                | 
                $
                | 
                362
                | 
                
 | 
                
                | 
                Other current liabilities
                | 
                
                | 
                $
                | 
                100
                | 
                
 | 
                
                | 
                $
                | 
                384
                | 
                
 |  
              | 
                Total derivatives designated as hedging instruments
                | 
                
                | 
                
                | 
                120
                | 
                
 | 
                
                | 
                362
                | 
                
 | 
                
                | 
                
                | 
                
                | 
                100
                | 
                
 | 
                
                | 
                384
                | 
                
 |  
              | 
                Derivatives not designated as hedging instruments
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                |  
              | 
                Foreign exchange contracts
                | 
                Other current assets
                | 
                
                | 
                546
                | 
                
 | 
                
                | 
                3,654
                | 
                
 | 
                
                | 
                Other current liabilities
                | 
                
                | 
                798
                | 
                
 | 
                
                | 
                1,789
                | 
                
 |  
              | 
                Total derivatives not designated as hedging instruments
                | 
                
                | 
                
                | 
                546
                | 
                
 | 
                
                | 
                3,654
                | 
                
 | 
                
                | 
                
                | 
                
                | 
                798
                | 
                
 | 
                
                | 
                1,789
                | 
                
 |  
              | 
                Total derivatives
                | 
                
                | 
                
                | 
                $
                | 
                666
                | 
                
 | 
                
                | 
                $
                | 
                4,016
                | 
                
 | 
                
                | 
                
                | 
                
                | 
                $
                | 
                898
                | 
                
 | 
                
                | 
                $
                | 
                2,173
                | 
                
 |  | 
      
       | Balances and Changes in Accumulated Other Comprehensive Income Related to Derivative Instruments | 
         
          The following table provides the balances and changes in accumulated OCI, before taxes, related to derivative instruments for the indicated periods:
          
          
           
            
             
              |  |  
              |  |  |  |  |  |  |  |  |  |  
              | 
                
                | 
                
                | 
                Year endedJune 30, 2014
 |  
              | 
                (In thousands)
                | 
                
                | 
                2014
                | 
                
                | 
                2013
                |  
              | 
                Beginning balance
                | 
                
                | 
                $
                | 
                2,484
                | 
                
 | 
                
                | 
                $
                | 
                (962
                | 
                )
                |  
              | 
                Amount reclassified to income
                | 
                
                | 
                (4,145
                | 
                )
                | 
                
                | 
                (1,483
                | 
                )
                |  
              | 
                Net change
                | 
                
                | 
                1,641
                | 
                
 | 
                
                | 
                4,929
                | 
                
 |  
              | 
                Ending balance
                | 
                
                | 
                $
                | 
                (20
                | 
                )
                | 
                
                | 
                $
                | 
                2,484
                | 
                
 |  | 
      
       | 抵消的衍生品资产和负债 | 
         
          As of
          June 30, 2014
          and
          2013
          , information related to the offsetting arrangements was as follows (in thousands):
          
          
           
            
             
              |  |  
              |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
              | 
                As of June 30, 2014
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                Gross Amounts of Derivatives Not Offset in the Consolidated Balance Sheets
                | 
                
                | 
                
                |  
              | 
                Description
                | 
                
                | 
                Gross Amounts of Derivatives
                | 
                
                | 
                Gross Amounts of Derivatives Offset in the Consolidated Balance Sheets
                | 
                
                | 
                Net Amount of Derivatives Presented in the Consolidated Balance Sheets
                | 
                
                | 
                Financial Instruments
                | 
                
                | 
                Cash Collateral Received
                | 
                
                | 
                Net Amount
                |  
              | 
                Derivatives - Assets
                | 
                
                | 
                $
                | 
                666
                | 
                
 | 
                
                | 
                $
                | 
                —
                | 
                
 | 
                
                | 
                $
                | 
                666
                | 
                
 | 
                
                | 
                $
                | 
                (423
                | 
                )
                | 
                
                | 
                $
                | 
                —
                | 
                
 | 
                
                | 
                $
                | 
                243
                | 
                
 |  
              | 
                Derivatives - Liabilities
                | 
                
                | 
                $
                | 
                (898
                | 
                )
                | 
                
                | 
                $
                | 
                —
                | 
                
 | 
                
                | 
                $
                | 
                (898
                | 
                )
                | 
                
                | 
                $
                | 
                423
                | 
                
 | 
                
                | 
                $
                | 
                —
                | 
                
 | 
                
                | 
                $
                | 
                (475
                | 
                )
                |  
           
            
             
              |  |  
              |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  
              | 
                As of June 30, 2013
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                
                | 
                Gross Amounts of Derivatives Not Offset in the Consolidated Balance Sheets
                | 
                
                | 
                
                |  
              | 
                Description
                | 
                
                | 
                Gross Amounts of Derivatives
                | 
                
                | 
                Gross Amounts of Derivatives Offset in the Consolidated Balance Sheets
                | 
                
                | 
                Net Amount of Derivatives Presented in the Consolidated Balance Sheets
                | 
                
                | 
                Financial Instruments
                | 
                
                | 
                Cash Collateral Received
                | 
                
                | 
                Net Amount
                |  
              | 
                Derivatives - Assets
                | 
                
                | 
                $
                | 
                4,016
                | 
                
 | 
                
                | 
                $
                | 
                —
                | 
                
 | 
                
                | 
                $
                | 
                4,016
                | 
                
 | 
                
                | 
                $
                | 
                (1,520
                | 
                )
                | 
                
                | 
                $
                | 
                —
                | 
                
 | 
                
                | 
                $
                | 
                2,496
                | 
                
 |  
              | 
                Derivatives - Liabilities
                | 
                
                | 
                $
                | 
                (2,173
                | 
                )
                | 
                
                | 
                $
                | 
                —
                | 
                
 | 
                
                | 
                $
                | 
                (2,173
                | 
                )
                | 
                
                | 
                $
                | 
                1,520
                | 
                
 | 
                
                | 
                $
                | 
                —
                | 
                
 | 
                
                | 
                $
                | 
                (653
                | 
                )
                |  |