	var timeplot;

	function onLoad() {
	  var eventSource = new Timeplot.DefaultEventSource();
	  
	  var trace1 = new Timeplot.ColumnSource(eventSource,1);
	  var trace3 = new Timeplot.ColumnSource(eventSource,3);
	  var trace5 = new Timeplot.ColumnSource(eventSource,5);	
	  
	  var Yaxis1 = new Timeplot.DefaultValueGeometry({
	        gridColor: "#000000",

	        axisLabelsPlacement: "left"});

	  var Yaxis3 = new Timeplot.DefaultValueGeometry({
	        gridColor: "#000000",

	        axisLabelsPlacement: "right"});

	  var Yaxis5 = new Timeplot.DefaultValueGeometry({
	        gridColor: "#000000",

	        axisLabelsPlacement: "right"});
			
			
			
	  var Xaxis1 = new Timeplot.DefaultTimeGeometry({
	        gridColor: "#000000",
	        axisLabelsPlacement: "top"
	      }); 
		  
      var eventSource3 = new Timeplot.DefaultEventSource();


	  var plotInfo = [
	    Timeplot.createPlotInfo({
	      id: "plot1",
		  dataSource: trace1,
	      valueGeometry: Yaxis1,
	      timeGeometry: Xaxis1,
		  showValues:true,
		  lineColor: "#DD9814"
		  
	    }),

	    Timeplot.createPlotInfo({
	      id: "plot3",
		  dataSource: trace3,
	      valueGeometry: Yaxis3,
	      timeGeometry: Xaxis1,
		  showValues:true,
		  lineColor: "#C0C0C0", 
	    })		/*,

	    Timeplot.createPlotInfo({
	      id: "plot5",
		  dataSource: trace5,
	      valueGeometry: Yaxis5,
	      timeGeometry: Xaxis1,
		  showValues:true,
		  lineColor: "#CAD3D0", 
	    })

		
		Timeplot.createPlotInfo({
			id: "Events",
			eventSource: eventSource3,
			timeGeometry: Xaxis1,
			lineColor: "#8F151B", 
		})


		*/
		
	  ];
	            
	  timeplot = Timeplot.create(document.getElementById("my-timeplot"), plotInfo);
	  
	  var now = new Date();
	  var yr = (now.getYear()-100+2000);
	  //load data
	  timeplot.loadText("gold.csv", ",", eventSource);

	}

	var resizeTimerID = null;
	function onResize() {
	    if (resizeTimerID == null) {
	        resizeTimerID = window.setTimeout(function() {
	            resizeTimerID = null;
	            timeplot.repaint();
	        }, 100);
	    }
	}
