
var timelineConfig = {
    timelineConstructor: function (div, eventSource) {   
        div.style.height="200px";
        var theme = Timeline.ClassicTheme.create();
        theme.event.label.width = 200; // px
        theme.event.bubble.width = 600;
        theme.event.bubble.height = 400;

        //var date_begin = new Date(1999, 0, 1);
        var bandInfos = [
            Timeline.createBandInfo({
                width:          "20%", 
                intervalUnit: Timeline.DateTime.MILLENNIUM,
                intervalPixels: 80,
                eventSource:    eventSource,
                // date:           date_begin, 
	        overview:       true,   
                theme:          theme
            }),
            Timeline.createBandInfo({
                width:          "80%",
                intervalUnit: Timeline.DateTime.CENTURY,
                intervalPixels: 60,
                eventSource:    eventSource,
                // date:           date_begin,
                theme:          theme
            })
        ];
        bandInfos[1].syncWith = 0;
        bandInfos[0].highlight = false;

        // bandInfos[1].eventPainter.setLayout(bandInfos[0].eventPainter.getLayout());
	for (var i = 0; i < bandInfos.length; i++){
	    bandInfos[i].decorators = [
	        new Timeline.SpanHighlightDecorator({
		    startDate : "0001AD",
		    endDate   : "0005AD",
		    startLabel: "N-term",
	            endLabel  : "",
		    color     : "#000000",
		    opacity   : 100,
		    theme     : theme }),
	        new Timeline.SpanHighlightDecorator({
	            startDate : new Date( 797, 1, 1),
	            endDate   : new Date( 802, 1, 1),
	            startLabel: "",
	 	    endLabel  : "C-term",
	  	    color     : "#000000",
		    opacity   : 100,
		    theme     : theme }) 
	        ];
	}
        tl = Timeline.create(div, bandInfos, Timeline.HORIZONTAL);
	// tl.getBand(0).setCenterVisibleDate(Timeline.DateTime.parseGregorianDateTime(date));
	// tl.getBand(0).setCenterVisibleDate(Timeline.DateTime.parseGregorianDateTime("0500AD"));
	// tl.getBand(1).setMinVisibleDate(-100);
        return tl;
    }
};



