Index: trunk/webapps/einotebook/currentEvent/cad.css
===================================================================
--- trunk/webapps/einotebook/currentEvent/cad.css	(revision 468)
+++ trunk/webapps/einotebook/currentEvent/cad.css	(revision 468)
@@ -0,0 +1,76 @@
+.cadClient
+{
+   text-align: center;
+   background-color: black;
+   color: yellow;
+   height: 500px;
+   width: 720px;
+   font-family: "Courier";
+   font-size: .80em;
+}
+
+#cadHeader
+{
+   vertical-align: top;
+   height: 5%;
+}
+
+#cadBody
+{
+   vertical-align: top;
+   height: 80%;
+}
+
+#cadFooter
+{
+   vertical-align: top;
+   height: 15%;
+}
+
+.cadInputBox
+{
+   width: 720px;
+}
+
+.cadInputLineBox
+{
+   width: 80%;
+}
+
+.cadInputSubmitBox
+{
+   width: 20%;
+   margin-bottom: 40px;
+}
+
+.cadInputLine
+{
+   width: 100%; 
+   background-color: #000000; 
+   color: yellow;
+   font-family: "Courier New", Courier, monospace;
+   padding: 0px 10px;
+   border: 5px solid black;
+   height: 40px;
+}
+
+#cadSubmitButton
+{
+   height: 100%;
+   width: 100%;
+   font-size: 1.03em;
+}
+
+.cadButton
+{
+   width: 100%;
+   height: 40px;
+   font-size: 1.1em;
+}
+
+#cadSelect
+{
+   margin-top: 30px;
+   width: 100%;
+   font-size: 1.1em;
+}
Index: trunk/webapps/einotebook/currentEvent/currentEvent.js
===================================================================
--- trunk/webapps/einotebook/currentEvent/currentEvent.js	(revision 468)
+++ trunk/webapps/einotebook/currentEvent/currentEvent.js	(revision 468)
@@ -0,0 +1,32 @@
+/**
+ * Setup the Current Events screen (formerly known as CAD screen).
+ */
+var events;
+function loadScript(theEvents, theIncidents)
+{
+	events = theEvents;
+    updateCurrentTab();
+}
+
+/**
+ * Updates the current event tab.
+ */
+function updateCurrentTab()
+{
+    // Set timer to do this again in one second
+	setTimeout("updateCurrentTab()", 1000);
+
+    var currentEvent = events.getLastExecutedEvent(readCookie("time"));
+    // Show current event to Current Event Window
+    var currDiv = document.getElementById("cadpadcontent");
+    // empty holder for display current events 
+    var display = "";
+    var evt;
+    
+    // get all the current events 
+    for (evt=0; evt<currentEvent.length; evt++) {
+        display += currentEvent[evt].html();
+    }
+
+    currDiv.innerHTML = display;
+}
Index: trunk/webapps/einotebook/currentEvent/cadpad.css
===================================================================
--- trunk/webapps/einotebook/currentEvent/cadpad.css	(revision 468)
+++ trunk/webapps/einotebook/currentEvent/cadpad.css	(revision 468)
@@ -0,0 +1,121 @@
+/* Landscape mode (default) 
+#cadpadwrap 
+{
+	margin:0 auto;
+	width:900px;
+	position:relative;
+	overflow:hidden;
+	text-align:left;
+	background:#fff;
+}
+
+#cadpadcontent 
+{
+	float:left;
+	width:900px;
+	background:#fff;
+	position:relative;
+	left:768px;
+}
+
+#cadpadmain 
+{
+	float:left;
+	width:608px;
+	position:relative;
+	right:738px;
+}
+
+#cadpadside 
+{
+	float:right;
+	width:116px;
+	position:relative;
+	right:788px;
+	padding:20px 0;
+}
+
+#cadpadsidea,
+#cadpadsideb,
+#cadpadsidec 
+{
+	clear:left;
+	float:left;
+	width:116px;
+}
+
+#cadpadfooter 
+{
+	clear:both;
+	float:left;
+	width:824px;
+	border-top:1px solid #000;
+	background:#ddd;
+}
+
+#cadpadfooter p 
+{
+	padding:20px 30px;
+}
+*/
+/* portrait mode 
+@media only screen and (orientation:portrait)
+{*/
+	#cadpadheader,
+	#cadpadwrap,
+	#cadpadfooter 
+	{
+		/*width:668px;*/
+        width: 100%;
+	}
+	
+	#cadpadcontent 
+	{
+		left:0;
+		background:#fff;
+	}
+	
+	#cadpadmain 
+	{
+		float:left;
+		width:668px;
+		position:relative;
+		right:0;
+		left:10px;
+	}
+	
+	#cadpadside 
+	{
+		clear:left;
+		float:left;
+		width:668px;
+		right:0;
+	}
+	
+	#cadpadsidea 
+	{
+		clear:none;
+		width:183px;
+		float:left;
+		position:relative;
+		left:60px;
+	}
+	
+	#cadpadsideb 
+	{
+		clear:none;
+		width:183px;
+		float:left;
+		position:relative;
+		left:90px;
+	}
+	
+	#cadpadsidec 
+	{
+		clear:none;
+		width:183px;
+		float:right;
+		position:relative;
+		right:0px;
+	}
+/*}*/
Index: trunk/webapps/einotebook/currentEvent/index.html
===================================================================
--- trunk/webapps/einotebook/currentEvent/index.html	(revision 468)
+++ trunk/webapps/einotebook/currentEvent/index.html	(revision 468)
@@ -0,0 +1,15 @@
+<html>
+  <head>
+    <link rel="stylesheet" type="text/css" href="cad.css"> 
+    <link rel="stylesheet" type="text/css" href="cadpad.css"> 
+    <link rel="stylesheet" type="text/css" href="../script/scrollframe.css"> 
+    <script type="text/javascript" src="currentEvent.js"></script> 
+    <script type="text/javascript" src="../scripts/cookies.js"></script> 
+  </head>
+  <body>
+	<div id="cadpadwrap">
+		<div id="cadpadcontent">
+		</div>
+    </div>
+  </body>
+</html>
Index: trunk/webapps/einotebook/scripts/Incident.js
===================================================================
--- trunk/webapps/einotebook/scripts/Incident.js	(revision 359)
+++ trunk/webapps/einotebook/scripts/Incident.js	(revision 468)
@@ -17,11 +17,16 @@
 	//========== public methods ==========//
 	this.html = html;
-	this.expandAction = expandAction;
+    this.setSummary = setSummary;
 	
 	//========== private methods ==========//
 	this.formatHeader = formatHeader;
-	this.expandOption = expandOption;
-	this.expandOptionSymbol = expandOptionSymbol;
-	
+
+    /** Setter for summary field */
+	function setSummary(description)
+    {
+        this.summary = description;
+    }
+    
+    /**
 	/**
 	 * @return The html representation of this incident;
@@ -35,5 +40,5 @@
 			   "<tr>" + 
 			   "<td class='incidentSummary' id='summary" + this.number + "'>" + 
-			     (this.expanded ? this.summary : "") + "</td>" +
+			     this.summary + "</td>" +
 			   "</tr>" + 
 			   "</table>";
@@ -50,5 +55,5 @@
 		return "<table class='incidentHeader'>" +
 				"<tr class='incidentHeader'>" +
-				"<td class='incidentExpandOption'>" + this.expandOption() + "</td>" +
+				"<td class='incidentExpandOption'></td>" +
 				"<td class='incidentTime'>Time: " + this.time.format() + "</td>" +
 				"<td class='incidentNumber'>" + this.number + "</td>" +
@@ -58,46 +63,4 @@
 	}
 	
-	/**
-	 * @return The html that for the + or - symbol that expands or collapses the incident.
-	 */
-	function expandOption()
-	{
-		return "<button class='incidentExpandButton' " +
-				"id='expandOption" + this.number + "' onclick='incidents.get(" + 
-				this.number + ").expandAction()'>" + this.expandOptionSymbol() + 
-				"</button>";
-	}
 	
-	/**
-	 * Returns the symbol for the expand option.
-	 * @return Either "+" or "-" depending on whether this incidents is collapsed or 
-	 *         expanded.
-	 */
-	function expandOptionSymbol()
-	{
-		return this.expanded == true ? "&ndash;" : "+";
-	}
-	
-	/**
-	 * Performs the action of clicking on the + or - symbol that expands or collapses 
-	 * the incident.
-	 */
-	function expandAction()
-	{
-		if (this.expanded)
-		{
-			incidents.doc.getElementById("summary" + this.number).innerHTML = "";
-			incidents.doc.getElementById("expandOption" + this.number).innerHTML = "+";
-		}
-		else
-		{
-			incidents.doc.getElementById("summary" + this.number).innerHTML = 
-				this.summary;
-			incidents.doc.getElementById("expandOption" + this.number).innerHTML = 
-				"&ndash;";
-		}
-		
-		this.expanded = !this.expanded;
-		
-	}
 }
Index: trunk/webapps/einotebook/scripts/Incidents.js
===================================================================
--- trunk/webapps/einotebook/scripts/Incidents.js	(revision 359)
+++ trunk/webapps/einotebook/scripts/Incidents.js	(revision 468)
@@ -10,6 +10,4 @@
 //========== public methods ==========//
 incidents.get = incidents_get;
-incidents.collapseAll = incidents_collapseAll;
-incidents.expandAll = incidents_expandAll;
 incidents.add = incidents_add;
 
@@ -38,38 +36,4 @@
 
 /**
- * Collapses each Incident.
- */
-function incidents_collapseAll()
-{
-	// FOR each incident
-	for (var i = 0; i < this.length; i++)
-	{
-		// IF the incident is expanded THEN
-		if (this[i].expanded)
-		{
-			// collapse incident
-			this[i].expandAction();
-		}
-	}
-}
-
-/**
- * Expands each incident.
- */
-function incidents_expandAll()
-{
-	// FOR each incident
-	for (var i = 0; i < this.length; i++)
-	{
-		// IF incident is collapsed THEN
-		if (!this[i].expanded)
-		{
-			// expand incident
-			this[i].expandAction();
-		}
-	}
-}
-
-/**
  * Adds an Incident.
  * @param incident {Incident} The Incident to be added.
Index: trunk/webapps/einotebook/scripts/Events.js
===================================================================
--- trunk/webapps/einotebook/scripts/Events.js	(revision 418)
+++ trunk/webapps/einotebook/scripts/Events.js	(revision 468)
@@ -324,5 +324,4 @@
 }
 
-
 /**
  * Finds the Event that was last executed by based on given time.
Index: trunk/webapps/einotebook/scripts/LoadEvents.js
===================================================================
--- trunk/webapps/einotebook/scripts/LoadEvents.js	(revision 434)
+++ trunk/webapps/einotebook/scripts/LoadEvents.js	(revision 468)
@@ -9,5 +9,5 @@
     var xmlDoc = parser.parseFromString(response,"text/xml");
     var eventTags = xmlDoc.getElementsByTagName("SCRIPT_EVENT");
-    console.log("parsing incident xml file");
+    console.log("parsing incident xml file containing "+eventTags.length+" event tags.");
     // Process each SCRIPT_EVENT tag
     for (var i = 0; i < eventTags.length; i++)
@@ -33,8 +33,4 @@
                         break;
                     case "INCIDENT":
-                        incidentNum = Number(currEvt.childNodes[child].attributes["LogNum"].value);
-                        incidentTitle =  currEvt.childNodes[child].textContent;
-                        break;
-                    case "GENERAL_INFO":  
                         /* This tag identifies a new incident.  As long as it appears before any
                         other tags, we can use it to create a new incident. (The alternative is to
@@ -42,11 +38,24 @@
                         we load events.)  Creating an event (below) requires that the incident has already
                         been created. */
+                        incidentNum = Number(currEvt.childNodes[child].attributes["LogNum"].value);
+                        // If this incident number doesn't exist
+                        if (incidents.get(incidentNum) == undefined)
+                        {
+                            incidentTitle =  currEvt.childNodes[child].textContent;
+                            // Construct the incident
+                            var theIncident = new Incident(evtTime, incidentNum, incidentTitle, "");
+                            // Add the incident to the list of incidents
+                            incidents.add(theIncident);
+                        }
+                        break;
+                    case "GENERAL_INFO":  
+                        // Add the summary description to the incident
                         var desc = currEvt.childNodes[child].getElementsByTagName("TEXT")[0].textContent;
-                        var theIncident = new Incident(evtTime, incidentNum, incidentTitle, desc);
-                        incidents.add(theIncident);
-			// Create an entry showing the Incident start description. Fixes ticket #164
+                        incidentToUpdate = incidents.get(incidentNum);
+                        incidentToUpdate.setSummary(desc);                        
+                        // Create an entry showing the Incident start description. Fixes ticket #164
                         var result = new Array();   
                         result.push("Description:");
-			result.push(desc);
+                        result.push(desc);
                         proparray.push(new Property("Incident Start",result));
                         break;
@@ -101,6 +110,6 @@
                 }
             }
-        }
-        //console.log(evtTime.format(), incidentNum, proparray.length, evalarray.length);
+        }//end one event
+        // console.log(evtTime.format(), incidentNum, proparray.length, evalarray.length);
         // Ignore Media Log incident and empty nodes
         if (incidentNum != undefined && incidentNum != 100)
@@ -111,5 +120,9 @@
                 new Evaluations(evalarray)) );
         }
-    }
+    }// end all events
+    console.log("Done parsing xml, " + events.length + " events and " +incidents.length + " incidents saved.");
+    
+    // NOW THAT WE HAVE THE EVENT LIST WE CAN PERFORM SETUP
+    setupNotebook();
 }
 
@@ -208,16 +221,18 @@
     return result;
 }
-// MAIN
-//console.log("starting LoadEvents");
-try {
-    // the script must be located where accessible by the web server
-    var scriptFilename = "../dynamicdata/incident_script.xml";
-    console.log("Attempting to load ", scriptFilename);
-    // Now load the Incident Script and go parse it
-    loadJSON(scriptFilename, parseXml)
-
-    } catch(e) {
-        console.log("Error attempt to parse incident script "+response)
-    }
-
-
+// MAIN ENTRY POINT for this application
+function init()
+{
+    try {
+        // the script must be located where accessible by the web server
+        var scriptFilename = "../dynamicdata/incident_script.xml";
+        console.log("LoadEvents.js main Attempting to load ", scriptFilename);
+        // Now load the Incident Script and go parse it
+        // NB: This is an async function, so all other notebook setup must be in the callback.
+        loadJSON(scriptFilename, parseXml)
+
+        } catch(e) {
+            console.log("Error attempting to parse incident script "+response)
+        }
+}
+
Index: trunk/webapps/einotebook/notebook.js
===================================================================
--- trunk/webapps/einotebook/notebook.js	(revision 415)
+++ trunk/webapps/einotebook/notebook.js	(revision 468)
@@ -1,27 +1,2 @@
-/*
-function loadXMLDoc()
-{
-  if (window.XMLHttpRequest)
-  {
-    xmlhttp = new XMLHttpRequest();
-  }
-  else
-  {
-    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
-  }
-
-  xmlhttp.onreadystatechange=function()
-  {
-    if (xmlhttp.readyState==4 && xmlhttp.status==200)
-    {
-      document.getElementById("myDiv").innerHTML = xmlhttp.responseText;
-    }
-  }
-  
-  xmlhttp.open("GET", "ajax_info.txt", true);
-  xmlhttp.send("");
-}
-*/
-
 /**
  * Sets the selected tab to the summary tab and loads the summary page.
@@ -31,84 +6,44 @@
 {
    console.log("setupNotebook() starting");
-   changeTab('summaryTab');
+   changeTab('summaryTab');  // Initially show Summary tab
    showContent('summaryPageContent')
-   loadSummary();
+   loadSummaryPage();
+   loadPages();
    setCookie("time", "0");
    setCookie("scriptScrollY", 0);
    setCookie("summaryScrollY", 0);
+   run();  // start the script scrolling
 }
 
 /**
- * Runs the script.
+ * Loads the summary tab page;
+ */
+function loadSummaryPage()
+{	   
+    incidents.doc = getDocumentFromFrame('summaryTabPage');
+    window.frames[0].loadSummary(incidents); 
+}
+
+/**
+ * Loads content of the pages for Simulation Script and Current Event
+ */
+function loadPages()
+{
+   window.frames[1].loadScript(events, incidents);
+   window.frames[2].loadScript(events, incidents);
+}
+
+/**
+ * Start scrolling the script in an infinite loop.
  */
 function run()
 {
 	run.initialDelay = 1000;
-	
 	setTimeout("run.run()", run.initialDelay);
 	
 	run.run = function()
 	{
-//	    document.getElementById("simulationStatus").innerHTML = "RUNNING";                 
 		setTime();
-		updateStatus();
 	};
-}
-
-/**
- * Displays fading text alerts in the status box (left-top corner).
- */
-function updateStatus()
-{
-	// IF last event if it has not been set before THEN
-    if (typeof updateStatus.lastEvent == 'undefined')
-    {
-    	updateStatus.lastEvent = null;
-    }
-   
-    var latestEvent = events.getLastExecutedEvent(readCookie("time"));
-    
-    
-    // IF a new event executed THEN
-    if (updateStatus.lastEvent != latestEvent)
-    {
-      var i;
-      for (i=0; i<latestEvent.length; i++) {
-          // IF the new event has evaluations THEN
-        if (latestEvent[i].evaluations.evaluations.length == 0)
-        {
-  //    		document.getElementById('updateStatus').innerHTML = "New Event";
-        }
-        else
-        {
-  //    		document.getElementById('updateStatus').innerHTML = "New Evaluation";
-        }
-      }
-		
-    	
-		// fades the text
-		updateStatus.fade = function fade()
-		{
-			// IF the fade color is not black yet THEN
-    		if (fade.hex < 255)
-    		{
-    			fade.hex += 5;
-//    			document.getElementById('updateStatus').style.color = 
-    				"rgb(" + fade.hex + ", " + fade.hex + ", " + fade.hex + ")";  
-    			setTimeout("updateStatus.fade()", 100);	
-    		}
-    		else
-    		{
-//    			document.getElementById('updateStatus').style.color = "white";
-    		}
-
-		};
-        
-		updateStatus.fade.hex = 0;
-		updateStatus.fade();
-    	updateStatus.lastEvent = latestEvent;
-    }
-    
-    setTimeout("updateStatus();", 1000);
 }
 
@@ -129,5 +64,5 @@
             setTime.time = seconds;
 	        // increment time by one second (or initialize it if it has not been set before)
-    //	    setTime.time = (typeof setTime.time == 'undefined') ? 0 : ++setTime.time;
+            //	    setTime.time = (typeof setTime.time == 'undefined') ? 0 : ++setTime.time;
 
             setCookie("time", "" + setTime.time);
@@ -152,23 +87,9 @@
     document.getElementById("summaryTab").className = "notActive";
     document.getElementById("scriptTab").className = "notActive";
-    document.getElementById("CADTab").className = "notActive";
+    document.getElementById("currentTab").className = "notActive";
     document.getElementById("mapsTab").className = "notActive";
 
     /* Set the selected tab to being active */
     document.getElementById(id).className = "activeTab";
-}
-
-/**
- * Loads the script tab page;
- */
-function loadScript()
-{
-}
-
-/**
- * Loads the summary tab page;
- */
-function loadSummary()
-{	   
 }
 
@@ -204,5 +125,5 @@
     hideContent('summaryPageContent');
     hideContent('scriptPageContent');
-    hideContent('cadPageContent');
+    hideContent('currentEventPageContent');
     hideContent('mapsPageContent');    
     document.getElementById(d).style.display = "block"; 
Index: trunk/webapps/einotebook/summary/summary.js
===================================================================
--- trunk/webapps/einotebook/summary/summary.js	(revision 359)
+++ trunk/webapps/einotebook/summary/summary.js	(revision 468)
@@ -1,2 +1,3 @@
+/** functions for Incident Summary page */
 var incidents;
 
Index: trunk/webapps/einotebook/summary/index.html
===================================================================
--- trunk/webapps/einotebook/summary/index.html	(revision 468)
+++ trunk/webapps/einotebook/summary/index.html	(revision 468)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
+  "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link href="summary.css" rel="stylesheet" type="text/css">
+    <script type="text/javascript" src="summary.js"></script>
+    <script type="text/javascript" src="../scripts/cookies.js"></script>
+    <title>Summary</title>
+    </head>
+  <body onscroll="setCookie('summaryScrollY', window.pageYOffset);">
+    <div id="view"></div>
+  </body>
+</html>
Index: trunk/webapps/einotebook/summary/summary.html
===================================================================
--- trunk/webapps/einotebook/summary/summary.html	(revision 359)
+++ 	(revision )
@@ -1,14 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
-  "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <link href="summary.css" rel="stylesheet" type="text/css">
-    <script type="text/javascript" src="summary.js"></script>
-    <script type="text/javascript" src="../scripts/cookies.js"></script>
-    <title>Summary</title>
-    </head>
-  <body onscroll="setCookie('summaryScrollY', window.pageYOffset);">
-    <div id="view"></div>
-  </body>
-</html>
Index: trunk/webapps/einotebook/script/simscript.js
===================================================================
--- trunk/webapps/einotebook/script/simscript.js	(revision 468)
+++ trunk/webapps/einotebook/script/simscript.js	(revision 468)
@@ -0,0 +1,190 @@
+/**
+ * Holds references to the events and incidents.
+ */
+function Script()
+{
+	Script.events = null;
+	Script.incidents = null;
+}
+
+/**
+ * Scrolls to the last event executed based on time.
+ */
+function jumpToLastExecutedEvent()
+{	
+	var lastEventArray = Script.events.getLastExecutedEvent(readCookie("time"));
+
+	// IF a current event exists THEN
+	if (lastEventArray != null)
+	{
+        // Move window focus to first event of the current ones
+        var last = lastEventArray.length - 1;
+	    lastEventArray[last].focus();
+	}
+	else
+	{
+		alert("No events have been executed yet.");
+	}
+}
+
+/**
+ * Finds the Event that was last executed by based on time and highlights it.
+ * Removes highlighting from old events.
+ * @return
+ */
+function highlightLatestEvent() 
+{
+    Script.events.setEmphasis();  // Set text colors on all events
+
+    var currentEventArray = Script.events.getLastExecutedEvent(readCookie("time"));
+	/* highlight the items in the current event array */
+    for (var i=0; i<currentEventArray.length; i++) 
+    {
+		currentEventArray[i].highlight();
+	}
+
+    // Set timer to do this again in one second
+	setTimeout("highlightLatestEvent()", 1000);
+}
+
+/**
+ * Loads the the script tab for the given document.
+ * @pre script.html must be completely loaded
+ * @param aDocument
+ */
+function loadScript(theEvents, theIncidents)
+{
+	Script.incidents = theIncidents;
+	Script.events = theEvents;
+	Script.events.win = document.getElementById("view").contentWindow;
+	Script.events.doc = getDocumentFromFrame('view');
+
+	var html = "";
+	
+	// FOR each Event
+	for (var i = 0; i < Script.events.length; i++)
+	{
+		// add the Event's html
+		html += Script.events[i].html();
+        //console.log(Script.events[i].html());
+	}
+	
+	// display events in iframe
+	getDocumentFromFrame('view').body.innerHTML = html;	
+	
+	// resize iframe to appropriate height
+	resizeIframe();
+	window.onresize = resizeIframe;
+    // This line is causing an error
+	//window.frames['view'].setEvents(Script.events);
+	
+	Script.events.win.scrollTo(0, readCookie('scriptScrollY'));
+	
+	highlightLatestEvent();
+
+}
+
+/**
+ * @param id The id of the frame element.
+ * @return The document of the frame element.
+ */
+function getDocumentFromFrame(id)
+{
+    var frame=document.getElementById(id);
+    var doc=(frame.contentWindow || frame.contentDocument);
+    
+    if (doc.document)doc=doc.document;
+    
+    return doc;
+}
+
+/**
+ * Finds the height of an element relative to the BODY tag.
+ * @param elem The element to find the height of.
+ * @return The y-coordinate of the given element relative to the BODY tag.
+ */
+function pageY(elem) 
+{
+    return elem.offsetParent ? (elem.offsetTop + pageY(elem.offsetParent)) : elem.offsetTop;
+}
+
+/**
+ * Resizes the view for the events so that the view's height is at the bottom of its
+ * container.
+ */
+function resizeIframe() 
+{
+    var height = document.documentElement.clientHeight;
+    height -= pageY(document.getElementById('view'));
+    height = (height < 0) ? 0 : height - 10;
+    document.getElementById('view').style.height = height + 'px';
+}
+
+/**
+ * Highlights the text of an input text element after a small delay.
+ * This method was made because using the code "onFocus='this.focus()'" did not work.
+ * @pre textField must have an 'id' attribute
+ * @param textField An input text element.
+ */
+function highlightTextField(textField)
+{
+	setTimeout("document.getElementById('" + textField.id + "').select();", 100);
+}
+
+/**
+ * Formats a two digit textbox. If the text box contains only one digit, then a zero
+ * is appended to the front.
+ * @param textField An input text element.
+ */
+function formatTimeTextfield(textField)
+{
+	// IF the text field contains 1 digits THEN
+	if (textField.value.length == 1)
+	{
+		textField.value = "0".concat(textField.value);
+	}
+}
+
+/**
+ * Scrolls to the event latest executed event if the current simulation time was given
+ * by text fields 'timeTextSeconds', 'timeTextMinutes', 'timeTextHours'.
+ */
+function jumpToTime()
+{
+	var seconds = parseInt(document.getElementById('timeTextSeconds').value, 10);
+	var minutes = parseInt(document.getElementById('timeTextMinutes').value, 10);
+	var hours = parseInt(document.getElementById('timeTextHours').value, 10);
+
+	var lastEvent = Script.events.getLastExecutedEvent(new Time(hours, minutes, seconds).getSeconds());
+
+	// IF an event was executed THEN
+	if (lastEvent != null)
+	{
+		lastEvent.focus();
+	}
+}
+
+/**
+ * Collapses the elements based on the value of the dropdownbox with id 'domain'.
+ */
+function collapse()
+{
+	var selection = document.getElementById('domain');
+	var selectedIndex = selection.selectedIndex;
+	var selectedValue = selection.options[selectedIndex].value;
+	
+	eval("Script.events.collapseAll" + selectedValue + "();");
+}
+
+/**
+ * Expands the elements based on the value of the dropdownbox with id 'domain'.
+ */
+function expand()
+{
+	var selection = document.getElementById('domain');
+	var selectedIndex = selection.selectedIndex;
+	var selectedValue = selection.options[selectedIndex].value;
+	
+	eval("Script.events.expandAll" + selectedValue + "();");
+}
+
Index: trunk/webapps/einotebook/script/index.html
===================================================================
--- trunk/webapps/einotebook/script/index.html	(revision 468)
+++ trunk/webapps/einotebook/script/index.html	(revision 468)
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
+  "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+    <!-- This is the page containing the simulation script and jump button -->
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link href="simscript.css" rel="stylesheet" type="text/css">
+    <script type="text/javascript" src="../scripts/Time.js"></script> 
+    <script type="text/javascript" src="simscript.js"></script> 
+    <script type="text/javascript" src="../scripts/cookies.js"></script>
+    <title>Script</title>
+  </head>
+  <body>
+   
+    <button class="jumpToCurrentEvent" 
+            onclick="jumpToLastExecutedEvent()">Jump to Current Event</button>
+     
+    <iframe id='view' src='scrollframe.html' frameborder='0' scrolling='yes'
+            width='100%'></iframe>
+  </body>
+</html>
Index: trunk/webapps/einotebook/script/scrollframe.html
===================================================================
--- trunk/webapps/einotebook/script/scrollframe.html	(revision 468)
+++ trunk/webapps/einotebook/script/scrollframe.html	(revision 468)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<!-- This is an internal frame that contains the formatted XML from the incident script -->
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link href="scrollframe.css" rel="stylesheet" type="text/css">
+    <script type="text/javascript" src="scrollframe.js"></script> 
+    <script type="text/javascript" src="../scripts/cookies.js"></script> 
+</head>
+  <body onscroll="setCookie('scriptScrollY', window.pageYOffset);">
+  </body>
+</html>
Index: trunk/webapps/einotebook/script/scrollframe.css
===================================================================
--- trunk/webapps/einotebook/script/scrollframe.css	(revision 468)
+++ trunk/webapps/einotebook/script/scrollframe.css	(revision 468)
@@ -0,0 +1,186 @@
+@CHARSET "UTF-8";
+
+body {
+	font-family: Verdana, sans-serif;	
+}
+
+/*=========================== Event =======================*/
+
+button.eventExpandButton {
+	width:2em;	
+	text-align:center;
+	font-size:12pt;
+}
+
+table.event {
+	padding:0px; 
+	border:0px solid black;
+	width:100%;
+	border-collapse:collapse;
+	margin-bottom:30px;
+}
+
+table.eventHeader {
+	width:100%;
+}
+
+td.eventHeader {
+	margin-bottom:0px; 
+	border:2px solid gray;	
+}
+
+td.eventData {
+	padding-left:2em;
+}
+
+tr.eventHeader {
+	font-size:medium; 
+	font-weight:bold;
+}
+
+td.eventTitle {
+	text-align:left;
+	width:40%
+}
+
+td.eventExpandOption {
+	text-align:left;
+	width:10%
+}
+
+td.eventNumber {
+	text-align:left;
+	width:20%
+}
+
+td.eventTime {
+	text-align:left;
+	width:30%
+}
+
+/*=============================== Evaluation ======================*/
+
+table.evaluation {
+	border:0px solid black;
+	margin-bottom:0px;
+	width:100%;
+}
+
+table.evaluationInner2
+{
+	width:100%;
+}
+
+th.evaluationType {
+	text-align:left;
+	font-size:11pt;
+}
+
+td.evaluationLabel {
+	padding-left:2em;
+	font-style:italic;
+	font-size:11pt;
+	vertical-align:top;
+}
+
+td.evaluationCriteria {
+	text-align:left;
+	font-size:11pt;
+}
+
+td.evaluationResponse {
+	padding-left:1em;
+	width:100%;
+	
+}
+
+input.evaluationResponseText {
+	width:100%;	
+}
+
+table.evaluationScale {
+	
+}
+
+td.evaluationScale {
+	font-size:12px;
+}
+
+td.evaluationRadioButtonSmallScale {
+	padding-right:1em; 
+	padding-left:1em;
+	text-align:center;
+}
+	
+/*=============================== Evaluations ======================*/
+
+button.evaluationsExpandButton {
+	width:27px;	
+	text-align:center;
+	font-size:10pt;
+}
+
+table.evaluationsInner {
+	border:0px solid black;
+	width:100%;	
+}
+
+table.evaluationsOuter {
+	border:0px solid black;
+	width:100%;	
+}
+
+td.evaluationsExpandOption {
+	font-size:12pt;
+}
+
+td.evaluations {
+	padding-left:2em;
+}
+
+/*=============================== Properties ======================*/
+
+button.propertiesExpandButton {
+	width:2em;	
+	text-align:center;
+	font-size:10pt;
+}
+
+td.propertiesExpandOption {
+	font-size:12pt;
+}
+
+td.properties {
+	padding-left:2em;
+}
+
+/*=============================== Property ======================*/
+
+table.property {
+	border:0px solid black;
+	margin-bottom:-5px;
+}
+
+th.propertyType {
+	font-size:11pt;
+	text-align:left;
+}
+
+td.propertyContent {
+	padding-left:2em;
+	font-style:italic;
+	font-size:11pt;
+}
+
+td.propertyLabel {
+	font-size:11pt;
+	padding-left:2em; 
+	padding-right:1em;
+	font-style:italic;
+	vertical-align:top;
+}
+
+td.propertyValue {
+	padding-left:1em;
+	font-size:11pt;
+}
Index: trunk/webapps/einotebook/script/scrollframe.js
===================================================================
--- trunk/webapps/einotebook/script/scrollframe.js	(revision 468)
+++ trunk/webapps/einotebook/script/scrollframe.js	(revision 468)
@@ -0,0 +1,12 @@
+/************* WARNING: THIS IS A GLOBAL VARIABLE. ********************/
+// Reference to the 'events' array in Events.js
+var events;
+
+/**
+ * Sets the events.
+ * @param theEvents Reference to the 'events' array in Events.js.
+ */
+function setEvents(theEvents)
+{
+	events = theEvents;
+}
Index: trunk/webapps/einotebook/script/simscript.css
===================================================================
--- trunk/webapps/einotebook/script/simscript.css	(revision 468)
+++ trunk/webapps/einotebook/script/simscript.css	(revision 468)
@@ -0,0 +1,33 @@
+@CHARSET "UTF-8";
+
+body {
+	font-family: Verdana, sans-serif;	
+}
+
+/*=============================== Button Panel ======================*/
+
+button.expandButton {
+	width:100px;
+}
+
+button.collapseButton {
+	width:100px;
+}
+
+input.timeText {
+	padding-left:0px; 
+	padding-right:0px; 
+	margin-left:0px; 
+	margin-right:0px;  
+	width:1.5em;
+}
+
+td.buttonPanel {
+	padding:1px;
+}
+
+table.buttonTable
+{
+	margin:0px;
+	padding:0px;
+}
Index: trunk/webapps/einotebook/script/scripts.js
===================================================================
--- trunk/webapps/einotebook/script/scripts.js	(revision 359)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/************* WARNING: THIS IS A GLOBAL VARIABLE. ********************/
-// Reference to the 'events' array in Events.js
-var events;
-
-/**
- * Sets the events.
- * @param theEvents Reference to the 'events' array in Events.js.
- */
-function setEvents(theEvents)
-{
-	events = theEvents;
-}
Index: trunk/webapps/einotebook/script/script.html
===================================================================
--- trunk/webapps/einotebook/script/script.html	(revision 359)
+++ 	(revision )
@@ -1,33 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
-  "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <link href="script.css" rel="stylesheet" type="text/css">
-    <script type="text/javascript" src="../scripts/Time.js"></script> 
-    <script type="text/javascript" src="script.js"></script> 
-    <script type="text/javascript" src="../scripts/cookies.js"></script>
-    <title>Script</title>
-  </head>
-  <body>
-    Filter:
-    <select id='domain'>
-      <option value=''>All</option>
-      <option value='chpradio'>CHP RADIO</option>
-      <option value='chpcad'>CHP CAD</option>
-      <option value='telephone'>TELEPHONE CONVERSATION</option>
-    </select>
-<!--
-    <button onclick="collapse();">Collapse</button>
-    <button onclick="expand();">Expand</button>
--->
-   
-    <button class="jumpToCurrentEvent" 
-            onclick="jumpToLastExecutedEvent()">Jump to Current Event</button>
-     
-
-
-    <iframe id='view' src='scripts.html' frameborder='0' scrolling='yes'
-            width='100%'></iframe>
-  </body>
-</html>
Index: trunk/webapps/einotebook/script/scripts.html
===================================================================
--- trunk/webapps/einotebook/script/scripts.html	(revision 359)
+++ 	(revision )
@@ -1,13 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <link href="scripts.css" rel="stylesheet" type="text/css">
-    <script type="text/javascript" src="scripts.js"></script> 
-    <script type="text/javascript" src="../scripts/cookies.js"></script> 
-  <title>Insert title here</title>
-</head>
-  <body onscroll="setCookie('scriptScrollY', window.pageYOffset);">
-
-  </body>
-</html>
Index: trunk/webapps/einotebook/script/script.css
===================================================================
--- trunk/webapps/einotebook/script/script.css	(revision 359)
+++ 	(revision )
@@ -1,33 +1,0 @@
-@CHARSET "UTF-8";
-
-body {
-	font-family: Verdana, sans-serif;	
-}
-
-/*=============================== Button Panel ======================*/
-
-button.expandButton {
-	width:100px;
-}
-
-button.collapseButton {
-	width:100px;
-}
-
-input.timeText {
-	padding-left:0px; 
-	padding-right:0px; 
-	margin-left:0px; 
-	margin-right:0px;  
-	width:1.5em;
-}
-
-td.buttonPanel {
-	padding:1px;
-}
-
-table.buttonTable
-{
-	margin:0px;
-	padding:0px;
-}
Index: trunk/webapps/einotebook/script/scripts.css
===================================================================
--- trunk/webapps/einotebook/script/scripts.css	(revision 359)
+++ 	(revision )
@@ -1,186 +1,0 @@
-@CHARSET "UTF-8";
-
-body {
-	font-family: Verdana, sans-serif;	
-}
-
-/*=========================== Event =======================*/
-
-button.eventExpandButton {
-	width:2em;	
-	text-align:center;
-	font-size:12pt;
-}
-
-table.event {
-	padding:0px; 
-	border:0px solid black;
-	width:100%;
-	border-collapse:collapse;
-	margin-bottom:30px;
-}
-
-table.eventHeader {
-	width:100%;
-}
-
-td.eventHeader {
-	margin-bottom:0px; 
-	border:2px solid gray;	
-}
-
-td.eventData {
-	padding-left:2em;
-}
-
-tr.eventHeader {
-	font-size:medium; 
-	font-weight:bold;
-}
-
-td.eventTitle {
-	text-align:left;
-	width:40%
-}
-
-td.eventExpandOption {
-	text-align:left;
-	width:10%
-}
-
-td.eventNumber {
-	text-align:left;
-	width:20%
-}
-
-td.eventTime {
-	text-align:left;
-	width:30%
-}
-
-/*=============================== Evaluation ======================*/
-
-table.evaluation {
-	border:0px solid black;
-	margin-bottom:0px;
-	width:100%;
-}
-
-table.evaluationInner2
-{
-	width:100%;
-}
-
-th.evaluationType {
-	text-align:left;
-	font-size:11pt;
-}
-
-td.evaluationLabel {
-	padding-left:2em;
-	font-style:italic;
-	font-size:11pt;
-	vertical-align:top;
-}
-
-td.evaluationCriteria {
-	text-align:left;
-	font-size:11pt;
-}
-
-td.evaluationResponse {
-	padding-left:1em;
-	width:100%;
-	
-}
-
-input.evaluationResponseText {
-	width:100%;	
-}
-
-table.evaluationScale {
-	
-}
-
-td.evaluationScale {
-	font-size:12px;
-}
-
-td.evaluationRadioButtonSmallScale {
-	padding-right:1em; 
-	padding-left:1em;
-	text-align:center;
-}
-	
-/*=============================== Evaluations ======================*/
-
-button.evaluationsExpandButton {
-	width:27px;	
-	text-align:center;
-	font-size:10pt;
-}
-
-table.evaluationsInner {
-	border:0px solid black;
-	width:100%;	
-}
-
-table.evaluationsOuter {
-	border:0px solid black;
-	width:100%;	
-}
-
-td.evaluationsExpandOption {
-	font-size:12pt;
-}
-
-td.evaluations {
-	padding-left:2em;
-}
-
-/*=============================== Properties ======================*/
-
-button.propertiesExpandButton {
-	width:2em;	
-	text-align:center;
-	font-size:10pt;
-}
-
-td.propertiesExpandOption {
-	font-size:12pt;
-}
-
-td.properties {
-	padding-left:2em;
-}
-
-/*=============================== Property ======================*/
-
-table.property {
-	border:0px solid black;
-	margin-bottom:-5px;
-}
-
-th.propertyType {
-	font-size:11pt;
-	text-align:left;
-}
-
-td.propertyContent {
-	padding-left:2em;
-	font-style:italic;
-	font-size:11pt;
-}
-
-td.propertyLabel {
-	font-size:11pt;
-	padding-left:2em; 
-	padding-right:1em;
-	font-style:italic;
-	vertical-align:top;
-}
-
-td.propertyValue {
-	padding-left:1em;
-	font-size:11pt;
-}
Index: trunk/webapps/einotebook/script/script.js
===================================================================
--- trunk/webapps/einotebook/script/script.js	(revision 418)
+++ 	(revision )
@@ -1,190 +1,0 @@
-/**
- * Holds references to the events and incidents.
- */
-function Script()
-{
-	Script.events = null;
-	Script.incidents = null;
-}
-
-/**
- * Scrolls to the last event executed based on time.
- */
-function jumpToLastExecutedEvent()
-{	
-	var lastEventArray = Script.events.getLastExecutedEvent(readCookie("time"));
-
-	// IF a current event exists THEN
-	if (lastEventArray != null)
-	{
-        // Move window focus to first event of the current ones
-        var last = lastEventArray.length - 1;
-	    lastEventArray[last].focus();
-	}
-	else
-	{
-		alert("No events have been executed yet.");
-	}
-}
-
-/**
- * Finds the Event that was last executed by based on time and highlights it.
- * Removes highlighting from old events.
- * @return
- */
-function highlightLatestEvent() 
-{
-    Script.events.setEmphasis();  // Set text colors on all events
-
-    var currentEventArray = Script.events.getLastExecutedEvent(readCookie("time"));
-	/* highlight the items in the current event array */
-    for (i=0; i<currentEventArray.length; i++) 
-    {
-		currentEventArray[i].highlight();
-	}
-
-    // Set timer to do this again in one second
-	setTimeout("highlightLatestEvent()", 1000);
-}
-
-/**
- * Loads the the script tab for the given document.
- * @pre script.html must be completely loaded
- * @param aDocument
- */
-function loadScript(theEvents, theIncidents)
-{
-	Script.incidents = theIncidents;
-	Script.events = theEvents;
-	Script.events.win = document.getElementById("view").contentWindow;
-	Script.events.doc = getDocumentFromFrame('view');
-
-	var html = "";
-	
-	// FOR each Event
-	for (var i = 0; i < Script.events.length; i++)
-	{
-		// add the Event's html
-		html += Script.events[i].html();
-        //console.log(Script.events[i].html());
-	}
-	
-	// display events in iframe
-	getDocumentFromFrame('view').body.innerHTML = html;	
-	
-	// resize iframe to appropriate height
-	resizeIframe();
-	window.onresize = resizeIframe;
-    // This line is causing an error
-	//window.frames['view'].setEvents(Script.events);
-	
-	Script.events.win.scrollTo(0, readCookie('scriptScrollY'));
-	
-	highlightLatestEvent();
-
-}
-
-/**
- * @param id The id of the frame element.
- * @return The document of the frame element.
- */
-function getDocumentFromFrame(id)
-{
-    var frame=document.getElementById(id);
-    var doc=(frame.contentWindow || frame.contentDocument);
-    
-    if (doc.document)doc=doc.document;
-    
-    return doc;
-}
-
-/**
- * Finds the height of an element relative to the BODY tag.
- * @param elem The element to find the height of.
- * @return The y-coordinate of the given element relative to the BODY tag.
- */
-function pageY(elem) 
-{
-    return elem.offsetParent ? (elem.offsetTop + pageY(elem.offsetParent)) : elem.offsetTop;
-}
-
-/**
- * Resizes the view for the events so that the view's height is at the bottom of its
- * container.
- */
-function resizeIframe() 
-{
-    var height = document.documentElement.clientHeight;
-    height -= pageY(document.getElementById('view'));
-    height = (height < 0) ? 0 : height - 10;
-    document.getElementById('view').style.height = height + 'px';
-}
-
-/**
- * Highlights the text of an input text element after a small delay.
- * This method was made because using the code "onFocus='this.focus()'" did not work.
- * @pre textField must have an 'id' attribute
- * @param textField An input text element.
- */
-function highlightTextField(textField)
-{
-	setTimeout("document.getElementById('" + textField.id + "').select();", 100);
-}
-
-/**
- * Formats a two digit textbox. If the text box contains only one digit, then a zero
- * is appended to the front.
- * @param textField An input text element.
- */
-function formatTimeTextfield(textField)
-{
-	// IF the text field contains 1 digits THEN
-	if (textField.value.length == 1)
-	{
-		textField.value = "0".concat(textField.value);
-	}
-}
-
-/**
- * Scrolls to the event latest executed event if the current simulation time was given
- * by text fields 'timeTextSeconds', 'timeTextMinutes', 'timeTextHours'.
- */
-function jumpToTime()
-{
-	var seconds = parseInt(document.getElementById('timeTextSeconds').value, 10);
-	var minutes = parseInt(document.getElementById('timeTextMinutes').value, 10);
-	var hours = parseInt(document.getElementById('timeTextHours').value, 10);
-
-	var lastEvent = Script.events.getLastExecutedEvent(new Time(hours, minutes, seconds).getSeconds());
-
-	// IF an event was executed THEN
-	if (lastEvent != null)
-	{
-		lastEvent.focus();
-	}
-}
-
-/**
- * Collapses the elements based on the value of the dropdownbox with id 'domain'.
- */
-function collapse()
-{
-	var selection = document.getElementById('domain');
-	var selectedIndex = selection.selectedIndex;
-	var selectedValue = selection.options[selectedIndex].value;
-	
-	eval("Script.events.collapseAll" + selectedValue + "();");
-}
-
-/**
- * Expands the elements based on the value of the dropdownbox with id 'domain'.
- */
-function expand()
-{
-	var selection = document.getElementById('domain');
-	var selectedIndex = selection.selectedIndex;
-	var selectedValue = selection.options[selectedIndex].value;
-	
-	eval("Script.events.expandAll" + selectedValue + "();");
-}
-
Index: trunk/webapps/einotebook/index.html
===================================================================
--- trunk/webapps/einotebook/index.html	(revision 401)
+++ trunk/webapps/einotebook/index.html	(revision 468)
@@ -21,45 +21,12 @@
     <script type="text/javascript" src="scripts/Incident.js"></script>
     <script type="text/javascript" src="scripts/Incidents.js"></script>
-    <script type="text/javascript" src="scripts/LoadEvents.js"></script> 
-    <!--script type="text/javascript" src="scripts/PopulateIncidents.js"></script-->
-    <!--script type="text/javascript" src="scripts/PopulateEvents.js"></script-->
     <script type="text/javascript" src="summary/summary.js"></script> 
     <script type="text/javascript" src="notebook.js"></script> 
+    <!-- LoadEvents contains init() function, the main entry point -->
+    <script type="text/javascript" src="scripts/LoadEvents.js"></script> 
   </head>
-  <body onLoad="showRevision(); setupNotebook(); run();">
+  <body onLoad="showRevision(); init()">
     
     <table class="notebook">
-     <!-- The header which contains the number of evaluations, simulation status, 
-               and time 
-      <tr style="height: 20px">
-        <td>
-          <table class="header">     
-            <tr>
-            
-              <td class="updateStatusBox">
-                <table>
-                  <tr>
-                    <td class="updateStatus" id="updateStatus">New Event</td>
-                  </tr>
-                </table>
-              </td>
-        
-              <td class="statusBox">
-                <center><table>
-                  <tr>
-                    <td class="simulationStatus" id="simulationStatus">NOT STARTED</td>
-                  </tr>
-                </table></center>
-              </td> 
-
-              <td class="simulationTime" id="simulationTime">
-                0:00:00
-              </td>
-
-            </tr>
-          </table>
-        </td>
-      </tr>
--->
       <tr style="height: 80px">
         <td colspan='3' class="tabMenu">
@@ -77,6 +44,6 @@
               Simulation Script
             </li>
-            <li class="notActive" id="CADTab" 
-            	onClick="changeTab(this.id); showContent('cadPageContent')">
+            <li class="notActive" id="currentTab" 
+            	onClick="changeTab(this.id); showContent('currentEventPageContent')">
               Current Event
             </li>
@@ -94,25 +61,21 @@
       <tr>
             <td class='tabPageContent' id='summaryPageContent' style="display:inline">
-            <iframe id='summaryTabPage' src='summary/summary.html' frameborder='0' scrolling='yes'
-		    height='100%' width='100%'
-		    onLoad='incidents.doc = getDocumentFromFrame(&quot;summaryTabPage&quot;);
-		    window.frames[0].loadSummary(incidents);'></iframe>
+            <iframe id='summaryTabPage' src='summary/index.html' frameborder='0' scrolling='yes'
+		    height='100%' width='100%'>
+            </iframe>
 		  </td>
           <td class='tabPageContent' id='scriptPageContent' style="display:none;">
-            <iframe id='tabPage' src='script/script.html' frameborder='0' 
-            scrolling='yes' height='100%' width='100%'
-            onLoad='window.frames[1].loadScript(events, incidents);'
-            >
+            <iframe id='tabPage' src='script/index.html' frameborder='0' 
+            scrolling='yes' height='100%' width='100%'>
 		    </iframe>
 		  </td>
-		  <td class='tabPageContent' id='cadPageContent' style="display:none;">
-		    <iframe src='cad/index.html' frameborder='0' 
-             scrolling='yes' height='100%' width='100%' 
-            onLoad='window.frames[2].loadScript(events, incidents);'>
+		  <td class='tabPageContent' id='currentEventPageContent' style="display:none;">
+		    <iframe id='currentEventPage' src='currentEvent/index.html' frameborder='0' 
+             scrolling='yes' height='100%' width='100%'> 
 		    </iframe>
 		  </td>
           <td class='tabPageContent' id='mapsPageContent' style="display:none;">
             <iframe src='maps/index.html' frameborder='0' 
-                             scrolling='no' height='100%' width='100%' >
+            scrolling='no' height='100%' width='100%' >
 		    </iframe>
           </td>
Index: trunk/webapps/einotebook/notebook_standalone.js
===================================================================
--- trunk/webapps/einotebook/notebook_standalone.js	(revision 359)
+++ 	(revision )
@@ -1,194 +1,0 @@
-/*
-function loadXMLDoc()
-{
-  if (window.XMLHttpRequest)
-  {
-    xmlhttp = new XMLHttpRequest();
-  }
-  else
-  {
-    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
-  }
-
-  xmlhttp.onreadystatechange=function()
-  {
-    if (xmlhttp.readyState==4 && xmlhttp.status==200)
-    {
-      document.getElementById("myDiv").innerHTML = xmlhttp.responseText;
-    }
-  }
-  
-  xmlhttp.open("GET", "ajax_info.txt", true);
-  xmlhttp.send("");
-}
-*/
-
-/**
- * Sets the selected tab to the summary tab and loads the summary page.
- */
-
-function setupNotebook()
-{
-   changeTab('summaryTab');
-   showContent('summaryPageContent')
-   loadSummary();
-   setCookie("time", "0");
-   setCookie("scriptScrollY", 0);
-   setCookie("summaryScrollY", 0);
-}
-
-/**
- * Runs the script.
- */
-function run()
-{
-	run.initialDelay = 1000;
-	
-	setTimeout("run.run()", run.initialDelay);
-	
-	run.run = function()
-	{
-//	    document.getElementById("simulationStatus").innerHTML = "RUNNING";                 
-		setTime();
-		updateStatus();
-	};
-}
-
-/**
- * Displays fading text alerts in the status box (left-top corner).
- */
-function updateStatus()
-{
-	// IF last event if it has not been set before THEN
-    if (typeof updateStatus.lastEvent == 'undefined')
-    {
-    	updateStatus.lastEvent = null;
-    }
-   
-    var latestEvent = events.getLastExecutedEvent(readCookie("time"));
-    
-    
-    // IF a new event executed THEN
-    if (updateStatus.lastEvent != latestEvent)
-    {
-		// IF the new event has evaluations THEN
-    	if (latestEvent.evaluations.evaluations.length == 0)
-    	{
-//    		document.getElementById('updateStatus').innerHTML = "New Event";
-    	}
-    	else
-    	{
-//    		document.getElementById('updateStatus').innerHTML = "New Evaluation";
-    	}
-    	
-		// fades the text
-		updateStatus.fade = function fade()
-		{
-			// IF the fade color is not black yet THEN
-    		if (fade.hex < 255)
-    		{
-    			fade.hex += 5;
-//    			document.getElementById('updateStatus').style.color = 
-    				"rgb(" + fade.hex + ", " + fade.hex + ", " + fade.hex + ")";  
-    			setTimeout("updateStatus.fade()", 100);	
-    		}
-    		else
-    		{
-//    			document.getElementById('updateStatus').style.color = "white";
-    		}
-
-		};
-        
-		updateStatus.fade.hex = 0;
-		updateStatus.fade();
-    	updateStatus.lastEvent = latestEvent;
-    }
-    
-    setTimeout("updateStatus();", 1000);
-}
-
-/**
- * Sets 'simulationTime' to the current simulation time in seconds.
- * This method runs itself every second to keep the time current.
- * Sets the cookie 'time' to the value of 'simulationTime'.
- * @return
- */
-function setTime()
-{
-	// increment time by one second (or initialize it if it has not been set before)
-	setTime.time = (typeof setTime.time == 'undefined') ? 0 : ++setTime.time;
-
-    setCookie("time", "" + setTime.time);
-   
-	// display the latest simulation time
-	document.getElementById("simulationTime").innerHTML = 
-		Time.formatTime(setTime.time);
-	
-    setTimeout("setTime()", 1000);
-}
-
-/**
- * Selects a new tab to be viewed. 
- * @param id The id for the tab to be selected
- */
-function changeTab(id)
-{
-    /* Set all tabs to not being active */
-    document.getElementById("summaryTab").className = "notActive";
-    document.getElementById("scriptTab").className = "notActive";
-    document.getElementById("CADTab").className = "notActive";
-    document.getElementById("mapsTab").className = "notActive";
-
-    /* Set the selected tab to being active */
-    document.getElementById(id).className = "activeTab";
-}
-
-/**
- * Loads the script tab page;
- */
-function loadScript()
-{
-}
-
-/**
- * Loads the summary tab page;
- */
-function loadSummary()
-{	   
-}
-
-/**
- * @param id The id of the frame element.
- * @return The document of the frame element.
- */
-function getDocumentFromFrame(id)
-{
-    var frame=document.getElementById(id);
-    var doc=(frame.contentWindow || frame.contentDocument);
-    
-    if (doc.document)doc=doc.document;
-    
-    return doc;
-}
-
-/**
- * Hides a tab page
- * @param d The div of the page to hide.
- */
-function hideContent(d) 
-{
-    document.getElementById(d).style.display = "none";
-}
-
-/**
- * Switches the tab page.
- * @param d The div of the page to show.
- */
-function showContent(d) 
-{
-    hideContent('summaryPageContent');
-    hideContent('scriptPageContent');
-    hideContent('cadPageContent');
-    hideContent('mapsPageContent');    
-    document.getElementById(d).style.display = "block"; 
-}
