function liveUpdater(uriFunc, ret){	var request = false;	function xmlUpdater()	{		return sendHttpCallback(uriFunc(), ret);	}	return xmlUpdater;	//	Build and send HTTP request to Seaside	function sendHttpCallback(uri, ret, respFunc)	{		if (request && request.readyState < 4)			request.abort();		request = newHttpRequest();		if (!request)			return ret;		if (!respFunc)			respFunc = processRequestChange;		request.onreadystatechange = respFunc;		// Resolve xml entity before issuing the request		var uri = addParameter(uri, "timestamp", (new Date()).getTime().toString());		var regex = new RegExp("&amp;", "g");		uri = uri.replace(regex,"&");		request.open("GET", uri);		request.send(null);		return ret;	}	//	Parse HTTP response from the Seaside live callbacks as XML and update the document	function processRequestChange()	{		if (request.readyState == 4) {			var doc = request.responseXML;			var replacements = [];			var anyReplacement = false;// alert( request.responseText);// alert( request.status);// alert( request.statusText);// alert( request.getAllResponseHeaders() );	// alert( request.responseXML.parseError.errorCode);// alert( request.responseXML.parseError.reason);			if (doc != null) {				var elements = doc.getElementsByTagName("*");				if (elements.length == 0) {					// IE does not support the above, use an alternative hard-coded technique					elements = getAllElements(doc)				}				// Find html elements with the id= attribute				for ( var x = 1 ; x <= elements.length ; x++ ) {					var elem = elements[x-1];					if (elem.tagName == "body") {						var body = xmlString(elem);					}					var attributes = elem.attributes;					if (attributes.length > 0) {						for ( var ax = 1 ; ax <= attributes.length ; ax++ ) {							var attr = attributes[ax-1];							var attrName = attr.name;							if (attrName == "id") {								// Find the html element in the document that has a matching id and replace it								var docElement = document.getElementById(attr.value);								if (docElement) {									if (!includes(replacements,elem)) {										// HTML is only updated with the parent at highest level										// Resolve IE and Opera issue where <br></br> skips two lines										var regex = new RegExp("<br></br>", "g");										var replacement = xmlString(elem).replace(regex,"<br/>");										try {											docElement.innerHTML = replacement;											anyReplacement = true;											replacements[replacements.length] = attr.value;										} catch (e) {											// Some browsers (like Safari) have read-only elements										}									}								}							}						}					}   				}				// Find html <script> elements and execute them				for ( var x = 1 ; x <= elements.length ; x++ ) {					var elem = elements[x-1];					if (elem.tagName == 'script') {						eval(elem.childNodes[0].data);					}				}			}			if (!anyReplacement) {				if ( body ) {					document.body.innerHTML = body;				} else {					// Most probable reason for being here : response does not have an xml content					// For instance : an exception in the live callback					document.body.innerHTML = request.responseText;				}			}		}	}}