diff --git a/debtagsite/static/javascript/hypertree1.0.js b/debtagsite/static/javascript/hypertree1.0.js
index c8e27f8..7fdc95a 100644
--- a/debtagsite/static/javascript/hypertree1.0.js
+++ b/debtagsite/static/javascript/hypertree1.0.js
@@ -665,6 +665,7 @@ Node.prototype= {
 	      canvas - A Canvas instance.
 	*/	
 	printInfoOn: function (id, canvas) {
+		/* Non-DOM version:
 		var ide= this.id + '_a';
 		var obj= document.getElementById(id);
 		var output=	'<div id="'+this.id+'_child">' 
@@ -672,7 +673,28 @@ Node.prototype= {
 			+ this.info + '</a></div>';
 		obj.innerHTML+= output;
 		this.setDivProperties('ht_label', canvas, this.id);
-			//alert(obj.innerHTML);
+		alert(obj.innerHTML);
+		*/
+
+		//// DOM version, with proper reference to 'this':
+		var ide= this.id + '_a';
+		var obj= document.getElementById(id);
+		var out_div = document.createElement("div");
+		out_div.setAttribute("id", this.id+"_child");
+		var out_a = document.createElement("a");
+		out_a.setAttribute("id", this.id);
+		out_a.setAttribute("href", "#");
+		out_a.appendChild(document.createTextNode(this.info));
+		var pthis = this;
+		out_a.onclick = function() {
+			obj.ht.labelOnEventHandler(pthis.id);
+			return false;
+		};
+		out_div.appendChild(out_a);
+		obj.appendChild(out_div);
+		this.setDivProperties('ht_label', canvas, this.id);
+		//alert(obj.innerHTML);
+
 	},
 	
 		/*
@@ -931,7 +953,12 @@ HT.prototype= {
   	this.calculatePositions('1_a');
   	this.translateTo(new Complex(-0.1, -0.05), 1000);
   	if (document.getElementById(this.config.labelContainer))
+	{
 	  	document.getElementById(this.config.labelContainer).innerHTML= ''; 	
+		// Save a reference to the hypertree into the label container,
+		// so that Node can find it later
+	  	document.getElementById(this.config.labelContainer).ht = this; 	
+	}
   },
 
 	/*
@@ -1077,7 +1104,7 @@ HT.prototype= {
   				};
   				ctx.moveTo(0, 0);
   				var hl= new HyperLine(new Complex(pos.x, pos.y), new Complex(pos_j.x, pos_j.y));
-  				hl.printOn(canvas);
+  				hl.printOn(this.canvas);
   			}
   		}
 		}
@@ -1102,7 +1129,10 @@ HT.prototype= {
       
       this.complexTo= new Complex(-complexTo.x, complexTo.y);
       this.printNodesAt({x: tempVector.x, y: tempVector.y});
-      this.intervalObj= setInterval("ht.printNodesRelativeAt({x: "+tempVector.x+", y: "+tempVector.y+"})", timeSlot);
+      var pthis = this
+      this.intervalObj= setInterval(function(){
+      	pthis.printNodesRelativeAt({x: tempVector.x, y: tempVector.y})
+      }, timeSlot);
     }
   },
 
@@ -1185,7 +1215,12 @@ HT.prototype= {
     	this.timesToInterval= 0;
     	this.setFlag(true);
     	if(this.config.showLabels)
-    		setTimeout("ht.makeLabelsForCenteredNode();", 200);
+	{
+		var pthis = this;
+    		setTimeout(function(){
+			pthis.makeLabelsForCenteredNode();
+		}, 200);
+	}
     } else {
     	this.moebiusTransformation(1, at.scale(-this.relativeScale));
     }

