/* 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() { console.log("setupNotebook() starting"); 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) { var i; for (i=0; i