Index: /gs3-extensions/html-to-expeditee/trunk/src/src/js/gsajax-min.js
===================================================================
--- /gs3-extensions/html-to-expeditee/trunk/src/src/js/gsajax-min.js	(revision 24917)
+++ /gs3-extensions/html-to-expeditee/trunk/src/src/js/gsajax-min.js	(revision 24917)
@@ -0,0 +1,75 @@
+        
+function urlGetSync(url)
+{
+    // alert("url = " + url);
+    
+    var xmlHttp;
+    try {
+         // Firefox, Opera 8.0+, Safari
+        xmlHttp=new XMLHttpRequest();
+    }
+    catch (e) {
+        // Internet Explorer
+        try {
+           xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
+        }
+        catch (e) {
+            try {
+		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
+            }
+            catch (e) {
+		alert("Your browser does not support AJAX!");
+		return false;
+            }
+        }
+    }
+    
+    xmlHttp.open("GET",url,false);
+    xmlHttp.send(null);
+
+    // alert("response = '" + xmlHttp.responseText + "'");
+    
+    return xmlHttp.responseText;
+}
+
+function urlPostSync(url,params)
+{
+    // alert("url = " + url);
+    
+    var xmlHttp;
+    try {
+         // Firefox, Opera 8.0+, Safari
+        xmlHttp=new XMLHttpRequest();
+    }
+    catch (e) {
+        // Internet Explorer
+        try {
+           xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
+        }
+        catch (e) {
+            try {
+		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
+            }
+            catch (e) {
+		alert("Your browser does not support AJAX!");
+		return false;
+            }
+        }
+    }
+    
+    xmlHttp.open("POST",url,false);
+
+    xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
+    xmlHttp.setRequestHeader("Content-length", params.length);
+    xmlHttp.setRequestHeader("Connection", "close");
+
+    xmlHttp.send(params);
+
+    // alert("response = '" + xmlHttp.responseText + "'");
+    
+    return xmlHttp.responseText;
+}
+
+
+
+
Index: /gs3-extensions/html-to-expeditee/trunk/src/src/js/html-to-expeditee.js
===================================================================
--- /gs3-extensions/html-to-expeditee/trunk/src/src/js/html-to-expeditee.js	(revision 24917)
+++ /gs3-extensions/html-to-expeditee/trunk/src/src/js/html-to-expeditee.js	(revision 24917)
@@ -0,0 +1,140 @@
+//javascript: 
+var expSyntaxArray = [];
+
+Element.prototype.getElementWidth = function() {
+    if (typeof this.clip !== "undefined") {
+	return this.clip.width;
+    } else {
+	if (this.style.pixelWidth) {
+	    return this.style.pixelWidth;
+	} else {
+	    return this.offsetWidth;
+	}
+    }
+};
+
+Element.prototype.getElementHeight = function() {
+    if (typeof this.clip !== "undefined") {
+	return this.clip.height;
+    } else {
+	if (this.style.pixelHeight) {
+	    return this.style.pixelHeight;
+	} else {
+	    return this.offsetHeight;
+	}
+    }
+};
+
+function getElementWidth(elem)
+{
+    if (typeof elem.clip !== "undefined") {
+	return elem.clip.width;
+    } else {
+	if (elem.style.pixelWidth) {
+	    return elem.style.pixelWidth;
+	} else {
+	    return elem.offsetWidth;
+	}
+    }
+}
+
+function getElementHeight(elem)
+{
+    if (typeof elem.clip !== "undefined") {
+	return elem.clip.height;
+    } else {
+	if (elem.style.pixelHeight) {
+	    return elem.style.pixelHeight;
+	} else {
+	    return elem.offsetHeight;
+	}
+    }
+}
+
+function getStyle(el,styleProp)
+{
+    var x = document.getElementById(el);
+    if (x.currentStyle) {
+	var y = x.currentStyle[styleProp];
+    }
+    else if (window.getComputedStyle) {
+	var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
+    }
+    return y;
+}
+
+function getElementPosition(elem) 
+{
+    var origElem = elem;
+
+    var xl_ = 0;
+    var yt_ = 0;
+
+    while(elem && !isNaN(elem.offsetLeft) && !isNaN(elem.offsetTop)) {
+        xl_ += elem.offsetLeft - elem.scrollLeft;
+        yt_ += elem.offsetTop - elem.scrollTop;
+        elem = elem.offsetParent;
+    }
+
+    var xr_ = xl_ + getElementWidth(origElem);
+    var yb_ = yt_ + getElementHeight(origElem);
+
+    return { xl: xl_, yt: yt_, xr: xr_, yb: yb_ };
+}
+
+
+
+function htmlToExpeditee(node,depth) 
+{
+    depth = (depth) ? depth : 0;
+
+    var expSyntax = "";
+
+    if (node.nodeType == 3) { /* text node */
+        var text = node.nodeValue;
+
+        if (text.match(/\S/)) {
+	    for (var i=0; i<depth; i++) { expSyntax += "  "; }
+	    expSyntax += "Text item: " + node.nodeValue + "\n";
+	}
+    }
+    else if (node.nodeType == 1) { /* element */
+
+	/* need to handle: img, a, li */
+        /* need to dig out: text size, l/r/justified, font-face, type, colour */
+
+        var elemName = node.Name;
+	if (elemName != "SCRIPT") {
+
+	    
+	    var nodePos = getElementPosition(node); 
+	    var xl = nodePos.xl;
+	    var xr = nodePos.xr;
+	    var yt = nodePos.yt;
+	    var yb = nodePos.yb;
+
+	    var rectSyntax = "";
+	    for (var i=0; i<depth; i++) { rectSyntax += "  "; }
+	    rectSyntax += "Rect item " + node.nodeName + ": ";
+	    rectSyntax += xl + " " + yt + " " + xr + " " + yb + "\n";
+
+	    expSyntax += rectSyntax;
+
+	    var cnode = node.firstChild; 
+	    while (cnode != null) {
+		expSyntax += htmlToExpeditee(cnode,depth+1);  
+		
+		cnode = cnode.nextSibling ;
+	    }
+
+	}
+
+    }
+    /* currently do nothing for the other node types */
+
+    return expSyntax;
+}
+
+
+//var body = document.body;
+//alert(traverseDOM(body));
