You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2007/02/06 06:01:49 UTC

svn commit: r503984 [14/29] - in /tapestry/tapestry4/trunk: ./ tapestry-examples/TimeTracker/src/context/WEB-INF/ tapestry-framework/ tapestry-framework/src/java/org/apache/tapestry/asset/ tapestry-framework/src/java/org/apache/tapestry/dojo/ tapestry-...

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/cometd.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/cometd.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/cometd.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/cometd.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,135 @@
+
+dojo.require("dojo.io.common");dojo.provide("dojo.io.cometd");dojo.require("dojo.AdapterRegistry");dojo.require("dojo.json");dojo.require("dojo.io.BrowserIO");dojo.require("dojo.io.IframeIO");dojo.require("dojo.io.ScriptSrcIO");dojo.require("dojo.io.cookie");dojo.require("dojo.event.*");dojo.require("dojo.lang.common");dojo.require("dojo.lang.func");cometd = new function(){this.initialized = false;this.connected = false;this.connectionTypes = new dojo.AdapterRegistry(true);this.version = 0.1;this.minimumVersion = 0.1;this.clientId = null;this._isXD = false;this.handshakeReturn = null;this.currentTransport = null;this.url = null;this.lastMessage = null;this.globalTopicChannels = {};this.backlog = [];this.tunnelInit = function(childLocation, childDomain){}
+this.tunnelCollapse = function(){dojo.debug("tunnel collapsed!");}
+this.init = function(props, root, bargs){props = props||{};props.version = this.version;props.minimumVersion = this.minimumVersion;props.channel = "/meta/handshake";this.url = root||djConfig["cometdRoot"];if(!this.url){dojo.debug("no cometd root specified in djConfig and no root passed");return;}
+var bindArgs = {url: this.url,method: "POST",mimetype: "text/json",load: dojo.lang.hitch(this, "finishInit"),content: { "message": dojo.json.serialize([props]) }};var regexp = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$";var r = (""+window.location).match(new RegExp(regexp));if(r[4]){var tmp = r[4].split(":");var thisHost = tmp[0];var thisPort = tmp[1]||"80";r = this.url.match(new RegExp(regexp));if(r[4]){tmp = r[4].split(":");var urlHost = tmp[0];var urlPort = tmp[1]||"80";if((urlHost != thisHost)||
+(urlPort != thisPort) ){dojo.debug(thisHost, urlHost);dojo.debug(thisPort, urlPort);this._isXD = true;bindArgs.transport = "ScriptSrcTransport";bindArgs.jsonParamName = "jsonp";bindArgs.method = "GET";}}
+}
+if(bargs){dojo.lang.mixin(bindArgs, bargs);}
+return dojo.io.bind(bindArgs);}
+this.finishInit = function(type, data, evt, request){data = data[0];this.handshakeReturn = data;if(data["authSuccessful"] == false){dojo.debug("cometd authentication failed");return;}
+if(data.version < this.minimumVersion){dojo.debug("cometd protocol version mismatch. We wanted", this.minimumVersion, "but got", data.version);return;}
+this.currentTransport = this.connectionTypes.match(
+data.supportedConnectionTypes,data.version,this._isXD
+);this.currentTransport.version = data.version;this.clientId = data.clientId;this.tunnelInit = dojo.lang.hitch(this.currentTransport, "tunnelInit");this.tunnelCollapse = dojo.lang.hitch(this.currentTransport, "tunnelCollapse");this.initialized = true;this.currentTransport.startup(data);while(this.backlog.length != 0){var cur = this.backlog.shift();var fn = cur.shift();this[fn].apply(this, cur);}}
+this._getRandStr = function(){return Math.random().toString().substring(2, 10);}
+this.deliver = function(messages){dojo.lang.forEach(messages, this._deliver, this);}
+this._deliver = function(message){if(!message["channel"]){dojo.debug("cometd error: no channel for message!");return;}
+if(!this.currentTransport){this.backlog.push(["deliver", message]);return;}
+this.lastMessage = message;if((message.channel.length > 5)&&
+(message.channel.substr(0, 5) == "/meta")){switch(message.channel){case "/meta/subscribe":
+if(!message.successful){dojo.debug("cometd subscription error for channel", message.channel, ":", message.error);return;}
+this.subscribed(message.subscription, message);break;case "/meta/unsubscribe":
+if(!message.successful){dojo.debug("cometd unsubscription error for channel", message.channel, ":", message.error);return;}
+this.unsubscribed(message.subscription, message);break;}}
+this.currentTransport.deliver(message);var tname = (this.globalTopicChannels[message.channel]) ? message.channel : "/cometd"+message.channel;dojo.event.topic.publish(tname, message);}
+this.disconnect = function(){if(!this.currentTransport){dojo.debug("no current transport to disconnect from");return;}
+this.currentTransport.disconnect();}
+this.publish = function(channel, data, properties){if(!this.currentTransport){this.backlog.push(["publish", channel, data, properties]);return;}
+var message = {data: data,channel: channel
+};if(properties){dojo.lang.mixin(message, properties);}
+return this.currentTransport.sendMessage(message);}
+this.subscribe = function(channel,useLocalTopics,objOrFunc,funcName){if(!this.currentTransport){this.backlog.push(["subscribe", channel, useLocalTopics, objOrFunc, funcName]);return;}
+if(objOrFunc){var tname = (useLocalTopics) ? channel : "/cometd"+channel;if(useLocalTopics){this.globalTopicChannels[channel] = true;}
+dojo.event.topic.subscribe(tname, objOrFunc, funcName);}
+return this.currentTransport.sendMessage({channel: "/meta/subscribe",subscription: channel
+});}
+this.subscribed = function(channel,message){dojo.debug(channel);dojo.debugShallow(message);}
+this.unsubscribe = function(channel,useLocalTopics,objOrFunc,funcName){if(!this.currentTransport){this.backlog.push(["unsubscribe", channel, useLocalTopics, objOrFunc, funcName]);return;}
+if(objOrFunc){var tname = (useLocalTopics) ? channel : "/cometd"+channel;dojo.event.topic.unsubscribe(tname, objOrFunc, funcName);}
+return this.currentTransport.sendMessage({channel: "/meta/unsubscribe",subscription: channel
+});}
+this.unsubscribed = function(channel,message){dojo.debug(channel);dojo.debugShallow(message);}}
+cometd.iframeTransport = new function(){this.connected = false;this.connectionId = null;this.rcvNode = null;this.rcvNodeName = "";this.phonyForm = null;this.authToken = null;this.lastTimestamp = null;this.lastId = null;this.backlog = [];this.check = function(types, version, xdomain){return ((!xdomain)&&
+(!dojo.render.html.safari)&&
+(dojo.lang.inArray(types, "iframe")));}
+this.tunnelInit = function(){this.postToIframe({message: dojo.json.serialize([
+{channel:"/meta/connect",clientId:cometd.clientId,connectionType: "iframe"
+}
+])
+});}
+this.tunnelCollapse = function(){if(this.connected){this.connected = false;this.postToIframe({message: dojo.json.serialize([
+{channel:"/meta/reconnect",clientId:cometd.clientId,connectionId:this.connectionId,timestamp:this.lastTimestamp,id:this.lastId
+}
+])
+});}}
+this.deliver = function(message){if(message["timestamp"]){this.lastTimestamp = message.timestamp;}
+if(message["id"]){this.lastId = message.id;}
+if((message.channel.length > 5)&&
+(message.channel.substr(0, 5) == "/meta")){switch(message.channel){case "/meta/connect":
+if(!message.successful){dojo.debug("cometd connection error:", message.error);return;}
+this.connectionId = message.connectionId;this.connected = true;this.processBacklog();break;case "/meta/reconnect":
+if(!message.successful){dojo.debug("cometd reconnection error:", message.error);return;}
+this.connected = true;break;case "/meta/subscribe":
+if(!message.successful){dojo.debug("cometd subscription error for channel", message.channel, ":", message.error);return;}
+dojo.debug(message.channel);break;}}
+}
+this.widenDomain = function(domainStr){var cd = domainStr||document.domain;if(cd.indexOf(".")==-1){ return; }
+var dps = cd.split(".");if(dps.length<=2){ return; }
+dps = dps.slice(dps.length-2);document.domain = dps.join(".");return document.domain;}
+this.postToIframe = function(content, url){if(!this.phonyForm){if(dojo.render.html.ie){this.phonyForm = document.createElement("<form enctype='application/x-www-form-urlencoded' method='POST' style='display: none;'>");dojo.body().appendChild(this.phonyForm);}else{this.phonyForm = document.createElement("form");this.phonyForm.style.display = "none";dojo.body().appendChild(this.phonyForm);this.phonyForm.enctype = "application/x-www-form-urlencoded";this.phonyForm.method = "POST";}}
+this.phonyForm.action = url||cometd.url;this.phonyForm.target = this.rcvNodeName;this.phonyForm.setAttribute("target", this.rcvNodeName);while(this.phonyForm.firstChild){this.phonyForm.removeChild(this.phonyForm.firstChild);}
+for(var x in content){var tn;if(dojo.render.html.ie){tn = document.createElement("<input type='hidden' name='"+x+"' value='"+content[x]+"'>");this.phonyForm.appendChild(tn);}else{tn = document.createElement("input");this.phonyForm.appendChild(tn);tn.type = "hidden";tn.name = x;tn.value = content[x];}}
+this.phonyForm.submit();}
+this.processBacklog = function(){while(this.backlog.length > 0){this.sendMessage(this.backlog.shift(), true);}}
+this.sendMessage = function(message, bypassBacklog){if((bypassBacklog)||(this.connected)){message.connectionId = this.connectionId;message.clientId = cometd.clientId;var bindArgs = {url: cometd.url||djConfig["cometdRoot"],method: "POST",mimetype: "text/json",content: { message: dojo.json.serialize([ message ]) }};return dojo.io.bind(bindArgs);}else{this.backlog.push(message);}}
+this.startup = function(handshakeData){dojo.debug("startup!");dojo.debug(dojo.json.serialize(handshakeData));if(this.connected){ return; }
+this.rcvNodeName = "cometdRcv_"+cometd._getRandStr();var initUrl = cometd.url+"/?tunnelInit=iframe";if(false && dojo.render.html.ie){this.rcvNode = new ActiveXObject("htmlfile");this.rcvNode.open();this.rcvNode.write("<html>");this.rcvNode.write("<script>document.domain = '"+document.domain+"'");this.rcvNode.write("</html>");this.rcvNode.close();var ifrDiv = this.rcvNode.createElement("div");this.rcvNode.appendChild(ifrDiv);this.rcvNode.parentWindow.dojo = dojo;ifrDiv.innerHTML = "<iframe src='"+initUrl+"'></iframe>"
+}else{this.rcvNode = dojo.io.createIFrame(this.rcvNodeName, "", initUrl);}}
+}
+cometd.mimeReplaceTransport = new function(){this.connected = false;this.connectionId = null;this.xhr = null;this.authToken = null;this.lastTimestamp = null;this.lastId = null;this.backlog = [];this.check = function(types, version, xdomain){return ((!xdomain)&&
+(dojo.render.html.mozilla)&&
+(dojo.lang.inArray(types, "mime-message-block")));}
+this.tunnelInit = function(){if(this.connected){ return; }
+this.openTunnelWith({message: dojo.json.serialize([
+{channel:"/meta/connect",clientId:cometd.clientId,connectionType: "mime-message-block"
+}
+])
+});this.connected = true;}
+this.tunnelCollapse = function(){if(this.connected){this.connected = false;this.openTunnelWith({message: dojo.json.serialize([
+{channel:"/meta/reconnect",clientId:cometd.clientId,connectionId:this.connectionId,timestamp:this.lastTimestamp,id:this.lastId
+}
+])
+});}}
+this.deliver = cometd.iframeTransport.deliver;this.handleOnLoad = function(resp){cometd.deliver(dojo.json.evalJson(this.xhr.responseText));}
+this.openTunnelWith = function(content, url){this.xhr = dojo.hostenv.getXmlhttpObject();this.xhr.multipart = true;if(dojo.render.html.mozilla){this.xhr.addEventListener("load", dojo.lang.hitch(this, "handleOnLoad"), false);}else if(dojo.render.html.safari){dojo.debug("Webkit is broken with multipart responses over XHR = (");this.xhr.onreadystatechange = dojo.lang.hitch(this, "handleOnLoad");}else{this.xhr.onload = dojo.lang.hitch(this, "handleOnLoad");}
+this.xhr.open("POST", (url||cometd.url), true);this.xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");dojo.debug(dojo.json.serialize(content));this.xhr.send(dojo.io.argsFromMap(content, "utf8"));}
+this.processBacklog = function(){while(this.backlog.length > 0){this.sendMessage(this.backlog.shift(), true);}}
+this.sendMessage = function(message, bypassBacklog){if((bypassBacklog)||(this.connected)){message.connectionId = this.connectionId;message.clientId = cometd.clientId;var bindArgs = {url: cometd.url||djConfig["cometdRoot"],method: "POST",mimetype: "text/json",content: { message: dojo.json.serialize([ message ]) }};return dojo.io.bind(bindArgs);}else{this.backlog.push(message);}}
+this.startup = function(handshakeData){dojo.debugShallow(handshakeData);if(this.connected){ return; }
+this.tunnelInit();}}
+cometd.longPollTransport = new function(){this.connected = false;this.connectionId = null;this.authToken = null;this.lastTimestamp = null;this.lastId = null;this.backlog = [];this.check = function(types, version, xdomain){return ((!xdomain)&&(dojo.lang.inArray(types, "long-polling")));}
+this.tunnelInit = function(){if(this.connected){ return; }
+this.openTunnelWith({message: dojo.json.serialize([
+{channel:"/meta/connect",clientId:cometd.clientId,connectionType: "long-polling"
+}
+])
+});this.connected = true;}
+this.tunnelCollapse = function(){if(!this.connected){this.connected = false;dojo.debug("clientId:", cometd.clientId);this.openTunnelWith({message: dojo.json.serialize([
+{channel:"/meta/reconnect",connectionType: "long-polling",clientId:cometd.clientId,connectionId:this.connectionId,timestamp:this.lastTimestamp,id:this.lastId
+}
+])
+});}}
+this.deliver = cometd.iframeTransport.deliver;this.openTunnelWith = function(content, url){dojo.io.bind({url: (url||cometd.url),method: "post",content: content,mimetype: "text/json",load: dojo.lang.hitch(this, function(type, data, evt, args){cometd.deliver(data);this.connected = false;this.tunnelCollapse();}),error: function(){ dojo.debug("tunnel opening failed"); }});this.connected = true;}
+this.processBacklog = function(){while(this.backlog.length > 0){this.sendMessage(this.backlog.shift(), true);}}
+this.sendMessage = function(message, bypassBacklog){if((bypassBacklog)||(this.connected)){message.connectionId = this.connectionId;message.clientId = cometd.clientId;var bindArgs = {url: cometd.url||djConfig["cometdRoot"],method: "post",mimetype: "text/json",content: { message: dojo.json.serialize([ message ]) }};return dojo.io.bind(bindArgs);}else{this.backlog.push(message);}}
+this.startup = function(handshakeData){if(this.connected){ return; }
+this.tunnelInit();}}
+cometd.callbackPollTransport = new function(){this.connected = false;this.connectionId = null;this.authToken = null;this.lastTimestamp = null;this.lastId = null;this.backlog = [];this.check = function(types, version, xdomain){return dojo.lang.inArray(types, "callback-polling");}
+this.tunnelInit = function(){if(this.connected){ return; }
+this.openTunnelWith({message: dojo.json.serialize([
+{channel:"/meta/connect",clientId:cometd.clientId,connectionType: "callback-polling"
+}
+])
+});this.connected = true;}
+this.tunnelCollapse = function(){if(!this.connected){this.connected = false;this.openTunnelWith({message: dojo.json.serialize([
+{channel:"/meta/reconnect",connectionType: "long-polling",clientId:cometd.clientId,connectionId:this.connectionId,timestamp:this.lastTimestamp,id:this.lastId
+}
+])
+});}}
+this.deliver = cometd.iframeTransport.deliver;this.openTunnelWith = function(content, url){var req = dojo.io.bind({url: (url||cometd.url),content: content,mimetype: "text/json",transport: "ScriptSrcTransport",jsonParamName: "jsonp",load: dojo.lang.hitch(this, function(type, data, evt, args){dojo.debug(dojo.json.serialize(data));cometd.deliver(data);this.connected = false;this.tunnelCollapse();}),error: function(){ dojo.debug("tunnel opening failed"); }});this.connected = true;}
+this.processBacklog = function(){while(this.backlog.length > 0){this.sendMessage(this.backlog.shift(), true);}}
+this.sendMessage = function(message, bypassBacklog){if((bypassBacklog)||(this.connected)){message.connectionId = this.connectionId;message.clientId = cometd.clientId;var bindArgs = {url: cometd.url||djConfig["cometdRoot"],mimetype: "text/json",transport: "ScriptSrcTransport",jsonParamName: "jsonp",content: { message: dojo.json.serialize([ message ]) }};return dojo.io.bind(bindArgs);}else{this.backlog.push(message);}}
+this.startup = function(handshakeData){if(this.connected){ return; }
+this.tunnelInit();}}
+cometd.connectionTypes.register("mime-message-block", cometd.mimeReplaceTransport.check, cometd.mimeReplaceTransport);cometd.connectionTypes.register("long-polling", cometd.longPollTransport.check, cometd.longPollTransport);cometd.connectionTypes.register("callback-polling", cometd.callbackPollTransport.check, cometd.callbackPollTransport);cometd.connectionTypes.register("iframe", cometd.iframeTransport.check, cometd.iframeTransport);dojo.io.cometd = cometd;
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/common.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/common.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/common.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/common.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,38 @@
+
+dojo.provide("dojo.io.common");dojo.require("dojo.string");dojo.require("dojo.lang.extras");dojo.io.transports = [];dojo.io.hdlrFuncNames = [ "load", "error", "timeout" ];dojo.io.Request = function( url,  mimetype,  transport,  changeUrl){if((arguments.length == 1)&&(arguments[0].constructor == Object)){this.fromKwArgs(arguments[0]);}else{this.url = url;if(mimetype){ this.mimetype = mimetype; }
+if(transport){ this.transport = transport; }
+if(arguments.length >= 4){ this.changeUrl = changeUrl; }}
+}
+dojo.lang.extend(dojo.io.Request, {url: "",mimetype: "text/plain",method: "GET",content: undefined,transport: undefined,changeUrl: undefined,formNode: undefined,sync: false,bindSuccess: false,useCache: false,preventCache: false,load: function(type, data, transportImplementation, kwArgs){},error: function(type, error, transportImplementation, kwArgs){},timeout: function(type, empty, transportImplementation, kwArgs){},handle: function(type, data, transportImplementation, kwArgs){},timeoutSeconds: 0,abort: function(){ },fromKwArgs: function( kwArgs){if(kwArgs["url"]){ kwArgs.url = kwArgs.url.toString(); }
+if(kwArgs["formNode"]) { kwArgs.formNode = dojo.byId(kwArgs.formNode); }
+if(!kwArgs["method"] && kwArgs["formNode"] && kwArgs["formNode"].method) {kwArgs.method = kwArgs["formNode"].method;}
+if(!kwArgs["handle"] && kwArgs["handler"]){ kwArgs.handle = kwArgs.handler; }
+if(!kwArgs["load"] && kwArgs["loaded"]){ kwArgs.load = kwArgs.loaded; }
+if(!kwArgs["changeUrl"] && kwArgs["changeURL"]) { kwArgs.changeUrl = kwArgs.changeURL; }
+kwArgs.encoding = dojo.lang.firstValued(kwArgs["encoding"], djConfig["bindEncoding"], "");kwArgs.sendTransport = dojo.lang.firstValued(kwArgs["sendTransport"], djConfig["ioSendTransport"], false);var isFunction = dojo.lang.isFunction;for(var x=0; x<dojo.io.hdlrFuncNames.length; x++){var fn = dojo.io.hdlrFuncNames[x];if(kwArgs[fn] && isFunction(kwArgs[fn])){ continue; }
+if(kwArgs["handle"] && isFunction(kwArgs["handle"])){kwArgs[fn] = kwArgs.handle;}}
+dojo.lang.mixin(this, kwArgs);}});dojo.io.Error = function( msg,  type, num){this.message = msg;this.type =  type || "unknown";this.number = num || 0;}
+dojo.io.transports.addTransport = function(name){this.push(name);this[name] = dojo.io[name];}
+dojo.io.bind = function(request){if(!(request instanceof dojo.io.Request)){try{request = new dojo.io.Request(request);}catch(e){ dojo.debug(e); }}
+var tsName = "";if(request["transport"]){tsName = request["transport"];if(!this[tsName]){dojo.io.sendBindError(request, "No dojo.io.bind() transport with name '"
++ request["transport"] + "'.");return request;}
+if(!this[tsName].canHandle(request)){dojo.io.sendBindError(request, "dojo.io.bind() transport with name '"
++ request["transport"] + "' cannot handle this type of request.");return request;}}else{for(var x=0; x<dojo.io.transports.length; x++){var tmp = dojo.io.transports[x];if((this[tmp])&&(this[tmp].canHandle(request))){tsName = tmp;break;}}
+if(tsName == ""){dojo.io.sendBindError(request, "None of the loaded transports for dojo.io.bind()"
++ " can handle the request.");return request;}}
+this[tsName].bind(request);request.bindSuccess = true;return request;}
+dojo.io.sendBindError = function(request, message){if((typeof request.error == "function" || typeof request.handle == "function")
+&& (typeof setTimeout == "function" || typeof setTimeout == "object")){var errorObject = new dojo.io.Error(message);setTimeout(function(){request[(typeof request.error == "function") ? "error" : "handle"]("error", errorObject, null, request);}, 50);}else{dojo.raise(message);}}
+dojo.io.queueBind = function(request){if(!(request instanceof dojo.io.Request)){try{request = new dojo.io.Request(request);}catch(e){ dojo.debug(e); }}
+var oldLoad = request.load;request.load = function(){dojo.io._queueBindInFlight = false;var ret = oldLoad.apply(this, arguments);dojo.io._dispatchNextQueueBind();return ret;}
+var oldErr = request.error;request.error = function(){dojo.io._queueBindInFlight = false;var ret = oldErr.apply(this, arguments);dojo.io._dispatchNextQueueBind();return ret;}
+dojo.io._bindQueue.push(request);dojo.io._dispatchNextQueueBind();return request;}
+dojo.io._dispatchNextQueueBind = function(){if(!dojo.io._queueBindInFlight){dojo.io._queueBindInFlight = true;if(dojo.io._bindQueue.length > 0){dojo.io.bind(dojo.io._bindQueue.shift());}else{dojo.io._queueBindInFlight = false;}}
+}
+dojo.io._bindQueue = [];dojo.io._queueBindInFlight = false;dojo.io.argsFromMap = function(map, encoding, last){var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii;var mapped = [];var control = new Object();for(var name in map){var domap = function(elt){var val = enc(name)+"="+enc(elt);mapped[(last == name) ? "push" : "unshift"](val);}
+if(!control[name]){var value = map[name];if (dojo.lang.isArray(value)){dojo.lang.forEach(value, domap);}else{domap(value);}}
+}
+return mapped.join("&");}
+dojo.io.setIFrameSrc = function( iframe,  src,  replace){try{var r = dojo.render.html;if(!replace){if(r.safari){iframe.location = src;}else{frames[iframe.name].location = src;}}else{var idoc;if(r.ie){idoc = iframe.contentWindow.document;}else if(r.safari){idoc = iframe.document;}else{idoc = iframe.contentWindow;}
+if(!idoc){iframe.location = src;return;}else{idoc.location.replace(src);}}
+}catch(e){dojo.debug(e);dojo.debug("setIFrameSrc: "+e);}}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/cookie.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/cookie.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/cookie.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/cookie.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,24 @@
+
+dojo.provide("dojo.io.cookie");dojo.io.cookie.setCookie = function(name, value,days, path,domain, secure){var expires = -1;if((typeof days == "number")&&(days >= 0)){var d = new Date();d.setTime(d.getTime()+(days*24*60*60*1000));expires = d.toGMTString();}
+value = escape(value);document.cookie = name + "=" + value + ";"
++ (expires != -1 ? " expires=" + expires + ";" : "")
++ (path ? "path=" + path : "")
++ (domain ? "; domain=" + domain : "")
++ (secure ? "; secure" : "");}
+dojo.io.cookie.set = dojo.io.cookie.setCookie;dojo.io.cookie.getCookie = function(name){var idx = document.cookie.lastIndexOf(name+'=');if(idx == -1) { return null; }
+var value = document.cookie.substring(idx+name.length+1);var end = value.indexOf(';');if(end == -1) { end = value.length; }
+value = value.substring(0, end);value = unescape(value);return value;}
+dojo.io.cookie.get = dojo.io.cookie.getCookie;dojo.io.cookie.deleteCookie = function(name){dojo.io.cookie.setCookie(name, "-", 0);}
+dojo.io.cookie.setObjectCookie = function(name, obj,days, path,domain, secure,clearCurrent){if(arguments.length == 5){clearCurrent = domain;domain = null;secure = null;}
+var pairs = [], cookie, value = "";if(!clearCurrent){cookie = dojo.io.cookie.getObjectCookie(name);}
+if(days >= 0){if(!cookie){ cookie = {}; }
+for(var prop in obj){if(obj[prop] == null){delete cookie[prop];}else if((typeof obj[prop] == "string")||(typeof obj[prop] == "number")){cookie[prop] = obj[prop];}}
+prop = null;for(var prop in cookie){pairs.push(escape(prop) + "=" + escape(cookie[prop]));}
+value = pairs.join("&");}
+dojo.io.cookie.setCookie(name, value, days, path, domain, secure);}
+dojo.io.cookie.getObjectCookie = function(name){var values = null, cookie = dojo.io.cookie.getCookie(name);if(cookie){values = {};var pairs = cookie.split("&");for(var i = 0; i < pairs.length; i++){var pair = pairs[i].split("=");var value = pair[1];if( isNaN(value) ){ value = unescape(pair[1]); }
+values[ unescape(pair[0]) ] = value;}}
+return values;}
+dojo.io.cookie.isSupported = function(){if(typeof navigator.cookieEnabled != "boolean"){dojo.io.cookie.setCookie("__TestingYourBrowserForCookieSupport__","CookiesAllowed", 90, null);var cookieVal = dojo.io.cookie.getCookie("__TestingYourBrowserForCookieSupport__");navigator.cookieEnabled = (cookieVal == "CookiesAllowed");if(navigator.cookieEnabled){this.deleteCookie("__TestingYourBrowserForCookieSupport__");}}
+return navigator.cookieEnabled;}
+if(!dojo.io.cookies){ dojo.io.cookies = dojo.io.cookie; }

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/xip_client.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/xip_client.html?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/xip_client.html (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/xip_client.html Mon Feb  5 21:01:25 2007
@@ -0,0 +1,261 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
+	<script type="text/javascript">
+	// <!--
+	/*
+	This file is really focused on just sending one message to the server, and
+	receiving one response. The code does not expect to be re-used for multiple messages.
+	This might be reworked later if performance indicates a need for it.
+	
+	xip fragment identifier/hash values have the form:
+	#id:cmd:realEncodedMessage
+
+	id: some ID that should be unique among messages. No inherent meaning,
+	        just something to make sure the hash value is unique so the message
+	        receiver knows a new message is available.
+	        
+	cmd: command to the receiver. Valid values are:
+	         - init: message used to init the frame. Sent as the first URL when loading
+	                 the page. Contains some config parameters.
+	         - loaded: the remote frame is loaded. Only sent from server to client.
+	         - ok: the message that this page sent was received OK. The next message may
+	               now be sent.
+	         - start: the start message of a block of messages (a complete message may
+	                  need to be segmented into many messages to get around the limitiations
+	                  of the size of an URL that a browser accepts.
+	         - part: indicates this is a part of a message.
+	         - end: the end message of a block of messages. The message can now be acted upon.
+	                If the message is small enough that it doesn't need to be segmented, then
+	                just one hash value message can be sent with "end" as the command.
+	
+	To reassemble a segmented message, the realEncodedMessage parts just have to be concatenated
+	together.
+	*/
+
+	//MSIE has the lowest limit for URLs with fragment identifiers,
+	//at around 4K. Choosing a slightly smaller number for good measure.
+	xipUrlLimit = 4000;
+	xipIdCounter = 1;
+
+	function xipInit(){
+		xipStateId = "";
+		xipIsSending = false;
+		xipServerUrl = null;
+		xipStateId = null;
+		xipRequestData = null;
+		xipCurrentHash = "";
+		xipResponseMessage = "";
+		xipRequestParts = [];
+		xipPartIndex = 0;
+		xipServerWindow = null;
+		xipUseFrameRecursion = false;
+	}
+	xipInit();
+	
+	function send(encodedData){
+		if(xipUseFrameRecursion == "true"){
+			var clientEndPoint = window.open(xipStateId + "_clientEndPoint");
+			clientEndPoint.send(encodedData);
+		}else{
+			if(!xipIsSending){
+				xipIsSending = true;
+	
+				xipRequestData = encodedData || "";
+
+				//Get a handle to the server iframe.
+				xipServerWindow = frames[xipStateId + "_frame"];
+				if (!xipServerWindow){
+					xipServerWindow = document.getElementById(xipStateId + "_frame").contentWindow;
+				}
+	
+				sendRequestStart();
+			}
+		}
+	}
+
+	//Modify the server URL if it is a local path and 
+	//This is done for local/same domain testing.
+	function fixServerUrl(ifpServerUrl){
+		if(ifpServerUrl.indexOf("..") == 0){
+			var parts = ifpServerUrl.split("/");
+			ifpServerUrl = parts[parts.length - 1];
+		}
+		return ifpServerUrl;
+	}
+	
+	
+	function pollHash(){
+		//Can't use location.hash because at least Firefox does a decodeURIComponent on it.
+		var urlParts = window.location.href.split("#");
+		if(urlParts.length == 2){
+			var newHash = urlParts[1];
+			if(newHash != xipCurrentHash){
+				try{
+					messageReceived(newHash);
+				}catch(e){
+					//Make sure to not keep processing the error hash value.
+					xipCurrentHash = newHash;
+					throw e;
+				}
+				xipCurrentHash = newHash;
+			}
+		}
+	}
+
+	function messageReceived(encodedData){
+		var msg = unpackMessage(encodedData);
+
+		switch(msg.command){
+			case "loaded":
+				xipMasterFrame.dojo.io.XhrIframeProxy.clientFrameLoaded(xipStateId);
+				break;
+			case "ok":
+				sendRequestPart();
+				break;
+			case "start":
+				xipResponseMessage = "";
+				xipResponseMessage += msg.message;
+				setServerUrl("ok");
+				break;
+			case "part":
+				xipResponseMessage += msg.message;			
+				setServerUrl("ok");
+				break;
+			case "end":
+				setServerUrl("ok");
+				xipResponseMessage += msg.message;
+				xipMasterFrame.dojo.io.XhrIframeProxy.receive(xipStateId, xipResponseMessage);
+				break;
+		}
+	}
+	
+	function sendRequestStart(){
+		//Break the message into parts, if necessary.
+		xipRequestParts = [];
+		var reqData = xipRequestData;
+		var urlLength = xipServerUrl.length;
+		var partLength = xipUrlLimit - urlLength;
+		var reqIndex = 0;
+
+		while((reqData.length - reqIndex) + urlLength > xipUrlLimit){
+			var part = reqData.substring(reqIndex, reqIndex + partLength);
+			//Safari will do some extra hex escaping unless we keep the original hex
+			//escaping complete.
+			var percentIndex = part.lastIndexOf("%");
+			if(percentIndex == part.length - 1 || percentIndex == part.length - 2){
+				part = part.substring(0, percentIndex);
+			}
+			xipRequestParts.push(part);
+			reqIndex += part.length;
+		}
+		xipRequestParts.push(reqData.substring(reqIndex, reqData.length));
+		
+		xipPartIndex = 0;
+		sendRequestPart();
+		
+	}
+	
+	function sendRequestPart(){
+		if(xipPartIndex < xipRequestParts.length){
+			//Get the message part.
+			var partData = xipRequestParts[xipPartIndex];
+
+			//Get the command.
+			var cmd = "part";
+			if(xipPartIndex + 1 == xipRequestParts.length){
+				cmd = "end";
+			}else if (xipPartIndex == 0){
+				cmd = "start";
+			}
+			
+			setServerUrl(cmd, partData);
+			xipPartIndex++;
+		}
+	}
+	
+	function setServerUrl(cmd, message){
+		var serverUrl = makeServerUrl(cmd, message);
+
+		//Safari won't let us replace across domains.
+		if(navigator.userAgent.indexOf("Safari") == -1){
+			xipServerWindow.location.replace(serverUrl);
+		}else{
+			xipServerWindow.location = serverUrl;
+		}
+	}
+	
+	function makeServerUrl(cmd, message){
+		var serverUrl = xipServerUrl + "#" + (xipIdCounter++) + ":" + cmd;
+		if(message){
+			serverUrl += ":" + message;
+		}
+		return serverUrl;
+	}
+
+	function unpackMessage(encodedMessage){
+		var parts = encodedMessage.split(":");
+		var command = parts[1];
+		encodedMessage = parts[2] || "";
+
+		var config = null;
+		if(command == "init"){
+			var configParts = encodedMessage.split("&");
+			config = {};
+			for(var i = 0; i < configParts.length; i++){
+				var nameValue = configParts[i].split("=");
+				config[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
+			}
+		}
+		return {command: command, message: encodedMessage, config: config};
+	}
+
+	function onClientLoad(){
+		//Decode the init params
+		var config = unpackMessage(window.location.href.split("#")[1]).config;
+
+		xipStateId = config.id;
+
+		//Remove the query param for the IE7 recursive case.
+		xipServerUrl = fixServerUrl(config.server).replace(/(\?|\&)dojo\.fr\=1/, "");
+		xipUseFrameRecursion = config["fr"];
+		
+		if(xipUseFrameRecursion == "endpoint"){
+			xipMasterFrame = parent.parent;
+		}else{
+			xipMasterFrame = parent;
+		}
+		
+		//Start counter to inspect hash value.
+		setInterval(pollHash, 10);
+
+		var clientUrl = window.location.href.split("#")[0];
+		document.getElementById("iframeHolder").innerHTML = '<iframe src="'
+			+ makeServerUrl("init", 'id=' + xipStateId + '&client=' + encodeURIComponent(clientUrl)
+			+ '&fr=' + xipUseFrameRecursion) + '" id="' + xipStateId + '_frame"></iframe>';
+			
+		
+	}
+
+	if(typeof(window.addEventListener) == "undefined"){
+		window.attachEvent("onload", onClientLoad);
+	}else{
+		window.addEventListener('load', onClientLoad, false);
+	}
+	
+	// -->
+	</script>
+</head>
+<body>
+	<h4>The Dojo Toolkit -- xip_client.html</h4>
+
+	<p>This file is used for Dojo's XMLHttpRequest Iframe Proxy. This is the "client" file used
+	internally by dojo.io.XhrIframeProxy.</p>
+	
+	<span id="iframeHolder"></span>
+</body>
+</html>

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/xip_server.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/xip_server.html?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/xip_server.html (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/io/xip_server.html Mon Feb  5 21:01:25 2007
@@ -0,0 +1,378 @@
+<!--
+	/*
+		Copyright (c) 2004-2006, The Dojo Foundation
+		All Rights Reserved.
+	
+		Licensed under the Academic Free License version 2.1 or above OR the
+		modified BSD license. For more information on Dojo licensing, see:
+	
+			http://dojotoolkit.org/community/licensing.shtml
+	*/
+	Pieces taken from Dojo source to make this file stand-alone
+-->
+<html>
+<head>
+	<title></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
+	<script type="text/javascript" src="isAllowed.js"></script>
+	<!--
+	BY DEFAULT THIS FILE DOES NOT WORK SO THAT YOU DON'T ACCIDENTALLY EXPOSE
+	ALL OF YOUR XHR-ENABLED SERVICES ON YOUR SITE. 
+	
+	In order for this file to work, you should define a function with the following signature:
+	
+	function isAllowedRequest(request){
+		return false;	
+	}
+	
+	Return true out of the function if you want to allow the cross-domain request.
+	
+	DON'T DEFINE THIS FUNCTION IN THIS FILE! Define it in a separate file called isAllowed.js
+	and include it in this page with a script tag that has a src attribute pointing to the file.
+	See the very first script tag in this file for an example. You do not have to place the
+	script file in the same directory as this file, just update the path above if you move it
+	somewhere else.
+	
+	Customize the isAllowedRequest function to restrict what types of requests are allowed
+	for this server. The request object has the following properties:
+	- requestHeaders: an object with the request headers that are to be added to
+	                  the XHR request.
+	- method: the HTTP method (GET, POST, etc...)
+	- uri: The URI for the request.
+	- data: The URL-encoded data for the request. For a GET request, this would
+	        be the querystring parameters. For a POST request, it wll be the
+	        body data.
+	        
+	See xip_client.html for more info on the xip fragment identifier protocol.	
+	-->
+	<script type="text/javascript">
+	// <!--
+	djConfig = {
+		parseWidgets: false,
+		baseScriptUri: "./"
+	}
+	// -->
+	</script>
+	<script type="text/javascript">
+	// <!--
+		//Core XHR handling taken from Dojo IO code.
+		dojo = {};
+		dojo.hostenv = {};
+		// These are in order of decreasing likelihood; this will change in time.
+		dojo.hostenv._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
+		
+		dojo.hostenv.getXmlhttpObject = function(){
+				var http = null;
+			var last_e = null;
+			try{ http = new XMLHttpRequest(); }catch(e){}
+				if(!http){
+				for(var i=0; i<3; ++i){
+					var progid = dojo.hostenv._XMLHTTP_PROGIDS[i];
+					try{
+						http = new ActiveXObject(progid);
+					}catch(e){
+						last_e = e;
+					}
+		
+					if(http){
+						dojo.hostenv._XMLHTTP_PROGIDS = [progid];  // so faster next time
+						break;
+					}
+				}
+		
+				/*if(http && !http.toString) {
+					http.toString = function() { "[object XMLHttpRequest]"; }
+				}*/
+			}
+		
+			if(!http){
+				throw "xip_server.html: XMLHTTP not available: " + last_e;
+			}
+		
+			return http;
+		}
+
+		dojo.setHeaders = function(http, headers){
+			if(headers) {
+				for(var header in headers) {
+					var headerValue = headers[header];
+					http.setRequestHeader(header, headerValue);
+				}
+			}
+		}
+
+	//MSIE has the lowest limit for URLs with fragment identifiers,
+	//at around 4K. Choosing a slightly smaller number for good measure.
+	xipUrlLimit = 4000;
+	xipIdCounter = 1;
+
+	function xipServerInit(){
+		xipStateId = "";
+		xipCurrentHash = "";
+		xipRequestMessage = "";
+		xipResponseParts = [];
+		xipPartIndex = 0;
+	}
+
+	function pollHash(){
+		//Can't use location.hash because at least Firefox does a decodeURIComponent on it.
+		var urlParts = window.location.href.split("#");
+		if(urlParts.length == 2){
+			var newHash = urlParts[1];
+			if(newHash != xipCurrentHash){
+				try{
+					messageReceived(newHash);
+				}catch(e){
+					//Make sure to not keep processing the error hash value.
+					xipCurrentHash = newHash;
+					throw e;
+				}
+				xipCurrentHash = newHash;
+			}
+		}
+	}
+
+	function messageReceived(encodedData){
+		var msg = unpackMessage(encodedData);
+		
+		switch(msg.command){
+			case "ok":
+				sendResponsePart();
+				break;
+			case "start":
+				xipRequestMessage = "";
+				xipRequestMessage += msg.message;
+				setClientUrl("ok");
+				break;
+			case "part":
+				xipRequestMessage += msg.message;			
+				setClientUrl("ok");
+				break;
+			case "end":
+				setClientUrl("ok");
+				xipRequestMessage += msg.message;
+				sendXhr();
+				break;
+		}
+	}
+
+	function sendResponse(encodedData){
+		//Break the message into parts, if necessary.
+		xipResponseParts = [];
+		var resData = encodedData;
+		var urlLength = xipClientUrl.length;
+		var partLength = xipUrlLimit - urlLength;
+		var resIndex = 0;
+
+		while((resData.length - resIndex) + urlLength > xipUrlLimit){
+			var part = resData.substring(resIndex, resIndex + partLength);
+			//Safari will do some extra hex escaping unless we keep the original hex
+			//escaping complete.
+			var percentIndex = part.lastIndexOf("%");
+			if(percentIndex == part.length - 1 || percentIndex == part.length - 2){
+				part = part.substring(0, percentIndex);
+			}
+			xipResponseParts.push(part);
+			resIndex += part.length;
+		}
+		xipResponseParts.push(resData.substring(resIndex, resData.length));
+		
+		xipPartIndex = 0;
+		sendResponsePart();
+	}
+	
+	function sendResponsePart(){
+		if(xipPartIndex < xipResponseParts.length){
+			//Get the message part.
+			var partData = xipResponseParts[xipPartIndex];
+			
+			//Get the command.
+			var cmd = "part";
+			if(xipPartIndex + 1 == xipResponseParts.length){
+				cmd = "end";
+			}else if (xipPartIndex == 0){
+				cmd = "start";
+			}
+
+			setClientUrl(cmd, partData);
+			xipPartIndex++;
+		}else{
+			xipServerInit();
+		}
+	}
+
+	function setClientUrl(cmd, message){
+		var clientUrl = makeClientUrl(cmd, message);
+		//Safari won't let us replace across domains.
+		if(navigator.userAgent.indexOf("Safari") == -1){
+			parent.location.replace(clientUrl);
+		}else{
+			parent.location = clientUrl;
+		}
+	}
+
+	function makeClientUrl(cmd, message){
+		var clientUrl = xipClientUrl + "#" + (xipIdCounter++) + ":" + cmd;
+		if(message){
+			clientUrl += ":" + message;
+		}
+		return clientUrl
+	}
+
+	function xhrDone(xhr){
+		/* Need to pull off and return the following data:
+			- responseHeaders
+			- status
+			- statusText
+			- responseText
+		*/
+		var response = {};
+	
+		if(typeof(xhr.getAllResponseHeaders) != "undefined"){
+			var allHeaders = xhr.getAllResponseHeaders();
+			if(allHeaders){
+				response.responseHeaders = allHeaders;
+			}
+		}
+		
+		if(xhr.status == 0 || xhr.status){
+			response.status = xhr.status;
+		}
+		
+		if(xhr.statusText){
+			response.statusText = xhr.statusText;
+		}
+		
+		if(xhr.responseText){
+			response.responseText = xhr.responseText;
+		}
+	
+		//Build a string of the response object.
+		var result = "";
+		var isFirst = true;
+		for (var param in response){
+			if(isFirst){
+				isFirst = false;
+			}else{
+				result += "&";
+			}
+			result += param + "=" + encodeURIComponent(response[param]);
+		}
+		sendResponse(result);
+	}
+
+	function sendXhr(){
+		var request = {};
+		var nvPairs = xipRequestMessage.split("&");
+		var i = 0;
+		var nameValue = null;
+		for(i = 0; i < nvPairs.length; i++){
+			if(nvPairs[i]){
+				var nameValue = nvPairs[i].split("=");
+				request[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
+			}
+		}
+
+		//Split up the request headers, if any.
+		var headers = {};
+		if(request.requestHeaders){
+			nvPairs = request.requestHeaders.split("\r\n");
+			for(i = 0; i < nvPairs.length; i++){
+				if(nvPairs[i]){
+					nameValue = nvPairs[i].split(": ");
+					headers[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
+				}
+			}
+
+			request.requestHeaders = headers;
+		}
+		
+		if(isAllowedRequest(request)){
+		
+			//The request is allowed, so set up the XHR object.
+			var xhr = dojo.hostenv.getXmlhttpObject();
+			
+			//Start timer to look for readyState.
+			var xhrIntervalId = setInterval(function(){
+			
+				if(xhr.readyState == 4){
+					clearInterval(xhrIntervalId);
+					xhrDone(xhr);
+				}
+			}, 10);
+
+			//Actually start up the XHR request.
+			xhr.open(request.method, request.uri, true);
+			dojo.setHeaders(xhr, request.requestHeaders);
+			
+			var content = "";
+			if(request.data){
+				content = request.data;
+			}
+
+			try{
+				xhr.send(content);
+			}catch(e){
+				if(typeof xhr.abort == "function"){
+					xhr.abort();
+					xhrDone({status: 404, statusText: "xip_server.html error: " + e});
+				}
+			}
+		}
+	}
+
+	function unpackMessage(encodedMessage){
+		var parts = encodedMessage.split(":");
+		var command = parts[1];
+		encodedMessage = parts[2] || "";
+
+		var config = null;
+		if(command == "init"){
+			var configParts = encodedMessage.split("&");
+			config = {};
+			for(var i = 0; i < configParts.length; i++){
+				var nameValue = configParts[i].split("=");
+				config[decodeURIComponent(nameValue[0])] = decodeURIComponent(nameValue[1]);
+			}
+		}
+		return {command: command, message: encodedMessage, config: config};
+	}
+
+	function onServerLoad(){
+		xipServerInit();
+
+		//Decode the init params
+		var config = unpackMessage(window.location.href.split("#")[1]).config;
+
+		xipStateId = config.id;
+		xipClientUrl = config.client;
+		xipUseFrameRecursion = config["fr"];
+
+		setInterval(pollHash, 10);
+		
+		if(xipUseFrameRecursion == "true"){
+			var serverUrl = window.location.href.split("#")[0];
+			document.getElementById("iframeHolder").innerHTML = '<iframe src="'
+				+ makeClientUrl("init", 'id=' + xipStateId + '&server=' + encodeURIComponent(serverUrl)
+				+ '&fr=endpoint') + '" name="' + xipStateId + '_clientEndPoint"></iframe>';
+		}else{
+			setClientUrl("loaded");
+		}
+	}
+
+	if(typeof(window.addEventListener) == "undefined"){
+		window.attachEvent("onload", onServerLoad);
+	}else{
+		window.addEventListener('load', onServerLoad, false);
+	}
+	// -->
+	</script>
+</head>
+<body>
+	<h4>The Dojo Toolkit -- xip_server.html</h4>
+
+	<p>This file is used for Dojo's XMLHttpRequest Iframe Proxy. This is the the file
+	that should go on the server that will actually be doing the XHR request.</p>
+	<div id="iframeHolder"></div>
+</body>
+</html>

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/json.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/json.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/json.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/json.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,14 @@
+
+dojo.provide("dojo.json");dojo.require("dojo.lang.func");dojo.require("dojo.string.extras");dojo.require("dojo.AdapterRegistry");dojo.json = {jsonRegistry: new dojo.AdapterRegistry(),register: function(name,check,wrap,override){dojo.json.jsonRegistry.register(name, check, wrap, override);},evalJson: function( json){try {return eval("(" + json + ")");}catch(e){dojo.debug(e);return json;}},serialize: function( o){var objtype = typeof(o);if(objtype == "undefined"){return "undefined";}else if((objtype == "number")||(objtype == "boolean")){return o + "";}else if(o === null){return "null";}
+if (objtype == "string") { return dojo.string.escapeString(o); }
+var me = arguments.callee;var newObj;if(typeof(o.__json__) == "function"){newObj = o.__json__();if(o !== newObj){return me(newObj);}}
+if(typeof(o.json) == "function"){newObj = o.json();if (o !== newObj) {return me(newObj);}}
+if(objtype != "function" && typeof(o.length) == "number"){var res = [];for(var i = 0; i < o.length; i++){var val = me(o[i]);if(typeof(val) != "string"){val = "undefined";}
+res.push(val);}
+return "[" + res.join(",") + "]";}
+try {window.o = o;newObj = dojo.json.jsonRegistry.match(o);return me(newObj);}catch(e){}
+if(objtype == "function"){return null;}
+res = [];for (var k in o){var useKey;if (typeof(k) == "number"){useKey = '"' + k + '"';}else if (typeof(k) == "string"){useKey = dojo.string.escapeString(k);}else{continue;}
+val = me(o[k]);if(typeof(val) != "string"){continue;}
+res.push(useKey + ":" + val);}
+return "{" + res.join(",") + "}";}};
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/__package__.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/__package__.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,5 @@
+
+dojo.kwCompoundRequire({common: [
+"dojo.lang.common","dojo.lang.assert","dojo.lang.array","dojo.lang.type","dojo.lang.func","dojo.lang.extras","dojo.lang.repr","dojo.lang.declare"
+]
+});dojo.provide("dojo.lang.*");
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/array.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/array.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/array.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/array.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,21 @@
+
+dojo.provide("dojo.lang.array");dojo.require("dojo.lang.common");dojo.lang.mixin(dojo.lang, {has: function(obj, name){try{return typeof obj[name] != "undefined";}catch(e){ return false; }},isEmpty: function(obj){if(dojo.lang.isArrayLike(obj) || dojo.lang.isString(obj)){return obj.length === 0;}else if(dojo.lang.isObject(obj)){var tmp = {};for(var x in obj){if(obj[x] && (!tmp[x])){return false;}}
+return true;}},map: function(arr, obj, unary_func){var isString = dojo.lang.isString(arr);if(isString){arr = arr.split("");}
+if(dojo.lang.isFunction(obj)&&(!unary_func)){unary_func = obj;obj = dj_global;}else if(dojo.lang.isFunction(obj) && unary_func){var tmpObj = obj;obj = unary_func;unary_func = tmpObj;}
+if(Array.map){var outArr = Array.map(arr, unary_func, obj);}else{var outArr = [];for(var i=0;i<arr.length;++i){outArr.push(unary_func.call(obj, arr[i]));}}
+if(isString){return outArr.join("");}else{return outArr;}},reduce: function(arr, initialValue, obj, binary_func){var reducedValue = initialValue;if(arguments.length == 1){dojo.debug("dojo.lang.reduce called with too few arguments!");return false;}else if(arguments.length == 2){binary_func = initialValue;reducedValue = arr.shift();}else if(arguments.lenght == 3){if(dojo.lang.isFunction(obj)){binary_func = obj;obj = null;}}else{if(dojo.lang.isFunction(obj)){var tmp = binary_func;binary_func = obj;obj = tmp;}}
+var ob = obj ? obj : dj_global;dojo.lang.map(arr,function(val){reducedValue = binary_func.call(ob, reducedValue, val);}
+);return reducedValue;},forEach: function(anArray, callback, thisObject){if(dojo.lang.isString(anArray)){anArray = anArray.split("");}
+if(Array.forEach){Array.forEach(anArray, callback, thisObject);}else{if(!thisObject){thisObject=dj_global;}
+for(var i=0,l=anArray.length; i<l; i++){callback.call(thisObject, anArray[i], i, anArray);}}
+},_everyOrSome: function(every, arr, callback, thisObject){if(dojo.lang.isString(arr)){arr = arr.split("");}
+if(Array.every){return Array[ every ? "every" : "some" ](arr, callback, thisObject);}else{if(!thisObject){thisObject = dj_global;}
+for(var i=0,l=arr.length; i<l; i++){var result = callback.call(thisObject, arr[i], i, arr);if(every && !result){return false;}else if((!every)&&(result)){return true;}}
+return Boolean(every);}},every: function(arr, callback, thisObject){return this._everyOrSome(true, arr, callback, thisObject);},some: function(arr, callback, thisObject){return this._everyOrSome(false, arr, callback, thisObject);},filter: function(arr, callback, thisObject){var isString = dojo.lang.isString(arr);if(isString){ arr = arr.split(""); }
+var outArr;if(Array.filter){outArr = Array.filter(arr, callback, thisObject);}else{if(!thisObject){if(arguments.length >= 3){ dojo.raise("thisObject doesn't exist!"); }
+thisObject = dj_global;}
+outArr = [];for(var i = 0; i < arr.length; i++){if(callback.call(thisObject, arr[i], i, arr)){outArr.push(arr[i]);}}
+}
+if(isString){return outArr.join("");} else {return outArr;}},unnest: function(){var out = [];for(var i = 0; i < arguments.length; i++){if(dojo.lang.isArrayLike(arguments[i])){var add = dojo.lang.unnest.apply(this, arguments[i]);out = out.concat(add);}else{out.push(arguments[i]);}}
+return out;},toArray: function(arrayLike, startOffset){var array = [];for(var i = startOffset||0; i < arrayLike.length; i++){array.push(arrayLike[i]);}
+return array;}});
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/assert.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/assert.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/assert.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/assert.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,11 @@
+
+dojo.provide("dojo.lang.assert");dojo.require("dojo.lang.common");dojo.require("dojo.lang.array");dojo.require("dojo.lang.type");dojo.lang.assert = function( booleanValue,  message){if(!booleanValue){var errorMessage = "An assert statement failed.\n" +
+"The method dojo.lang.assert() was called with a 'false' value.\n";if(message){errorMessage += "Here's the assert message:\n" + message + "\n";}
+throw new Error(errorMessage);}}
+dojo.lang.assertType = function( value,  type,  keywordParameters){if(!dojo.lang.isOfType(value, type, keywordParameters)){if(!dojo.lang.assertType._errorMessage){dojo.lang.assertType._errorMessage = "Type mismatch: dojo.lang.assertType() failed.";}
+dojo.lang.assert(false, dojo.lang.assertType._errorMessage);}}
+dojo.lang.assertValidKeywords = function( object,  expectedProperties,  message){var key;if(!message){if(!dojo.lang.assertValidKeywords._errorMessage){dojo.lang.assertValidKeywords._errorMessage = "In dojo.lang.assertValidKeywords(), found invalid keyword:";}
+message = dojo.lang.assertValidKeywords._errorMessage;}
+if(dojo.lang.isArray(expectedProperties)){for(key in object){if(!dojo.lang.inArray(expectedProperties, key)){dojo.lang.assert(false, message + " " + key);}}
+}else{for(key in object){if(!(key in expectedProperties)){dojo.lang.assert(false, message + " " + key);}}
+}}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/common.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/common.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/common.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/common.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,42 @@
+
+dojo.provide("dojo.lang.common");dojo.lang.inherits = function(subclass, superclass){if(!dojo.lang.isFunction(superclass)){dojo.raise("dojo.inherits: superclass argument ["+superclass+"] must be a function (subclass: ["+subclass+"']");}
+subclass.prototype = new superclass();subclass.prototype.constructor = subclass;subclass.superclass = superclass.prototype;subclass['super'] = superclass.prototype;}
+dojo.lang._mixin = function( obj,  props){var tobj = {};for(var x in props){if((typeof tobj[x] == "undefined") || (tobj[x] != props[x])){obj[x] = props[x];}}
+if(dojo.render.html.ie
+&& (typeof(props["toString"]) == "function")
+&& (props["toString"] != obj["toString"])
+&& (props["toString"] != tobj["toString"]))
+{obj.toString = props.toString;}
+return obj;}
+dojo.lang.mixin = function(obj, props){for(var i=1, l=arguments.length; i<l; i++){dojo.lang._mixin(obj, arguments[i]);}
+return obj;}
+dojo.lang.extend = function( constructor,  props){for(var i=1, l=arguments.length; i<l; i++){dojo.lang._mixin(constructor.prototype, arguments[i]);}
+return constructor;}
+dojo.lang._delegate = function(obj, props){function TMP(){};TMP.prototype = obj;var tmp = new TMP();if(props){dojo.lang.mixin(tmp, props);}
+return tmp;}
+dojo.inherits = dojo.lang.inherits;dojo.mixin = dojo.lang.mixin;dojo.extend = dojo.lang.extend;dojo.lang.find = function(array,value,identity,findLast){var isString = dojo.lang.isString(array);if(isString) { array = array.split(""); }
+if(findLast) {var step = -1;var i = array.length - 1;var end = -1;} else {var step = 1;var i = 0;var end = array.length;}
+if(identity){while(i != end) {if(array[i] === value){ return i; }
+i += step;}}else{while(i != end) {if(array[i] == value){ return i; }
+i += step;}}
+return -1;}
+dojo.lang.indexOf = dojo.lang.find;dojo.lang.findLast = function(array, value, identity){return dojo.lang.find(array, value, identity, true);}
+dojo.lang.lastIndexOf = dojo.lang.findLast;dojo.lang.inArray = function(array , value ){return dojo.lang.find(array, value) > -1;}
+dojo.lang.isObject = function( it){if(typeof it == "undefined"){ return false; }
+return (typeof it == "object" || it === null || dojo.lang.isArray(it) || dojo.lang.isFunction(it));}
+dojo.lang.isArray = function( it){return (it && it instanceof Array || typeof it == "array");}
+dojo.lang.isArrayLike = function( it){if((!it)||(dojo.lang.isUndefined(it))){ return false; }
+if(dojo.lang.isString(it)){ return false; }
+if(dojo.lang.isFunction(it)){ return false; }
+if(dojo.lang.isArray(it)){ return true; }
+if((it.tagName)&&(it.tagName.toLowerCase()=='form')){ return false; }
+if(dojo.lang.isNumber(it.length) && isFinite(it.length)){ return true; }
+return false;}
+dojo.lang.isFunction = function( it){return (it instanceof Function || typeof it == "function");};(function(){if((dojo.render.html.capable)&&(dojo.render.html["safari"])){dojo.lang.isFunction = function( it){if((typeof(it) == "function") && (it == "[object NodeList]")) { return false; }
+return (it instanceof Function || typeof it == "function");}}
+})();dojo.lang.isString = function( it){return (typeof it == "string" || it instanceof String);}
+dojo.lang.isAlien = function( it){if(!it){ return false; }
+return !dojo.lang.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it));}
+dojo.lang.isBoolean = function( it){return (it instanceof Boolean || typeof it == "boolean");}
+dojo.lang.isNumber = function( it){return (it instanceof Number || typeof it == "number");}
+dojo.lang.isUndefined = function( it){return ((typeof(it) == "undefined")&&(it == undefined));}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/declare.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/declare.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/declare.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/declare.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,20 @@
+
+dojo.provide("dojo.lang.declare");dojo.require("dojo.lang.common");dojo.require("dojo.lang.extras");dojo.lang.declare = function( className,superclass,init,props){if((dojo.lang.isFunction(props))||((!props)&&(!dojo.lang.isFunction(init)))){if(dojo.lang.isFunction(props)){dojo.deprecated("dojo.lang.declare("+className+"...):", "use class, superclass, initializer, properties argument order", "0.6");}
+var temp = props;props = init;init = temp;}
+if(props && props.initializer){dojo.deprecated("dojo.lang.declare("+className+"...):", "specify initializer as third argument, not as an element in properties", "0.6");}
+var mixins = [ ];if(dojo.lang.isArray(superclass)){mixins = superclass;superclass = mixins.shift();}
+if(!init){init = dojo.getObject(className, false);if((init)&&(!dojo.lang.isFunction(init))){ init = null };}
+var ctor = dojo.lang.declare._makeConstructor();var scp = (superclass ? superclass.prototype : null);if(scp){scp.prototyping = true;ctor.prototype = new superclass();scp.prototyping = false;}
+ctor.superclass = scp;ctor.mixins = mixins;for(var i=0,l=mixins.length; i<l; i++){dojo.lang.extend(ctor, mixins[i].prototype);}
+ctor.prototype.initializer = null;ctor.prototype.declaredClass = className;if(dojo.lang.isArray(props)){dojo.lang.extend.apply(dojo.lang, [ctor].concat(props));}else{dojo.lang.extend(ctor, (props)||{});}
+dojo.lang.extend(ctor, dojo.lang.declare._common);ctor.prototype.constructor = ctor;ctor.prototype.initializer = (ctor.prototype.initializer)||(init)||(function(){});var created = dojo.getObject(className, true, null, true);created.obj[created.prop] = ctor;return ctor;}
+dojo.lang.declare._makeConstructor = function(){return function(){var self = this._getPropContext();var s = self.constructor.superclass;if((s)&&(s.constructor)){if(s.constructor==arguments.callee){this._inherited("constructor", arguments);}else{this._contextMethod(s, "constructor", arguments);}}
+var ms = (self.constructor.mixins)||([]);for(var i=0, m; (m=ms[i]); i++) {(((m.prototype)&&(m.prototype.initializer))||(m)).apply(this, arguments);}
+if((!this.prototyping)&&(self.initializer)){self.initializer.apply(this, arguments);}}
+}
+dojo.lang.declare._common = {_getPropContext: function(){ return (this.___proto||this); },_contextMethod: function(ptype, method, args){var result, stack = this.___proto;this.___proto = ptype;try { result = ptype[method].apply(this,(args||[])); }
+catch(e) { throw e; }
+finally { this.___proto = stack; }
+return result;},_inherited: function(prop, args){var p = this._getPropContext();do{if((!p.constructor)||(!p.constructor.superclass)){ return; }
+p = p.constructor.superclass;}while(!(prop in p));return (dojo.lang.isFunction(p[prop]) ? this._contextMethod(p, prop, args) : p[prop]);}}
+dojo.declare = dojo.lang.declare;
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/extras.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/extras.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/extras.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/extras.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,19 @@
+
+dojo.provide("dojo.lang.extras");dojo.require("dojo.lang.common");dojo.lang.setTimeout = function(func, delay ){var context = window, argsStart = 2;if(!dojo.lang.isFunction(func)){context = func;func = delay;delay = arguments[2];argsStart++;}
+if(dojo.lang.isString(func)){func = context[func];}
+var args = [];for (var i = argsStart; i < arguments.length; i++){args.push(arguments[i]);}
+return dojo.global().setTimeout(function(){ func.apply(context, args); }, delay);}
+dojo.lang.clearTimeout = function(timer){dojo.global().clearTimeout(timer);}
+dojo.lang.getNameInObj = function(ns, item){if(!ns){ ns = dj_global; }
+for(var x in ns){if(ns[x] === item){return new String(x);}}
+return null;}
+dojo.lang.shallowCopy = function(obj, deep){var i, ret;if(obj === null){  return null; }
+if(dojo.lang.isObject(obj)){ret = new obj.constructor();for(i in obj){if(dojo.lang.isUndefined(ret[i])){ret[i] = deep ? dojo.lang.shallowCopy(obj[i], deep) : obj[i];}}
+}else if(dojo.lang.isArray(obj)){ret = [];for(i=0; i<obj.length; i++){ret[i] = deep ? dojo.lang.shallowCopy(obj[i], deep) : obj[i];}}else{ret = obj;}
+return ret;}
+dojo.lang.firstValued = function(){for(var i = 0; i < arguments.length; i++){if(typeof arguments[i] != "undefined"){return arguments[i];}}
+return undefined;}
+dojo.lang.getObjPathValue = function(objpath, context, create){dojo.deprecated("dojo.lang.getObjPathValue", "use dojo.getObject", "0.6");with(dojo.parseObjPath(objpath, context, create)){return dojo.evalProp(prop, obj, create);}}
+dojo.lang.setObjPathValue = function(objpath, value, context, create){dojo.deprecated("dojo.lang.setObjPathValue", "use dojo.parseObjPath and the '=' operator", "0.6");if(arguments.length < 4){create = true;}
+with(dojo.parseObjPath(objpath, context, create)){if(obj && (create || (prop in obj))){obj[prop] = value;}}
+}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/func.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/func.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/func.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/func.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,27 @@
+
+dojo.provide("dojo.lang.func");dojo.require("dojo.lang.common");dojo.lang.hitch = function(thisObject, method ){var args = [];for(var x=2; x<arguments.length; x++){args.push(arguments[x]);}
+var fcn = (dojo.lang.isString(method) ? thisObject[method] : method) || function(){};return function(){var ta = args.concat([]);for(var x=0; x<arguments.length; x++){ta.push(arguments[x]);}
+return fcn.apply(thisObject, ta);};}
+dojo.lang.anonCtr = 0;dojo.lang.anon = {};dojo.lang.nameAnonFunc = function(anonFuncPtr, thisObj, searchForNames){var isIE = (dojo.render.html.capable && dojo.render.html["ie"]);var jpn = "$joinpoint";var nso = (thisObj|| dojo.lang.anon);if(isIE){var cn = anonFuncPtr["__dojoNameCache"];if(cn && nso[cn] === anonFuncPtr){return anonFuncPtr["__dojoNameCache"];}else if(cn){var tindex = cn.indexOf(jpn);if(tindex != -1){return cn.substring(0, tindex);}}
+}
+if( (searchForNames) ||
+((dj_global["djConfig"])&&(djConfig["slowAnonFuncLookups"] == true)) ){for(var x in nso){try{if(nso[x] === anonFuncPtr){if(isIE){anonFuncPtr["__dojoNameCache"] = x;var tindex = x.indexOf(jpn);if(tindex != -1){x = x.substring(0, tindex);}}
+return x;}}catch(e){}}
+}
+var ret = "__"+dojo.lang.anonCtr++;while(typeof nso[ret] != "undefined"){ret = "__"+dojo.lang.anonCtr++;}
+nso[ret] = anonFuncPtr;return ret;}
+dojo.lang.forward = function(funcName){return function(){return this[funcName].apply(this, arguments);};}
+dojo.lang.curry = function(thisObj, func ){var outerArgs = [];thisObj = thisObj||dj_global;if(dojo.lang.isString(func)){func = thisObj[func];}
+for(var x=2; x<arguments.length; x++){outerArgs.push(arguments[x]);}
+var ecount = (func["__preJoinArity"]||func.length) - outerArgs.length;function gather(nextArgs, innerArgs, expected){var texpected = expected;var totalArgs = innerArgs.slice(0);for(var x=0; x<nextArgs.length; x++){totalArgs.push(nextArgs[x]);}
+expected = expected-nextArgs.length;if(expected<=0){var res = func.apply(thisObj, totalArgs);expected = texpected;return res;}else{return function(){return gather(arguments,totalArgs,expected);};}}
+return gather([], outerArgs, ecount);}
+dojo.lang.curryArguments = function(thisObj, func, args, offset){var targs = [];var x = offset||0;for(x=offset; x<args.length; x++){targs.push(args[x]);}
+return dojo.lang.curry.apply(dojo.lang, [thisObj, func].concat(targs));}
+dojo.lang.tryThese = function(){for(var x=0; x<arguments.length; x++){try{if(typeof arguments[x] == "function"){var ret = (arguments[x]());if(ret){return ret;}}
+}catch(e){dojo.debug(e);}}
+}
+dojo.lang.delayThese = function(farr, cb, delay, onend){if(!farr.length){if(typeof onend == "function"){onend();}
+return;}
+if((typeof delay == "undefined")&&(typeof cb == "number")){delay = cb;cb = function(){};}else if(!cb){cb = function(){};if(!delay){ delay = 0; }}
+setTimeout(function(){(farr.shift())();cb();dojo.lang.delayThese(farr, cb, delay, onend);}, delay);}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/repr.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/repr.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/repr.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/repr.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,10 @@
+
+dojo.provide("dojo.lang.repr");dojo.require("dojo.lang.common");dojo.require("dojo.AdapterRegistry");dojo.require("dojo.string.extras");dojo.lang.reprRegistry = new dojo.AdapterRegistry();dojo.lang.registerRepr = function(name, check, wrap, override){dojo.lang.reprRegistry.register(name, check, wrap, override);};dojo.lang.repr = function(obj){if(typeof(obj) == "undefined"){return "undefined";}else if(obj === null){return "null";}
+try{if(typeof(obj["__repr__"]) == 'function'){return obj["__repr__"]();}else if((typeof(obj["repr"]) == 'function')&&(obj.repr != arguments.callee)){return obj["repr"]();}
+return dojo.lang.reprRegistry.match(obj);}catch(e){if(typeof(obj.NAME) == 'string' && (
+obj.toString == Function.prototype.toString ||
+obj.toString == Object.prototype.toString
+)){return obj.NAME;}}
+if(typeof(obj) == "function"){obj = (obj + "").replace(/^\s+/, "");var idx = obj.indexOf("{");if(idx != -1){obj = obj.substr(0, idx) + "{...}";}}
+return obj + "";}
+dojo.lang.reprArrayLike = function(arr){try{var na = dojo.lang.map(arr, dojo.lang.repr);return "[" + na.join(", ") + "]";}catch(e){ }};(function(){var m = dojo.lang;m.registerRepr("arrayLike", m.isArrayLike, m.reprArrayLike);m.registerRepr("string", m.isString, m.reprString);m.registerRepr("numbers", m.isNumber, m.reprNumber);m.registerRepr("boolean", m.isBoolean, m.reprNumber);})();
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/Streamer.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/Streamer.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/Streamer.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/Streamer.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,8 @@
+
+dojo.provide("dojo.lang.timing.Streamer");dojo.require("dojo.lang.timing.Timer");dojo.lang.timing.Streamer = function(
+input,output,interval,minimum,initialData
+){var self = this;var queue = [];this.interval = interval || 1000;this.minimumSize = minimum || 10;this.inputFunction = input || function(q){ };this.outputFunction = output || function(point){ };var timer = new dojo.lang.timing.Timer(this.interval);var tick = function(){self.onTick(self);if(queue.length < self.minimumSize){self.inputFunction(queue);}
+var obj = queue.shift();while(typeof(obj) == "undefined" && queue.length > 0){obj = queue.shift();}
+if(typeof(obj) == "undefined"){self.stop();return;}
+self.outputFunction(obj);};this.setInterval = function(ms){this.interval = ms;timer.setInterval(ms);};this.onTick = function(obj){ };this.start = function(){if(typeof(this.inputFunction) == "function" && typeof(this.outputFunction) == "function"){timer.start();return;}
+dojo.raise("You cannot start a Streamer without an input and an output function.");};this.onStart = function(){ };this.stop = function(){timer.stop();};this.onStop = function(){ };timer.onTick = this.tick;timer.onStart = this.onStart;timer.onStop = this.onStop;if(initialData){queue.concat(initialData);}};
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/Timer.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/Timer.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/Timer.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/Timer.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,5 @@
+
+dojo.provide("dojo.lang.timing.Timer");dojo.require("dojo.lang.func");dojo.lang.timing.Timer = function( interval){this.timer = null;this.isRunning = false;this.interval = interval;this.onStart = null;this.onStop = null;};dojo.extend(dojo.lang.timing.Timer, {onTick : function(){},setInterval : function(interval){if (this.isRunning){dj_global.clearInterval(this.timer);}
+this.interval = interval;if (this.isRunning){this.timer = dj_global.setInterval(dojo.lang.hitch(this, "onTick"), this.interval);}},start : function(){if (typeof this.onStart == "function"){this.onStart();}
+this.isRunning = true;this.timer = dj_global.setInterval(dojo.lang.hitch(this, "onTick"), this.interval);},stop : function(){if (typeof this.onStop == "function"){this.onStop();}
+this.isRunning = false;dj_global.clearInterval(this.timer);}});
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/__package__.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/timing/__package__.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,2 @@
+
+dojo.provide("dojo.lang.timing.*");
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/type.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/type.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/type.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lang/type.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,60 @@
+
+dojo.provide("dojo.lang.type");dojo.require("dojo.lang.common");dojo.lang.whatAmI = {};dojo.lang.whatAmI.custom = {};dojo.lang.getType = function( value){try{if(dojo.lang.isArray(value)){return "array";}
+if(dojo.lang.isFunction(value)){return "function";}
+if(dojo.lang.isString(value)){return "string";}
+if(dojo.lang.isNumber(value)){return "number";}
+if(dojo.lang.isBoolean(value)){return "boolean";}
+if(dojo.lang.isAlien(value)){return "alien";}
+if(dojo.lang.isUndefined(value)){return "undefined";}
+for(var name in dojo.lang.whatAmI.custom){if(dojo.lang.whatAmI.custom[name](value)){return name;}}
+if(dojo.lang.isObject(value)){return "object";}}catch(e){}
+return "unknown";}
+dojo.lang.isNumeric = function( value){return (!isNaN(value)
+&& isFinite(value)
+&& (value != null)
+&& !dojo.lang.isBoolean(value)
+&& !dojo.lang.isArray(value)
+&& !/^\s*$/.test(value)
+);}
+dojo.lang.isBuiltIn = function( value){return (dojo.lang.isArray(value)
+|| dojo.lang.isFunction(value)
+|| dojo.lang.isString(value)
+|| dojo.lang.isNumber(value)
+|| dojo.lang.isBoolean(value)
+|| (value == null)
+|| (value instanceof Error)
+|| (typeof value == "error")
+);}
+dojo.lang.isPureObject = function( value){return ((value != null)
+&& dojo.lang.isObject(value)
+&& value.constructor == Object
+);}
+dojo.lang.isOfType = function( value,  type,  keywordParameters) {var optional = false;if(keywordParameters){optional = keywordParameters["optional"];}
+if(optional && ((value === null) || dojo.lang.isUndefined(value))){return true;}
+if(dojo.lang.isArray(type)){var arrayOfTypes = type;for(var i in arrayOfTypes){var aType = arrayOfTypes[i];if(dojo.lang.isOfType(value, aType)){return true;}}
+return false;}else{if(dojo.lang.isString(type)){type = type.toLowerCase();}
+switch (type) {case Array:
+case "array":
+return dojo.lang.isArray(value);case Function:
+case "function":
+return dojo.lang.isFunction(value);case String:
+case "string":
+return dojo.lang.isString(value);case Number:
+case "number":
+return dojo.lang.isNumber(value);case "numeric":
+return dojo.lang.isNumeric(value);case Boolean:
+case "boolean":
+return dojo.lang.isBoolean(value);case Object:
+case "object":
+return dojo.lang.isObject(value);case "pureobject":
+return dojo.lang.isPureObject(value);case "builtin":
+return dojo.lang.isBuiltIn(value);case "alien":
+return dojo.lang.isAlien(value);case "undefined":
+return dojo.lang.isUndefined(value);case null:
+case "null":
+return (value === null);default:
+if(dojo.lang.isFunction(type)){return (value instanceof type);}else{dojo.raise("dojo.lang.isOfType() was passed an invalid type");}}
+}
+dojo.raise("If we get here, it means a bug was introduced above.");}
+dojo.lang.getObject=function( str){dojo.deprecated("dojo.lang.getObject", "use dojo.getObject", "0.6");var parts=str.split("."), i=0, obj=dj_global;do{obj=obj[parts[i++]];}while(i<parts.length&&obj);return (obj!=dj_global)?obj:null;}
+dojo.lang.doesObjectExist=function( str){dojo.deprecated("dojo.lang.getObject", "use dojo.exists", "0.6");var parts=str.split("."), i=0, obj=dj_global;do{obj=obj[parts[i++]];}while(i<parts.length&&obj);return (obj&&obj!=dj_global);}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/Animation.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/Animation.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/Animation.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/Animation.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,61 @@
+
+dojo.provide("dojo.lfx.Animation");dojo.require("dojo.lang.func");dojo.lfx.Line = function( start,  end){this.start = start;this.end = end;if(dojo.lang.isArray(start)){var diff = [];dojo.lang.forEach(this.start, function(s,i){diff[i] = this.end[i] - s;}, this);this.getValue = function( n){var res = [];dojo.lang.forEach(this.start, function(s, i){res[i] = (diff[i] * n) + s;}, this);return res;}}else{var diff = end - start;this.getValue = function( n){return (diff * n) + this.start;}}
+}
+dojo.lfx.easeDefault = function( n){if(dojo.render.html.khtml){return (parseFloat("0.5")+((Math.sin( (n+parseFloat("1.5")) * Math.PI))/2));}else{return (0.5+((Math.sin( (n+1.5) * Math.PI))/2));}}
+dojo.lfx.easeIn = function( n){return Math.pow(n, 3);}
+dojo.lfx.easeOut = function( n){return ( 1 - Math.pow(1 - n, 3) );}
+dojo.lfx.easeInOut = function( n){return ( (3 * Math.pow(n, 2)) - (2 * Math.pow(n, 3)) );}
+dojo.lfx.IAnimation = function(){}
+dojo.lang.extend(dojo.lfx.IAnimation, {curve: null,duration: 1000,easing: null,repeatCount: 0,rate: 25,handler: null,beforeBegin: null,onBegin: null,onAnimate: null,onEnd: null,onPlay: null,onPause: null,onStop: null,play: null,pause: null,stop: null,connect: function( evt,  scope,  newFunc){if(!newFunc){newFunc = scope;scope = this;}
+newFunc = dojo.lang.hitch(scope, newFunc);var oldFunc = this[evt]||function(){};this[evt] = function(){var ret = oldFunc.apply(this, arguments);newFunc.apply(this, arguments);return ret;}
+return this;},fire: function( evt,  args){if(this[evt]){this[evt].apply(this, (args||[]));}
+return this;},repeat: function( count){this.repeatCount = count;return this;},_active: false,_paused: false
+});dojo.lfx.Animation = function( handlers,duration,curve,easing,repeatCount,rate){dojo.lfx.IAnimation.call(this);if(dojo.lang.isNumber(handlers)||(!handlers && duration.getValue)){rate = repeatCount;repeatCount = easing;easing = curve;curve = duration;duration = handlers;handlers = null;}else if(handlers.getValue||dojo.lang.isArray(handlers)){rate = easing;repeatCount = curve;easing = duration;curve = handlers;duration = null;handlers = null;}
+if(dojo.lang.isArray(curve)){this.curve = new dojo.lfx.Line(curve[0], curve[1]);}else{this.curve = curve;}
+if(duration != null && duration > 0){ this.duration = duration; }
+if(repeatCount){ this.repeatCount = repeatCount; }
+if(rate){ this.rate = rate; }
+if(handlers){dojo.lang.forEach([
+"handler", "beforeBegin", "onBegin","onEnd", "onPlay", "onStop", "onAnimate"
+], function(item){if(handlers[item]){this.connect(item, handlers[item]);}}, this);}
+if(easing && dojo.lang.isFunction(easing)){this.easing=easing;}}
+dojo.inherits(dojo.lfx.Animation, dojo.lfx.IAnimation);dojo.lang.extend(dojo.lfx.Animation, {_startTime: null,_endTime: null,_timer: null,_percent: 0,_startRepeatCount: 0,play: function( delay,  gotoStart){if(gotoStart){clearTimeout(this._timer);this._active = false;this._paused = false;this._percent = 0;}else if(this._active && !this._paused){return this;}
+this.fire("handler", ["beforeBegin"]);this.fire("beforeBegin");if(delay > 0){setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay);return this;}
+this._startTime = new Date().valueOf();if(this._paused){this._startTime -= (this.duration * this._percent / 100);}
+this._endTime = this._startTime + this.duration;this._active = true;this._paused = false;var step = this._percent / 100;var value = this.curve.getValue(step);if(this._percent == 0 ){if(!this._startRepeatCount){this._startRepeatCount = this.repeatCount;}
+this.fire("handler", ["begin", value]);this.fire("onBegin", [value]);}
+this.fire("handler", ["play", value]);this.fire("onPlay", [value]);this._cycle();return this;},pause: function(){clearTimeout(this._timer);if(!this._active){ return this; }
+this._paused = true;var value = this.curve.getValue(this._percent / 100);this.fire("handler", ["pause", value]);this.fire("onPause", [value]);return this;},gotoPercent: function( pct,  andPlay){clearTimeout(this._timer);this._active = true;this._paused = true;this._percent = pct;if(andPlay){ this.play(); }
+return this;},stop: function( gotoEnd){clearTimeout(this._timer);var step = this._percent / 100;if(gotoEnd){step = 1;}
+var value = this.curve.getValue(step);this.fire("handler", ["stop", value]);this.fire("onStop", [value]);this._active = false;this._paused = false;return this;},status: function(){if(this._active){return this._paused ? "paused" : "playing";}else{return "stopped";}
+return this;},_cycle: function(){clearTimeout(this._timer);if(this._active){var curr = new Date().valueOf();var step = (curr - this._startTime) / (this._endTime - this._startTime);if(step >= 1){step = 1;this._percent = 100;}else{this._percent = step * 100;}
+if((this.easing)&&(dojo.lang.isFunction(this.easing))){step = this.easing(step);}
+var value = this.curve.getValue(step);this.fire("handler", ["animate", value]);this.fire("onAnimate", [value]);if( step < 1 ){this._timer = setTimeout(dojo.lang.hitch(this, "_cycle"), this.rate);}else{this._active = false;this.fire("handler", ["end"]);this.fire("onEnd");if(this.repeatCount > 0){this.repeatCount--;this.play(null, true);}else if(this.repeatCount == -1){this.play(null, true);}else{if(this._startRepeatCount){this.repeatCount = this._startRepeatCount;this._startRepeatCount = 0;}}
+}}
+return this;}});dojo.lfx.Combine = function( animations){dojo.lfx.IAnimation.call(this);this._anims = [];this._animsEnded = 0;var anims = arguments;if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){anims = anims[0];}
+dojo.lang.forEach(anims, function(anim){this._anims.push(anim);anim.connect("onEnd", dojo.lang.hitch(this, "_onAnimsEnded"));}, this);}
+dojo.inherits(dojo.lfx.Combine, dojo.lfx.IAnimation);dojo.lang.extend(dojo.lfx.Combine, {_animsEnded: 0,play: function( delay,  gotoStart){if( !this._anims.length ){ return this; }
+this.fire("beforeBegin");if(delay > 0){setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay);return this;}
+if(gotoStart || this._anims[0].percent == 0){this.fire("onBegin");}
+this.fire("onPlay");this._animsCall("play", null, gotoStart);return this;},pause: function(){this.fire("onPause");this._animsCall("pause");return this;},stop: function( gotoEnd){this.fire("onStop");this._animsCall("stop", gotoEnd);return this;},_onAnimsEnded: function(){this._animsEnded++;if(this._animsEnded >= this._anims.length){this.fire("onEnd");}
+return this;},_animsCall: function( funcName){var args = [];if(arguments.length > 1){for(var i = 1 ; i < arguments.length ; i++){args.push(arguments[i]);}}
+var _this = this;dojo.lang.forEach(this._anims, function(anim){anim[funcName](args);}, _this);return this;}});dojo.lfx.Chain = function( animations) {dojo.lfx.IAnimation.call(this);this._anims = [];this._currAnim = -1;var anims = arguments;if(anims.length == 1 && (dojo.lang.isArray(anims[0]) || dojo.lang.isArrayLike(anims[0]))){anims = anims[0];}
+var _this = this;dojo.lang.forEach(anims, function(anim, i, anims_arr){this._anims.push(anim);if(i < anims_arr.length - 1){anim.connect("onEnd", dojo.lang.hitch(this, "_playNext") );}else{anim.connect("onEnd", dojo.lang.hitch(this, function(){ this.fire("onEnd"); }) );}}, this);}
+dojo.inherits(dojo.lfx.Chain, dojo.lfx.IAnimation);dojo.lang.extend(dojo.lfx.Chain, {_currAnim: -1,play: function( delay,  gotoStart){if( !this._anims.length ) { return this; }
+if( gotoStart || !this._anims[this._currAnim] ) {this._currAnim = 0;}
+var currentAnimation = this._anims[this._currAnim];this.fire("beforeBegin");if(delay > 0){setTimeout(dojo.lang.hitch(this, function(){ this.play(null, gotoStart); }), delay);return this;}
+if(currentAnimation){if(this._currAnim == 0){this.fire("handler", ["begin", this._currAnim]);this.fire("onBegin", [this._currAnim]);}
+this.fire("onPlay", [this._currAnim]);currentAnimation.play(null, gotoStart);}
+return this;},pause: function(){if( this._anims[this._currAnim] ) {this._anims[this._currAnim].pause();this.fire("onPause", [this._currAnim]);}
+return this;},playPause: function(){if(this._anims.length == 0){ return this; }
+if(this._currAnim == -1){ this._currAnim = 0; }
+var currAnim = this._anims[this._currAnim];if( currAnim ) {if( !currAnim._active || currAnim._paused ) {this.play();} else {this.pause();}}
+return this;},stop: function(){var currAnim = this._anims[this._currAnim];if(currAnim){currAnim.stop();this.fire("onStop", [this._currAnim]);}
+return currAnim;},_playNext: function(){if( this._currAnim == -1 || this._anims.length == 0 ) { return this; }
+this._currAnim++;if( this._anims[this._currAnim] ){this._anims[this._currAnim].play(null, true);}
+return this;}});dojo.lfx.combine = function( animations){var anims = arguments;if(dojo.lang.isArray(arguments[0])){anims = arguments[0];}
+if(anims.length == 1){ return anims[0]; }
+return new dojo.lfx.Combine(anims);}
+dojo.lfx.chain = function( animations){var anims = arguments;if(dojo.lang.isArray(arguments[0])){anims = arguments[0];}
+if(anims.length == 1){ return anims[0]; }
+return new dojo.lfx.Chain(anims);}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/__package__.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/__package__.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,3 @@
+
+dojo.kwCompoundRequire({browser: ["dojo.lfx.html"],dashboard: ["dojo.lfx.html"]
+});dojo.provide("dojo.lfx.*");
\ No newline at end of file

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/extras.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/extras.js?view=auto&rev=503984
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/extras.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/lfx/extras.js Mon Feb  5 21:01:25 2007
@@ -0,0 +1,20 @@
+
+dojo.provide("dojo.lfx.extras");dojo.require("dojo.lfx.html");dojo.require("dojo.lfx.Animation");dojo.lfx.html.fadeWipeIn = function( nodes,  duration,  easing,  callback){nodes = dojo.lfx.html._byId(nodes);var anim = dojo.lfx.combine(
+dojo.lfx.fadeIn(nodes, duration, easing),dojo.lfx.wipeIn(nodes, duration, easing)
+);if(callback){anim.connect("onEnd", function(){callback(nodes, anim);});}
+return anim;}
+dojo.lfx.html.fadeWipeOut = function( nodes,  duration,  easing,  callback){nodes = dojo.lfx.html._byId(nodes);var anim = dojo.lfx.combine(
+dojo.lfx.fadeOut(nodes, duration, easing),dojo.lfx.wipeOut(nodes, duration, easing)
+);if(callback){anim.connect("onEnd", function(){callback(nodes, anim);});}
+return anim;}
+dojo.lfx.html.scale = function(nodes,percentage,scaleContent,fromCenter,duration,easing,callback){nodes = dojo.lfx.html._byId(nodes);var anims = [];dojo.lang.forEach(nodes, function(node){var outer = dojo.html.getMarginBox(node);var actualPct = percentage/100.0;var props = [
+{property: "width",start: outer.width,end: outer.width * actualPct
+},{property: "height",start: outer.height,end: outer.height * actualPct
+}];if(scaleContent){var fontSize = dojo.html.getStyle(node, 'font-size');var fontSizeType = null;if(!fontSize){fontSize = parseFloat('100%');fontSizeType = '%';}else{dojo.lang.some(['em','px','%'], function(item, index, arr){if(fontSize.indexOf(item)>0){fontSize = parseFloat(fontSize);fontSizeType = item;return true;}});}
+props.push({property: "font-size",start: fontSize,end: fontSize * actualPct,units: fontSizeType });}
+if(fromCenter){var positioning = dojo.html.getStyle(node, "position");var originalTop = node.offsetTop;var originalLeft = node.offsetLeft;var endTop = ((outer.height * actualPct) - outer.height)/2;var endLeft = ((outer.width * actualPct) - outer.width)/2;props.push({property: "top",start: originalTop,end: (positioning == "absolute" ? originalTop - endTop : (-1*endTop))
+});props.push({property: "left",start: originalLeft,end: (positioning == "absolute" ? originalLeft - endLeft : (-1*endLeft))
+});}
+var anim = dojo.lfx.propertyAnimation(node, props, duration, easing);if(callback){anim.connect("onEnd", function(){callback(node, anim);});}
+anims.push(anim);});return dojo.lfx.combine(anims);}
+dojo.lang.mixin(dojo.lfx, dojo.lfx.html);
\ No newline at end of file