Index: /lang/javascript/javascript-xpath/trunk/test/functional/index.html
===================================================================
--- /lang/javascript/javascript-xpath/trunk/test/functional/index.html (revision 1501)
+++ /lang/javascript/javascript-xpath/trunk/test/functional/index.html (revision 1517)
@@ -7,4 +7,7 @@
   <meta http-equiv="Content-Style-Type" content="text/css" />
   <meta http-equiv="Content-Script-Type" content="text/javascript" />
+
+  <script type="text/javascript" src="./logger.js"></script>
+
   <script type="text/javascript" src="../../src/config.js"></script>
   <script type="text/javascript" src="../../src/uai.js"></script>
@@ -124,83 +127,5 @@
 var testLog = document.getElementById('testLog');
 
-var Logger = function(header, html, id, prevId) {
-    this.container = document.createElement('div');
-    this.container.id = 'test-' + id;
-    testLog.appendChild(this.container);
-
-
-    this.h2 = document.createElement('h2');
-    this.container.appendChild(this.h2);
-
-    this.thisAnchor = document.createElement('a');
-    this.thisAnchor.href = '#test-' + id;
-    this.thisAnchor.appendChild(document.createTextNode(header));
-    this.h2.appendChild(this.thisAnchor);
-
-    this.localCount = 0;
-    this.localOkCount = 0;
-    this.localCountElm = document.createElement('span');
-    this.localCountElm.className = 'local-counter';
-    this.localCountElm.innerHTML = '<span class="local-counter-ok">0</span> / <span>0</span>'
-    this.h2.appendChild(document.createTextNode(' '));
-    this.h2.appendChild(this.localCountElm);
-
-    this.anchorContainer = document.createElement('div');
-    this.container.appendChild(this.anchorContainer);
-
-    var anchor = document.createElement('a');
-    anchor.href = '?' + id;
-    anchor.appendChild(document.createTextNode('(only this test)'));
-    anchor.className = 'only';
-    this.anchorContainer.appendChild(anchor);
-
-    if (prevId) {
-        this.prevAnchor = document.createElement('a');
-        this.prevAnchor.href = '#test-' + prevId;
-        this.prevAnchor.appendChild(document.createTextNode('(prev)'));
-        this.prevAnchor.className = 'prev';
-        this.anchorContainer.appendChild(document.createTextNode(' '));
-        this.anchorContainer.appendChild(this.prevAnchor);
-    }
-
-    this.pre = document.createElement('pre');
-    if (uai.ie) {
-        var dummy = document.createElement('pre');
-        dummy.appendChild(document.createTextNode(html));
-        this.pre.innerHTML = dummy.innerHTML.replace(/\n/g, '<br/>\n').replace(/\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;').replace(/ /g, '&nbsp;');
-    }
-    else {
-        this.pre.appendChild(document.createTextNode(html));
-    }
-    this.container.appendChild(this.pre);
-
-    this.table = document.createElement('table');
-    this.thead = document.createElement('thead');
-    this.tbody = document.createElement('tbody');
-    this.table.appendChild(this.thead);
-    this.table.appendChild(this.tbody);
-    var td, tr = document.createElement('tr');
-    this.thead.appendChild(tr);
-    td = document.createElement('th');
-    td.appendChild(document.createTextNode('expression'));
-    tr.appendChild(td);
-    td = document.createElement('th');
-    td.appendChild(document.createTextNode('expects'));
-    tr.appendChild(td);
-    td = document.createElement('th');
-    td.appendChild(document.createTextNode('result'));
-    tr.appendChild(td);
-    td = document.createElement('th');
-    td.appendChild(document.createTextNode('time(ms)'));
-    tr.appendChild(td);
-    td = document.createElement('th');
-    td.appendChild(document.createTextNode('links'));
-    tr.appendChild(td);
-    this.container.appendChild(this.table);
-    this.count = 0;
-    this.id = id;
-
-
-};
+
 
 Logger.globalCount = 0;
@@ -208,12 +133,5 @@
 Logger.globalCountElm = document.getElementById('counter');
 
-Logger.prototype.next = function(id) {
-    this.nextAnchor = document.createElement('a');
-    this.nextAnchor.href = '#test-' + id;
-    this.nextAnchor.appendChild(document.createTextNode('(next)'));
-    this.nextAnchor.className = 'next';
-    this.anchorContainer.appendChild(document.createTextNode(' '));
-    this.anchorContainer.appendChild(this.nextAnchor);
-};
+
 
 Logger.prototype.log = function(expression, expects, result, className, time) {
Index: /lang/javascript/javascript-xpath/trunk/test/functional/logger.js
===================================================================
--- /lang/javascript/javascript-xpath/trunk/test/functional/logger.js (revision 1517)
+++ /lang/javascript/javascript-xpath/trunk/test/functional/logger.js (revision 1517)
@@ -0,0 +1,92 @@
+if (!window.Logger)
+	window.Logger = null;
+
+Logger = function(header, html, id, prevId) {
+    this.container = document.createElement('div');
+    this.container.id = 'test-' + id;
+    testLog.appendChild(this.container);
+
+
+    this.h2 = document.createElement('h2');
+    this.container.appendChild(this.h2);
+
+    this.thisAnchor = document.createElement('a');
+    this.thisAnchor.href = '#test-' + id;
+    this.thisAnchor.appendChild(document.createTextNode(header));
+    this.h2.appendChild(this.thisAnchor);
+
+    this.localCount = 0;
+    this.localOkCount = 0;
+    this.localCountElm = document.createElement('span');
+    this.localCountElm.className = 'local-counter';
+    this.localCountElm.innerHTML = '<span class="local-counter-ok">0</span> / <span>0</span>'
+    this.h2.appendChild(document.createTextNode(' '));
+    this.h2.appendChild(this.localCountElm);
+
+    this.anchorContainer = document.createElement('div');
+    this.container.appendChild(this.anchorContainer);
+
+    var anchor = document.createElement('a');
+    anchor.href = '?' + id;
+    anchor.appendChild(document.createTextNode('(only this test)'));
+    anchor.className = 'only';
+    this.anchorContainer.appendChild(anchor);
+
+    if (prevId) {
+        this.prevAnchor = document.createElement('a');
+        this.prevAnchor.href = '#test-' + prevId;
+        this.prevAnchor.appendChild(document.createTextNode('(prev)'));
+        this.prevAnchor.className = 'prev';
+        this.anchorContainer.appendChild(document.createTextNode(' '));
+        this.anchorContainer.appendChild(this.prevAnchor);
+    }
+
+    this.pre = document.createElement('pre');
+    if (uai.ie) {
+        var dummy = document.createElement('pre');
+        dummy.appendChild(document.createTextNode(html));
+        this.pre.innerHTML = dummy.innerHTML.replace(/\n/g, '<br/>\n').replace(/\t/g, '&nbsp;&nbsp;&nbsp;&nbsp;').replace(/ /g, '&nbsp;');
+    }
+    else {
+        this.pre.appendChild(document.createTextNode(html));
+    }
+    this.container.appendChild(this.pre);
+
+    this.table = document.createElement('table');
+    this.thead = document.createElement('thead');
+    this.tbody = document.createElement('tbody');
+    this.table.appendChild(this.thead);
+    this.table.appendChild(this.tbody);
+	this.theadRow = document.createElement('tr');
+	this.thead.appendChild(this.theadRow);
+
+	this.appendHeader('expression');
+	this.appendHeader('expects');
+	this.appendHeader('result');
+	this.appendHeader('time(ms)');
+	this.appendHeader('links');
+
+    this.container.appendChild(this.table);
+    this.count = 0;
+    this.id = id;
+};
+
+Logger.prototype = {
+	appendHeader: function(label) {
+        th = document.createElement('th');
+        th.appendChild(document.createTextNode(label));
+        this.theadRow.appendChild(th);
+
+		return th;
+	},
+
+    next:function (id) {
+        this.nextAnchor = document.createElement('a');
+        this.nextAnchor.href = '#test-' + id;
+        this.nextAnchor.appendChild(document.createTextNode('(next)'));
+        this.nextAnchor.className = 'next';
+        this.anchorContainer.appendChild(document.createTextNode(' '));
+        this.anchorContainer.appendChild(this.nextAnchor);
+	}
+};
+
