var ExamplesMenu = function(ide) {
    var container = new UI.Panel();
    container.setClass('menu');

    var title = new UI.Panel();
    title.setClass('title');
    title.setTextContent('Examples');
    container.add(title);

    var items = new UI.Panel();
    items.setClass('menuitems');
    container.add(items);

    var itemProps = [
        {title: 'SICP ch1', file: 'ch1.scm'},
        {title: 'SICP ch2', file: 'ch2.scm'},
        {title: 'SICP ch2 support', file: 'ch2support.scm'},
        {title: 'SICP ch2 test', file: 'ch2test.scm'},
        {title: 'SICP ch3', file: 'ch3.scm'},
        {title: 'SICP ch3 support', file: 'ch3support.scm'},
    ];
    for(var i = 0; i < itemProps.length; i++) {
        var itemProp = itemProps[i];
        var item = new UI.Row();
        item.setClass('menuitem');
        item.setTextContent(itemProp.title);
        item.onClick(function() {
            if(confirm('Any unsaved data will be lost. Are you sure?')) {
                var req = new XMLHttpRequest();
                req.open('GET', '../tests/SICP/' + itemProp.file, true);
                req.addEventListener('load', function(event){
                    var content = event.target.responseText;
                    ide.editor.setValue(content);
                }, false);
                req.send(null);
            }
        });

        items.add(item);
    }

    return container;
}
@@ -703,24 +703,50 @@
 gth; i++) %7B%0A
+        (function() %7B%0A    
         var 
@@ -770,16 +770,20 @@
 ops%5Bi%5D;%0A
+    
         
@@ -807,32 +807,36 @@
 .Row();%0A        
+    
 item.setClass('m
@@ -846,32 +846,36 @@
 item');%0A        
+  
+  
 item.setTextCont
@@ -891,24 +891,28 @@
 rop.title);%0A
+    
         item
@@ -945,16 +945,20 @@
         
+    
 if(confi
@@ -1023,24 +1023,28 @@
             
+  
+  
 var req = ne
@@ -1059,24 +1059,28 @@
 pRequest();%0A
+    
             
@@ -1152,24 +1152,28 @@
             
+    
 req.addEvent
@@ -1222,24 +1222,28 @@
             
+  
+  
 var content 
@@ -1271,16 +1271,20 @@
 seText;%0A
+    
         
@@ -1341,16 +1341,20 @@
         
+    
 %7D, false
@@ -1368,24 +1368,28 @@
             
+  
+  
 req.send(nul
@@ -1404,16 +1404,20 @@
         
+    
 %7D%0A      
@@ -1418,17 +1418,35 @@
         
+ 
-%7D
+   %7D);%0A        %7D)(
 );%0A%0A    

Update ide UI