	this.init = function(props, root, bargs){		if(dojo.isString(props)){			var oldRoot = root;			root = props;			props = oldRoot;		}		// FIXME: if the root isn't from the same host, we should automatically		// try to select an XD-capable transport		props = props||{};		// go ask the short bus server what we can support		props.version = this.version;		props.minimumVersion = this.minimumVersion;		props.channel = "/meta/handshake";        props.ext = { "json-comment-filtered": true };		// FIXME: what about ScriptSrcIO for x-domain comet?		this.url = root||djConfig["cometdRoot"];		if(!this.url){			console.debug("no cometd root specified in djConfig and no root passed");			return;		}				// FIXME: we need to select a way to handle JSONP-style stuff		// generically here. We already know if the server is gonna be on		// another domain (or can know it), so we should select appropriate		// negotiation methods here as well as in final transport type		// selection.		var bindArgs = {			url: this.url,			handleAs: this.handleAs,			content: { "message": dojo.toJson([props]) },			callbackParamName: "jsonp", // usually ignored			load: dojo.hitch(this, "finishInit"),			error: function(e){ console.debug("handshake error!:", e); }		};		// borrowed from dojo.uri.Uri in lieu of fixed host and port properties        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"; // FIXME: match 443			r = this.url.match(new RegExp(regexp));			if(r[4]){				tmp = r[4].split(":");				var urlHost = tmp[0];				var urlPort = tmp[1]||"80";				this._isXD = ((urlHost != thisHost)||(urlPort != thisPort));			}		}		if(bargs){			dojo.mixin(bindArgs, bargs);		}		if(this._isXD){			return dojo.io.script.get(bindArgs);		}else{			return dojo.xhrPost(bindArgs);		}	}
5168	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5168/875b0173f8447273a83185b0485aca747d459a14/cometd.js/buggy/_cometd/cometd.js