aggregation by metals speculators and others, expectations for inflation, central bank sales, custom smelter activities, the relative exchange rate of the  U.S. dollar, purchases and lending, investor sentiment, and global mine production levels. The aggregate effect of these factors is impossible to  predict. Because our revenue is derived from the sale of silver, gold, lead, and zinc, our earnings are directly related to the prices of these metals. O. Foreign Currency  – The functional currency for our operations located in the U.S., Mexico and Canada was the U.S. dollar for all periods  presented. Accordingly, for the San Sebastian unit in Mexico and our Canadian office, we have translated our monetary assets and liabilities at the  period-end exchange rate, and non-monetary assets and liabilities at historical rates, with income and expenses translated at the average exchange  rate for the current period. All translation gains and losses have been included in the current period net income (loss). For the years ended December 31, 2012, 2011 and 2010, we recognized total net foreign exchange losses of $0.1 million, $0.2 million and $37,000,  respectively.  P. Risk Management Contracts  – We use derivative financial instruments as part of an overall risk-management strategy that is used as a means of  managing exposure to base metals prices and interest rates. We do not hold or issue derivative financial instruments for speculative trading purposes. We measure derivative contracts as assets or liabilities based on their fair value. Gains or losses resulting from changes in the fair value of derivatives  in each period are recorded either in current earnings or other comprehensive income (“OCI”), depending on the use of the derivative, whether it  qualifies for hedge accounting and whether that hedge is effective. Amounts deferred in OCI are reclassified to sales of products (for metals price- related contracts) or interest expense (for interest rate-related contracts) when the hedged transaction has occurred. Ineffective portions of any change  in fair value of a derivative are recorded in current period other operating income (expense). In the second quarter of 2010 we began utilizing two financially-settled forward contract programs to manage the exposure to changes in prices of  zinc and lead contained in (i) our concentrate shipments between the time of sale and final settlement and (ii) our forecasted future concentrate  shipments. The contracts under these programs do not qualify for hedge accounting, and are marked-to-market through earnings each period. See  Note 10 for additional information on base metal derivative contracts, including open positions as of December 31, 2012. Q. Stock Based Compensation  – The fair value of the equity instruments granted to employees are estimated on the date of grant using the  Black-Scholes pricing model (see Note 9 for information on the methodologies and assumptions used). We recognized stock-based compensation  expense of approximately $3.1 million, $2.1 million, and $3.4 million, respectively, during 2012, 2011 and 2010, which was recorded to general and  administrative expenses, exploration and cost of sales and other direct production costs. As of December 31, 2012, the majority of the instruments  outstanding were fully vested. For additional information on our employee stock option and unit compensation, see Note 9. R. Legal Costs  – Legal costs incurred in connection with a potential loss contingency are accrued and recorded to expense as incurred. S. Basic and Diluted Income (Loss) Per Common Share  – We calculate basic earnings per share on the basis of the weighted average number of  common shares outstanding during the period. Diluted earnings per share is calculated using weighted average number of common shares  outstanding during the period plus the effect of potential dilutive common shares during the period using the treasury stock and if-converted  methods. Potential dilutive common shares include outstanding stock options, unvested restricted stock awards, stock units, warrants and convertible  preferred stock for periods in which we have reported net income. For periods in which we reported net losses, potential dilutive common shares are  excluded, as their conversion and exercise would be anti-dilutive. See Note 13 for additional information. T. Comprehensive Income (Loss)  – In addition to net income (loss), comprehensive income (loss) includes certain changes in equity during a  period, such as adjustments to minimum pension liabilities, adjustments to recognize the over-funded or underfunded status of our defined benefit  pension plans, and cumulative unrecognized changes in the fair value of available for sale investments, net of tax, if applicable. U. Fair Value Measurements  – We disclose the following information for each class of assets and liabilities that are measured at fair value: V. New Accounting Pronouncements  – In June 2011, the Financial Accounting Standards Board (“FASB”) issued Accounting Standards Update  (“ASU”) 2011-05, which, among other things, amended Subtopic 220 with respect to the presentation of other comprehensive income and its  components in the financial statements. The update amended Subtopic 220 so that a SEC filer may present other comprehensive income either in a  single continuous statement or in two separate but consecutive statements. The filer is also required to present on the face of the financial statements  reclassification adjustments for items that are reclassified from other comprehensive income to net income in the statements where the components of  net income and the components of other comprehensive income are presented. The amendments in this update apply to both annual and interim  periods beginning after December 15, 2011, with the exception of the amendment regarding presentation of reclassification adjustments, which has  been deferred to a later date. Adoption of this guidance did not have a material impact on our consolidated financial statements. In May 2011, the FASB issued ASU 2011-04, which amends Subtopic 820 to clarify the application of existing common fair value measurement and  F-10 [ HL:10-K ]  a. the fair value measurement; b. the level within the fair value hierarchy in which the fair value measurements in their entirety fall, segregating fair value measurements using  quoted prices in active markets for identical assets or liabilities (Level 1), significant other observable inputs (Level 2), and significant  unobservable inputs (Level 3); c. for fair value measurements using significant unobservable inputs (Level 3), a reconciliation of the beginning and ending balances,  separately presenting changes during the period attributable to the following: (1) total gains or losses for the period (realized and unrealized), segregating those gains or losses included in earnings, and a description  of where those gains or losses included in earnings are reported in the statement of operations; (2) the amount of these gains or losses attributable to the change in unrealized gains or losses relating to those assets or liabilities still  held at the reporting period date and a description of where those unrealized gains or losses are reported; (3) purchases, sales, issuances, and settlements (net); and (4) transfers into and/or out of Level 3. d. the amount of the total gains or losses for the period in (c)(1) included in earnings that are attributable to the change in unrealized gains or  losses relating to those assets and liabilities still held at the reporting date and a description of where those unrealized gains or losses are  reported in the statement of operations; and e. in annual periods only, the valuation technique(s) used to measure fair value and a discussion of changes in valuation techniques, if any,  during the period.