Stock Option Plan and Employee Stock Purchase Plan (Details) (USD $)
3 Months Ended 9 Months Ended
Apr. 30, 2011
Jan. 31, 2011
Oct. 31, 2010
Apr. 30, 2010
Apr. 30, 2011
Apr. 30, 2010
Stock Option Plan and Employee Stock Purchase Plan            
Aggregate maximum number of shares of common stock which may be issued under stock option plan 8,962,500       8,962,500  
Maximum term for grants of incentive and non-qualified stock-based awards, excluding incentive stock-based awards granted to stockholders who own more than 10% of the voting power 10       10  
Maximum term for incentive stock-based awards granted to stockholders who own more than 10% of the voting power 5       5  
Percentage of a stockholder's voting power that limits the contractual term of an incentive stock-based award 10.00%       10.00%  
Aggregate net number of stock-based awards granted under stock option plan 6,529,470       6,529,470  
Aggregate Number Of Canceled Stock Based Awards Under Stock Option Plan 1,253,730       1,253,730  
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range, Lower Range Limit         $ 3.13  
Share-based Compensation, Shares Authorized under Stock Option Plans, Exercise Price Range, Upper Range Limit         $ 51.65  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Number, Ending Balance 3,010,495 3,181,008 3,274,208   3,010,495  
Number of stock-based awards, including stock appreciation rights, exercised as of balance sheet date 3,518,975       3,518,975  
Number of stock appreciation rights exercised as of balance sheet date 750       750  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Number, Beginning Balance 3,181,008 3,274,208 3,520,667   3,520,667  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Grants in Period 30,000   2,000      
Share-based Compensation Arrangement by Share-based Payment Award, Options, Forfeitures and Expirations in Period (184,663) (64,050) (210,664)      
Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercises in Period (15,850) (29,150) (37,795)   (82,795) (91,697)
Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Number, Ending Balance 3,010,495 3,181,008 3,274,208   3,010,495  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Number 1,824,592       1,824,592  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Expected to Vest, Outstanding, Number 1,059,097       1,059,097  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Weighted Average Exercise Price, Beginning of Period $ 32.84 $ 32.78 $ 32.75   $ 32.75  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Grants in Period, Weighted Average Exercise Price $ 27.87   $ 27.35   $ 27.87  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Forfeitures and Expirations in Period, Weighted Average Exercise Price $ 35.49 $ 38.16 $ 35.28      
Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercises in Period, Weighted Average Exercise Price $ 18.54 $ 13.69 $ 16.21   $ 18.54  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Weighted Average Exercise Price, End of Period $ 32.71 $ 32.84 $ 32.78   $ 32.71  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Weighted Average Exercise Price $ 32.84       $ 32.84  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Expected to Vest, Weighted Average Exercise Price $ 32.35       $ 32.35  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Weighted Average Remaining Contractual Term 3.52       3.52  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Weighted Average Remaining Contractual Term         2.04  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Expected to Vest, Weighted Average Remaining Contractual Term 5.81       5.81  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Intrinsic Value $ 5,197,000       $ 5,197,000  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Intrinsic Value 5,182,000       5,182,000  
Share-based Compensation Arrangement by Share-based Payment Award, Options, Expected to Vest, Intrinsic Value 14,000       14,000  
Number of stock appreciation rights outstanding as of the balance sheet date 38,500       38,500  
Total intrinsic value of stock-based awards exercised $ 148,000     $ 345,000 $ 1,135,000 $ 1,578,000
Total number of common shares reserved for issuance under employee stock purchase plan 675,000       675,000  
Percentage of fair market value at which eligible employees can acquire common stock under employee stock purchase plan 85.00%       85.00%  
Total number of shares of common stock issued to employees under employee stock purchase plan and through the end of the reporting period 416,718       416,718 Â