var CO2Levels=Class.create();

CO2Levels.prototype = {
/*
Source: http://scrippsco2.ucsd.edu/data/in_situ_co2/monthly_mlo.csv
Mauna Loa Observatory, Hawaii
*/
    initialize: function(){
        this.levels={ "1959":315.98,"1960":316.91,"1961":317.65,"1962":318.45,
            "1963":318.99,"1964":319.52,"1965":320.03,"1966":321.37,"1967":322.18,
            "1968":323.05,"1969":324.62,"1970":325.68,"1971":326.32,"1972":327.46,
            "1973":329.68,"1974":330.25,"1975":331.15,"1976":332.15,"1977":333.90,
            "1978":335.50,"1979":336.85,"1980":338.69,"1981":339.93,"1982":341.13,
            "1983":342.78,"1984":344.42,"1985":345.90,"1986":347.15,"1987":348.93,
            "1988":351.48,"1989":352.91,"1990":354.19,"1991":355.59,"1992":356.37,
            "1993":357.04,"1994":358.88,"1995":360.88,"1996":362.64,"1997":363.76,
            "1998":366.63,"1999":368.31,"2000":369.48,"2001":371.02,"2002":373.10,
            "2003":375.64,"2004":377.38,"2005":380.99,"2006":382.71,"2007":384.50,"2008":385.45};
        this.levelsHash=$H(this.levels);
    },
    getYear: function(year){
        if (! isNaN(year)) {
            return this.levelsHash[year];
        }   else {
            return 385;
        }
    },
    keys: function(){
        return  this.levelsHash.keys();
    },
    values: function(){
        return  this.levelsHash.values();
    },

    inspect: function(){
        alert( this.levelsHash.inspect());
    },

    add: function(year,level){
        var tmp = new Object();
        tmp[year] = level;
        this.levelsHash=this.levelsHash.merge(tmp);
    }

}