function LoadStats() {



    var eventSource = new Timeplot.DefaultEventSource();

    var timeGeometry = new Timeplot.DefaultTimeGeometry({
        gridColor: new Timeplot.Color("#000000"),
        axisLabelsPlacement: "bottom"
    });

    var valueGeometry1 = new Timeplot.DefaultValueGeometry({
        gridColor: "#000000",
        min: 0,
        axisLabelsPlacement: "left"
    });

    var valueGeometry2 = new Timeplot.DefaultValueGeometry({
        gridColor: "#996600",
        gridType: "long",
        min: 0

    });

    var plotInfo = [
        Timeplot.createPlotInfo({
            id:             "number_publications",
            dataSource:     new Timeplot.ColumnSource(eventSource,2),
            valueGeometry:  valueGeometry1,
            timeGeometry:   timeGeometry,
            showValues:     true,
            lineColor:      "#006699",
            fillColor:      "#006699"
        }),
        Timeplot.createPlotInfo({
            id:             "plot2",
            dataSource:     new Timeplot.ColumnSource(eventSource,1),
            valueGeometry:  valueGeometry2,
            timeGeometry:   timeGeometry,
            showValues:     true,
            lineColor:      "#996600",
            fillColor:      "#996600"
        })
    ];

    var timeplot = Timeplot.create(document.getElementById("publication_stats"), plotInfo);
    timeplot.loadText("http://" + __language + ".scientificcommons.org/reps/" + __repository + ".txt", ",", eventSource);
}

var resizeTimerID = null;

function RedrawStat() {
    if (resizeTimerID == null) {
        resizeTimerID = window.setTimeout(function() {
            resizeTimerID = null;
            timeplot.repaint();
        }, 100);
    }
}
