Index: src/webapp/api/scripts/layouts.js
===================================================================
--- src/webapp/api/scripts/layouts.js	(revision 6926)
+++ src/webapp/api/scripts/layouts.js	(working copy)
@@ -96,25 +96,25 @@
         var startPixel = Math.round(layout._ether.dateToPixelOffset(startDate));
         var endPixel = Math.round(layout._ether.dateToPixelOffset(endDate));
         
-        var streamIndex = 0;
-        for (; streamIndex < streams.length; streamIndex++) {
-            if (streams[streamIndex] < startPixel) {
-                break;
-            }
-        }
+		
+		var count= evt.getCategorie();
+        var streamIndex = count;
+		
+		
         if (streamIndex >= streams.length) {
-            streams.push(Number.NEGATIVE_INFINITY);
+          //  streams.push(Number.NEGATIVE_INFINITY);
         }
-        
-        var streamOffset = (eventTheme.track.offset + 
-            streamIndex * (eventTheme.track.height + eventTheme.track.gap)) + "em";
-            
+		
+	
+         var streamOffset = (eventTheme.track.offset + 
+           streamIndex * (eventTheme.track.height + eventTheme.track.gap)) + "em";
+           
         layout._tracks[evt.getID()] = streamIndex;
         
         if (evt.isInstant()) {
-            streams[streamIndex] = layoutInstant(evt, startPixel, endPixel, streamOffset);
+            streams[count] = layoutInstant(evt, startPixel, endPixel, streamOffset);
         } else {
-            streams[streamIndex] = layoutDuration(evt, startPixel, endPixel, streamOffset);
+            streams[count] = layoutDuration(evt, startPixel, endPixel, streamOffset);
         }
     };
     
Index: src/webapp/api/scripts/sources.js
===================================================================
--- src/webapp/api/scripts/sources.js	(revision 6926)
+++ src/webapp/api/scripts/sources.js	(working copy)
@@ -39,9 +39,11 @@
             if (node.firstChild != null && node.firstChild.nodeType == 3) {
                 description = node.firstChild.nodeValue;
             }
-            var evt = new Timeline.DefaultEventSource.Event(
+			 
+            var evt = new Timeline.DefaultEventSource.Event(			
                 parseDateTimeFunction(node.getAttribute("start")),
                 parseDateTimeFunction(node.getAttribute("end")),
+				node.getAttribute("categorie"),
                 parseDateTimeFunction(node.getAttribute("latestStart")),
                 parseDateTimeFunction(node.getAttribute("earliestEnd")),
                 node.getAttribute("isDuration") != "true",
@@ -75,6 +77,7 @@
 Timeline.DefaultEventSource.prototype.loadJSON = function(data, url) {
     var base = this._getBaseURL(url);
     var added = false;  
+	 
     if (data && data.events){
         var wikiURL = ("wikiURL" in data) ? data.wikiURL : null;
         var wikiSection = ("wikiSection" in data) ? data.wikiSection : null;
@@ -87,6 +90,7 @@
             var evt = new Timeline.DefaultEventSource.Event(
                 parseDateTimeFunction(event.start),
                 parseDateTimeFunction(event.end),
+				event.categorie,
                 parseDateTimeFunction(event.latestStart),
                 parseDateTimeFunction(event.earliestEnd),
                 event.isDuration || false,
@@ -167,6 +171,7 @@
             var evt = new Timeline.DefaultEventSource.Event(
                 parseDateTimeFunction(bindings["start"]),
                 parseDateTimeFunction(bindings["end"]),
+				bindings["categorie"],
                 parseDateTimeFunction(bindings["latestStart"]),
                 parseDateTimeFunction(bindings["earliestEnd"]),
                 bindings["isDuration"] != "true",
@@ -277,17 +282,17 @@
 
 
 Timeline.DefaultEventSource.Event = function(
-        start, end, latestStart, earliestEnd, instant, 
+        start, end, categorie,latestStart, earliestEnd, instant, 
         text, description, image, link,
         icon, color, textColor) {
         
     this._id = "e" + Math.floor(Math.random() * 1000000);
-    
+   
     this._instant = instant || (end == null);
-    
+    this._categorie=categorie;
     this._start = start;
     this._end = (end != null) ? end : start;
-    
+   
     this._latestStart = (latestStart != null) ? latestStart : (instant ? this._end : this._start);
     this._earliestEnd = (earliestEnd != null) ? earliestEnd : (instant ? this._start : this._end);
     
@@ -312,6 +317,8 @@
     
     getStart:       function() { return this._start; },
     getEnd:         function() { return this._end; },
+	getCategorie:   function() { return this._categorie; },
+	
     getLatestStart: function() { return this._latestStart; },
     getEarliestEnd: function() { return this._earliestEnd; },
     
