$estr = function() { return js.Boot.__string_rec(this,''); }
if(typeof connect=='undefined') connect = {}
connect.Remoting_ProxiedConnectionClient = function(c) { if( c === $_ ) return; {
	this.__cnx = c;
}}
connect.Remoting_ProxiedConnectionClient.__name__ = ["connect","Remoting_ProxiedConnectionClient"];
connect.Remoting_ProxiedConnectionClient.prototype.__cnx = null;
connect.Remoting_ProxiedConnectionClient.prototype.doAutosave = function() {
	this.__cnx.resolve("doAutosave").call([]);
}
connect.Remoting_ProxiedConnectionClient.prototype.handleError = function(error,id) {
	this.__cnx.resolve("handleError").call([error,id]);
}
connect.Remoting_ProxiedConnectionClient.prototype.handleFocusLost = function() {
	this.__cnx.resolve("handleFocusLost").call([]);
}
connect.Remoting_ProxiedConnectionClient.prototype.handleHashChange = function(newParams) {
	this.__cnx.resolve("handleHashChange").call([newParams]);
}
connect.Remoting_ProxiedConnectionClient.prototype.handleResult = function(res,id) {
	this.__cnx.resolve("handleResult").call([res,id]);
}
connect.Remoting_ProxiedConnectionClient.prototype.notifyAboutUnload = function() {
	this.__cnx.resolve("notifyAboutUnload").call([]);
}
connect.Remoting_ProxiedConnectionClient.prototype.notifyMouseWheelListeners = function(delta) {
	this.__cnx.resolve("notifyMouseWheelListeners").call([delta]);
}
connect.Remoting_ProxiedConnectionClient.prototype.__class__ = connect.Remoting_ProxiedConnectionClient;
if(typeof haxe=='undefined') haxe = {}
if(!haxe.remoting) haxe.remoting = {}
haxe.remoting.AsyncConnection = function() { }
haxe.remoting.AsyncConnection.__name__ = ["haxe","remoting","AsyncConnection"];
haxe.remoting.AsyncConnection.prototype.call = null;
haxe.remoting.AsyncConnection.prototype.resolve = null;
haxe.remoting.AsyncConnection.prototype.setErrorHandler = null;
haxe.remoting.AsyncConnection.prototype.__class__ = haxe.remoting.AsyncConnection;
StringTools = function() { }
StringTools.__name__ = ["StringTools"];
StringTools.urlEncode = function(s) {
	return encodeURIComponent(s);
}
StringTools.urlDecode = function(s) {
	return decodeURIComponent(s.split("+").join(" "));
}
StringTools.htmlEscape = function(s) {
	return s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
}
StringTools.htmlUnescape = function(s) {
	return s.split("&gt;").join(">").split("&lt;").join("<").split("&amp;").join("&");
}
StringTools.startsWith = function(s,start) {
	return (s.length >= start.length && s.substr(0,start.length) == start);
}
StringTools.endsWith = function(s,end) {
	var elen = end.length;
	var slen = s.length;
	return (slen >= elen && s.substr(slen - elen,elen) == end);
}
StringTools.isSpace = function(s,pos) {
	var c = s.charCodeAt(pos);
	return (c >= 9 && c <= 13) || c == 32;
}
StringTools.ltrim = function(s) {
	var l = s.length;
	var r = 0;
	while(r < l && StringTools.isSpace(s,r)) {
		r++;
	}
	if(r > 0) return s.substr(r,l - r);
	else return s;
}
StringTools.rtrim = function(s) {
	var l = s.length;
	var r = 0;
	while(r < l && StringTools.isSpace(s,(l - r) - 1)) {
		r++;
	}
	if(r > 0) {
		return s.substr(0,l - r);
	}
	else {
		return s;
	}
}
StringTools.trim = function(s) {
	return StringTools.ltrim(StringTools.rtrim(s));
}
StringTools.rpad = function(s,c,l) {
	var sl = s.length;
	var cl = c.length;
	while(sl < l) {
		if(l - sl < cl) {
			s += c.substr(0,l - sl);
			sl = l;
		}
		else {
			s += c;
			sl += cl;
		}
	}
	return s;
}
StringTools.lpad = function(s,c,l) {
	var ns = "";
	var sl = s.length;
	if(sl >= l) return s;
	var cl = c.length;
	while(sl < l) {
		if(l - sl < cl) {
			ns += c.substr(0,l - sl);
			sl = l;
		}
		else {
			ns += c;
			sl += cl;
		}
	}
	return ns + s;
}
StringTools.replace = function(s,sub,by) {
	return s.split(sub).join(by);
}
StringTools.hex = function(n,digits) {
	var neg = false;
	if(n < 0) {
		neg = true;
		n = -n;
	}
	var s = n.toString(16);
	s = s.toUpperCase();
	if(digits != null) while(s.length < digits) s = "0" + s;
	if(neg) s = "-" + s;
	return s;
}
StringTools.prototype.__class__ = StringTools;
Reflect = function() { }
Reflect.__name__ = ["Reflect"];
Reflect.hasField = function(o,field) {
	if(o.hasOwnProperty != null) return o.hasOwnProperty(field);
	var arr = Reflect.fields(o);
	{ var $it0 = arr.iterator();
	while( $it0.hasNext() ) { var t = $it0.next();
	if(t == field) return true;
	}}
	return false;
}
Reflect.field = function(o,field) {
	var v = null;
	try {
		v = o[field];
	}
	catch( $e1 ) {
		{
			var e = $e1;
			null;
		}
	}
	return v;
}
Reflect.setField = function(o,field,value) {
	o[field] = value;
}
Reflect.callMethod = function(o,func,args) {
	return func.apply(o,args);
}
Reflect.fields = function(o) {
	if(o == null) return new Array();
	var a = new Array();
	if(o.hasOwnProperty) {
		
					for(var i in o)
						if( o.hasOwnProperty(i) )
							a.push(i);
				;
	}
	else {
		var t;
		try {
			t = o.__proto__;
		}
		catch( $e2 ) {
			{
				var e = $e2;
				{
					t = null;
				}
			}
		}
		if(t != null) o.__proto__ = null;
		
					for(var i in o)
						if( i != "__proto__" )
							a.push(i);
				;
		if(t != null) o.__proto__ = t;
	}
	return a;
}
Reflect.isFunction = function(f) {
	return typeof(f) == "function" && f.__name__ == null;
}
Reflect.compare = function(a,b) {
	return ((a == b)?0:((((a) > (b))?1:-1)));
}
Reflect.compareMethods = function(f1,f2) {
	if(f1 == f2) return true;
	if(!Reflect.isFunction(f1) || !Reflect.isFunction(f2)) return false;
	return f1.scope == f2.scope && f1.method == f2.method && f1.method != null;
}
Reflect.isObject = function(v) {
	if(v == null) return false;
	var t = typeof(v);
	return (t == "string" || (t == "object" && !v.__enum__) || (t == "function" && v.__name__ != null));
}
Reflect.deleteField = function(o,f) {
	if(!Reflect.hasField(o,f)) return false;
	delete(o[f]);
	return true;
}
Reflect.copy = function(o) {
	var o2 = { }
	{
		var _g = 0, _g1 = Reflect.fields(o);
		while(_g < _g1.length) {
			var f = _g1[_g];
			++_g;
			o2[f] = Reflect.field(o,f);
		}
	}
	return o2;
}
Reflect.makeVarArgs = function(f) {
	return function() {
		var a = new Array();
		{
			var _g1 = 0, _g = arguments.length;
			while(_g1 < _g) {
				var i = _g1++;
				a.push(arguments[i]);
			}
		}
		return f(a);
	}
}
Reflect.prototype.__class__ = Reflect;
haxe.Log = function() { }
haxe.Log.__name__ = ["haxe","Log"];
haxe.Log.trace = function(v,infos) {
	js.Boot.__trace(v,infos);
}
haxe.Log.clear = function() {
	js.Boot.__clear_trace();
}
haxe.Log.prototype.__class__ = haxe.Log;
MapAccess = { __ename__ : ["MapAccess"], __constructs__ : ["Shared","PublicShared","Private","Readonly","PublicReadonly","MetaMap"] }
MapAccess.MetaMap = ["MetaMap",5];
MapAccess.MetaMap.toString = $estr;
MapAccess.MetaMap.__enum__ = MapAccess;
MapAccess.Private = ["Private",2];
MapAccess.Private.toString = $estr;
MapAccess.Private.__enum__ = MapAccess;
MapAccess.PublicReadonly = ["PublicReadonly",4];
MapAccess.PublicReadonly.toString = $estr;
MapAccess.PublicReadonly.__enum__ = MapAccess;
MapAccess.PublicShared = ["PublicShared",1];
MapAccess.PublicShared.toString = $estr;
MapAccess.PublicShared.__enum__ = MapAccess;
MapAccess.Readonly = ["Readonly",3];
MapAccess.Readonly.toString = $estr;
MapAccess.Readonly.__enum__ = MapAccess;
MapAccess.Shared = ["Shared",0];
MapAccess.Shared.toString = $estr;
MapAccess.Shared.__enum__ = MapAccess;
MapSource = { __ename__ : ["MapSource"], __constructs__ : ["Server","Desktop","Autosave","AutosaveBase","New","Resource","Template","History","Unknown"] }
MapSource.Autosave = ["Autosave",2];
MapSource.Autosave.toString = $estr;
MapSource.Autosave.__enum__ = MapSource;
MapSource.AutosaveBase = ["AutosaveBase",3];
MapSource.AutosaveBase.toString = $estr;
MapSource.AutosaveBase.__enum__ = MapSource;
MapSource.Desktop = ["Desktop",1];
MapSource.Desktop.toString = $estr;
MapSource.Desktop.__enum__ = MapSource;
MapSource.History = ["History",7];
MapSource.History.toString = $estr;
MapSource.History.__enum__ = MapSource;
MapSource.New = ["New",4];
MapSource.New.toString = $estr;
MapSource.New.__enum__ = MapSource;
MapSource.Resource = ["Resource",5];
MapSource.Resource.toString = $estr;
MapSource.Resource.__enum__ = MapSource;
MapSource.Server = ["Server",0];
MapSource.Server.toString = $estr;
MapSource.Server.__enum__ = MapSource;
MapSource.Template = ["Template",6];
MapSource.Template.toString = $estr;
MapSource.Template.__enum__ = MapSource;
MapSource.Unknown = ["Unknown",8];
MapSource.Unknown.toString = $estr;
MapSource.Unknown.__enum__ = MapSource;
StringBuf = function(p) { if( p === $_ ) return; {
	this.b = new Array();
}}
StringBuf.__name__ = ["StringBuf"];
StringBuf.prototype.add = function(x) {
	this.b[this.b.length] = x;
}
StringBuf.prototype.addChar = function(c) {
	this.b[this.b.length] = String.fromCharCode(c);
}
StringBuf.prototype.addSub = function(s,pos,len) {
	this.b[this.b.length] = s.substr(pos,len);
}
StringBuf.prototype.b = null;
StringBuf.prototype.toString = function() {
	return this.b.join("");
}
StringBuf.prototype.__class__ = StringBuf;
haxe.remoting.Connection = function() { }
haxe.remoting.Connection.__name__ = ["haxe","remoting","Connection"];
haxe.remoting.Connection.prototype.call = null;
haxe.remoting.Connection.prototype.resolve = null;
haxe.remoting.Connection.prototype.__class__ = haxe.remoting.Connection;
Hash = function(p) { if( p === $_ ) return; {
	this.h = {}
	if(this.h.__proto__ != null) {
		this.h.__proto__ = null;
		delete(this.h.__proto__);
	}
	else null;
}}
Hash.__name__ = ["Hash"];
Hash.prototype.exists = function(key) {
	try {
		key = "$" + key;
		return this.hasOwnProperty.call(this.h,key);
	}
	catch( $e3 ) {
		{
			var e = $e3;
			{
				
				for(var i in this.h)
					if( i == key ) return true;
			;
				return false;
			}
		}
	}
}
Hash.prototype.get = function(key) {
	return this.h["$" + key];
}
Hash.prototype.h = null;
Hash.prototype.iterator = function() {
	return { ref : this.h, it : this.keys(), hasNext : function() {
		return this.it.hasNext();
	}, next : function() {
		var i = this.it.next();
		return this.ref["$" + i];
	}}
}
Hash.prototype.keys = function() {
	var a = new Array();
	
			for(var i in this.h)
				a.push(i.substr(1));
		;
	return a.iterator();
}
Hash.prototype.remove = function(key) {
	if(!this.exists(key)) return false;
	delete(this.h["$" + key]);
	return true;
}
Hash.prototype.set = function(key,value) {
	this.h["$" + key] = value;
}
Hash.prototype.toString = function() {
	var s = new StringBuf();
	s.b[s.b.length] = "{";
	var it = this.keys();
	{ var $it4 = it;
	while( $it4.hasNext() ) { var i = $it4.next();
	{
		s.b[s.b.length] = i;
		s.b[s.b.length] = " => ";
		s.b[s.b.length] = Std.string(this.get(i));
		if(it.hasNext()) s.b[s.b.length] = ", ";
	}
	}}
	s.b[s.b.length] = "}";
	return s.b.join("");
}
Hash.prototype.__class__ = Hash;
haxe.remoting.ExternalConnection = function(data,path) { if( data === $_ ) return; {
	this.__data = data;
	this.__path = path;
}}
haxe.remoting.ExternalConnection.__name__ = ["haxe","remoting","ExternalConnection"];
haxe.remoting.ExternalConnection.escapeString = function(s) {
	return s;
}
haxe.remoting.ExternalConnection.doCall = function(name,path,params) {
	try {
		var cnx = haxe.remoting.ExternalConnection.connections.get(name);
		if(cnx == null) throw "Unknown connection : " + name;
		if(cnx.__data.ctx == null) throw "No context shared for the connection " + name;
		var params1 = new haxe.Unserializer(params).unserialize();
		var ret = cnx.__data.ctx.call(path.split("."),params1);
		var s = new haxe.Serializer();
		s.serialize(ret);
		return s.toString() + "#";
	}
	catch( $e5 ) {
		{
			var e = $e5;
			{
				var s = new haxe.Serializer();
				s.serializeException(e);
				return s.toString();
			}
		}
	}
}
haxe.remoting.ExternalConnection.flashConnect = function(name,flashObjectID,ctx) {
	var cnx = new haxe.remoting.ExternalConnection({ ctx : ctx, name : name, flash : flashObjectID},[]);
	haxe.remoting.ExternalConnection.connections.set(name,cnx);
	return cnx;
}
haxe.remoting.ExternalConnection.prototype.__data = null;
haxe.remoting.ExternalConnection.prototype.__path = null;
haxe.remoting.ExternalConnection.prototype.call = function(params) {
	var s = new haxe.Serializer();
	s.serialize(params);
	var params1 = s.toString();
	var data = null;
	var fobj = window.document[this.__data.flash];
	if(fobj == null) fobj = window.document.getElementById[this.__data.flash];
	if(fobj == null) throw ("Could not find flash object '" + this.__data.flash) + "'";
	try {
		data = fobj.externalRemotingCall(this.__data.name,this.__path.join("."),params1);
	}
	catch( $e6 ) {
		{
			var e = $e6;
			null;
		}
	}
	if(data == null) throw "Call failure : ExternalConnection is not " + "initialized in Flash";
	return new haxe.Unserializer(data).unserialize();
}
haxe.remoting.ExternalConnection.prototype.close = function() {
	haxe.remoting.ExternalConnection.connections.remove(this.__data.name);
}
haxe.remoting.ExternalConnection.prototype.resolve = function(field) {
	var e = new haxe.remoting.ExternalConnection(this.__data,this.__path.copy());
	e.__path.push(field);
	return e;
}
haxe.remoting.ExternalConnection.prototype.__class__ = haxe.remoting.ExternalConnection;
haxe.remoting.ExternalConnection.__interfaces__ = [haxe.remoting.Connection];
if(!haxe.io) haxe.io = {}
haxe.io.Bytes = function(length,b) { if( length === $_ ) return; {
	this.length = length;
	this.b = b;
}}
haxe.io.Bytes.__name__ = ["haxe","io","Bytes"];
haxe.io.Bytes.alloc = function(length) {
	var a = new Array();
	{
		var _g = 0;
		while(_g < length) {
			var i = _g++;
			a.push(0);
		}
	}
	return new haxe.io.Bytes(length,a);
}
haxe.io.Bytes.ofString = function(s) {
	var a = new Array();
	{
		var _g1 = 0, _g = s.length;
		while(_g1 < _g) {
			var i = _g1++;
			var c = s["cca"](i);
			if(c <= 127) a.push(c);
			else if(c <= 2047) {
				a.push(192 | (c >> 6));
				a.push(128 | (c & 63));
			}
			else if(c <= 65535) {
				a.push(224 | (c >> 12));
				a.push(128 | ((c >> 6) & 63));
				a.push(128 | (c & 63));
			}
			else {
				a.push(240 | (c >> 18));
				a.push(128 | ((c >> 12) & 63));
				a.push(128 | ((c >> 6) & 63));
				a.push(128 | (c & 63));
			}
		}
	}
	return new haxe.io.Bytes(a.length,a);
}
haxe.io.Bytes.ofData = function(b) {
	return new haxe.io.Bytes(b.length,b);
}
haxe.io.Bytes.prototype.b = null;
haxe.io.Bytes.prototype.blit = function(pos,src,srcpos,len) {
	if(pos < 0 || srcpos < 0 || len < 0 || pos + len > this.length || srcpos + len > src.length) throw haxe.io.Error.OutsideBounds;
	var b1 = this.b;
	var b2 = src.b;
	if(b1 == b2 && pos > srcpos) {
		var i = len;
		while(i > 0) {
			i--;
			b1[i + pos] = b2[i + srcpos];
		}
		return;
	}
	{
		var _g = 0;
		while(_g < len) {
			var i = _g++;
			b1[i + pos] = b2[i + srcpos];
		}
	}
}
haxe.io.Bytes.prototype.compare = function(other) {
	var b1 = this.b;
	var b2 = other.b;
	var len = ((this.length < other.length)?this.length:other.length);
	{
		var _g = 0;
		while(_g < len) {
			var i = _g++;
			if(b1[i] != b2[i]) return b1[i] - b2[i];
		}
	}
	return this.length - other.length;
}
haxe.io.Bytes.prototype.get = function(pos) {
	return this.b[pos];
}
haxe.io.Bytes.prototype.getData = function() {
	return this.b;
}
haxe.io.Bytes.prototype.length = null;
haxe.io.Bytes.prototype.readString = function(pos,len) {
	if(pos < 0 || len < 0 || pos + len > this.length) throw haxe.io.Error.OutsideBounds;
	var s = "";
	var b = this.b;
	var fcc = $closure(String,"fromCharCode");
	var i = pos;
	var max = pos + len;
	while(i < max) {
		var c = b[i++];
		if(c < 128) {
			if(c == 0) break;
			s += fcc(c);
		}
		else if(c < 224) s += fcc(((c & 63) << 6) | (b[i++] & 127));
		else if(c < 240) {
			var c2 = b[i++];
			s += fcc((((c & 31) << 12) | ((c2 & 127) << 6)) | (b[i++] & 127));
		}
		else {
			var c2 = b[i++];
			var c3 = b[i++];
			s += fcc(((((c & 15) << 18) | ((c2 & 127) << 12)) | ((c3 << 6) & 127)) | (b[i++] & 127));
		}
	}
	return s;
}
haxe.io.Bytes.prototype.set = function(pos,v) {
	this.b[pos] = (v & 255);
}
haxe.io.Bytes.prototype.sub = function(pos,len) {
	if(pos < 0 || len < 0 || pos + len > this.length) throw haxe.io.Error.OutsideBounds;
	return new haxe.io.Bytes(len,this.b.slice(pos,pos + len));
}
haxe.io.Bytes.prototype.toString = function() {
	return this.readString(0,this.length);
}
haxe.io.Bytes.prototype.__class__ = haxe.io.Bytes;
IntIter = function(min,max) { if( min === $_ ) return; {
	this.min = min;
	this.max = max;
}}
IntIter.__name__ = ["IntIter"];
IntIter.prototype.hasNext = function() {
	return this.min < this.max;
}
IntIter.prototype.max = null;
IntIter.prototype.min = null;
IntIter.prototype.next = function() {
	return this.min++;
}
IntIter.prototype.__class__ = IntIter;
haxe.Timer = function(time_ms) { if( time_ms === $_ ) return; {
	this.id = haxe.Timer.arr.length;
	haxe.Timer.arr[this.id] = this;
	this.timerId = window.setInterval(("haxe.Timer.arr[" + this.id) + "].run();",time_ms);
}}
haxe.Timer.__name__ = ["haxe","Timer"];
haxe.Timer.delay = function(f,time_ms) {
	var t = new haxe.Timer(time_ms);
	t.run = function() {
		t.stop();
		f();
	}
	return t;
}
haxe.Timer.stamp = function() {
	return Date.now().getTime() / 1000;
}
haxe.Timer.prototype.id = null;
haxe.Timer.prototype.run = function() {
	null;
}
haxe.Timer.prototype.stop = function() {
	if(this.id == null) return;
	window.clearInterval(this.timerId);
	haxe.Timer.arr[this.id] = null;
	if(this.id > 100 && this.id == haxe.Timer.arr.length - 1) {
		var p = this.id - 1;
		while(p >= 0 && haxe.Timer.arr[p] == null) p--;
		haxe.Timer.arr = haxe.Timer.arr.slice(0,p + 1);
	}
	this.id = null;
}
haxe.Timer.prototype.timerId = null;
haxe.Timer.prototype.__class__ = haxe.Timer;
haxe.io.Error = { __ename__ : ["haxe","io","Error"], __constructs__ : ["Blocked","Overflow","OutsideBounds","Custom"] }
haxe.io.Error.Blocked = ["Blocked",0];
haxe.io.Error.Blocked.toString = $estr;
haxe.io.Error.Blocked.__enum__ = haxe.io.Error;
haxe.io.Error.Custom = function(e) { var $x = ["Custom",3,e]; $x.__enum__ = haxe.io.Error; $x.toString = $estr; return $x; }
haxe.io.Error.OutsideBounds = ["OutsideBounds",2];
haxe.io.Error.OutsideBounds.toString = $estr;
haxe.io.Error.OutsideBounds.__enum__ = haxe.io.Error;
haxe.io.Error.Overflow = ["Overflow",1];
haxe.io.Error.Overflow.toString = $estr;
haxe.io.Error.Overflow.__enum__ = haxe.io.Error;
haxe.remoting.HttpAsyncConnection = function(data,path) { if( data === $_ ) return; {
	this.__data = data;
	this.__path = path;
}}
haxe.remoting.HttpAsyncConnection.__name__ = ["haxe","remoting","HttpAsyncConnection"];
haxe.remoting.HttpAsyncConnection.urlConnect = function(url) {
	return new haxe.remoting.HttpAsyncConnection({ url : url, error : function(e) {
		throw e;
	}},[]);
}
haxe.remoting.HttpAsyncConnection.prototype.__data = null;
haxe.remoting.HttpAsyncConnection.prototype.__path = null;
haxe.remoting.HttpAsyncConnection.prototype.call = function(params,onResult) {
	var h = new haxe.Http(this.__data.url);
	var s = new haxe.Serializer();
	s.serialize(this.__path);
	s.serialize(params);
	h.setHeader("X-Haxe-Remoting","1");
	h.setParameter("__x",s.toString());
	var error = this.__data.error;
	h.onData = function(response) {
		var ok = true;
		var ret;
		try {
			if(response.substr(0,3) != "hxr") throw ("Invalid response : '" + response) + "'";
			var s1 = new haxe.Unserializer(response.substr(3));
			ret = s1.unserialize();
		}
		catch( $e7 ) {
			{
				var err = $e7;
				{
					ret = null;
					ok = false;
					error(err);
				}
			}
		}
		if(ok && onResult != null) onResult(ret);
	}
	h.onError = error;
	h.request(true);
}
haxe.remoting.HttpAsyncConnection.prototype.resolve = function(name) {
	var c = new haxe.remoting.HttpAsyncConnection(this.__data,this.__path.copy());
	c.__path.push(name);
	return c;
}
haxe.remoting.HttpAsyncConnection.prototype.setErrorHandler = function(h) {
	this.__data.error = h;
}
haxe.remoting.HttpAsyncConnection.prototype.__class__ = haxe.remoting.HttpAsyncConnection;
haxe.remoting.HttpAsyncConnection.__interfaces__ = [haxe.remoting.AsyncConnection];
Protocol = function() { }
Protocol.__name__ = ["Protocol"];
Protocol.prototype.__class__ = Protocol;
Type = function() { }
Type.__name__ = ["Type"];
Type.getClass = function(o) {
	if(o == null) return null;
	if(o.__enum__ != null) return null;
	return o.__class__;
}
Type.getEnum = function(o) {
	if(o == null) return null;
	return o.__enum__;
}
Type.getSuperClass = function(c) {
	return c.__super__;
}
Type.getClassName = function(c) {
	if(c == null) return null;
	var a = c.__name__;
	return a.join(".");
}
Type.getEnumName = function(e) {
	var a = e.__ename__;
	return a.join(".");
}
Type.resolveClass = function(name) {
	var cl;
	try {
		cl = eval(name);
	}
	catch( $e8 ) {
		{
			var e = $e8;
			{
				cl = null;
			}
		}
	}
	if(cl == null || cl.__name__ == null) return null;
	return cl;
}
Type.resolveEnum = function(name) {
	var e;
	try {
		e = eval(name);
	}
	catch( $e9 ) {
		{
			var err = $e9;
			{
				e = null;
			}
		}
	}
	if(e == null || e.__ename__ == null) return null;
	return e;
}
Type.createInstance = function(cl,args) {
	if(args.length <= 3) return new cl(args[0],args[1],args[2]);
	if(args.length > 8) throw "Too many arguments";
	return new cl(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]);
}
Type.createEmptyInstance = function(cl) {
	return new cl($_);
}
Type.createEnum = function(e,constr,params) {
	var f = Reflect.field(e,constr);
	if(f == null) throw "No such constructor " + constr;
	if(Reflect.isFunction(f)) {
		if(params == null) throw ("Constructor " + constr) + " need parameters";
		return f.apply(e,params);
	}
	if(params != null && params.length != 0) throw ("Constructor " + constr) + " does not need parameters";
	return f;
}
Type.createEnumIndex = function(e,index,params) {
	var c = Type.getEnumConstructs(e)[index];
	if(c == null) throw index + " is not a valid enum constructor index";
	return Type.createEnum(e,c,params);
}
Type.getInstanceFields = function(c) {
	var a = Reflect.fields(c.prototype);
	a.remove("__class__");
	return a;
}
Type.getClassFields = function(c) {
	var a = Reflect.fields(c);
	a.remove("__name__");
	a.remove("__interfaces__");
	a.remove("__super__");
	a.remove("prototype");
	return a;
}
Type.getEnumConstructs = function(e) {
	return e.__constructs__;
}
Type["typeof"] = function(v) {
	switch(typeof(v)) {
	case "boolean":{
		return ValueType.TBool;
	}break;
	case "string":{
		return ValueType.TClass(String);
	}break;
	case "number":{
		if(Math.ceil(v) == v % 2147483648.0) return ValueType.TInt;
		return ValueType.TFloat;
	}break;
	case "object":{
		if(v == null) return ValueType.TNull;
		var e = v.__enum__;
		if(e != null) return ValueType.TEnum(e);
		var c = v.__class__;
		if(c != null) return ValueType.TClass(c);
		return ValueType.TObject;
	}break;
	case "function":{
		if(v.__name__ != null) return ValueType.TObject;
		return ValueType.TFunction;
	}break;
	case "undefined":{
		return ValueType.TNull;
	}break;
	default:{
		return ValueType.TUnknown;
	}break;
	}
}
Type.enumEq = function(a,b) {
	if(a == b) return true;
	try {
		if(a[0] != b[0]) return false;
		{
			var _g1 = 2, _g = a.length;
			while(_g1 < _g) {
				var i = _g1++;
				if(!Type.enumEq(a[i],b[i])) return false;
			}
		}
		var e = a.__enum__;
		if(e != b.__enum__ || e == null) return false;
	}
	catch( $e10 ) {
		{
			var e = $e10;
			{
				return false;
			}
		}
	}
	return true;
}
Type.enumConstructor = function(e) {
	return e[0];
}
Type.enumParameters = function(e) {
	return e.slice(2);
}
Type.enumIndex = function(e) {
	return e[1];
}
Type.prototype.__class__ = Type;
haxe.Unserializer = function(buf) { if( buf === $_ ) return; {
	this.buf = buf;
	this.length = buf.length;
	this.pos = 0;
	this.scache = new Array();
	this.cache = new Array();
	this.setResolver(haxe.Unserializer.DEFAULT_RESOLVER);
}}
haxe.Unserializer.__name__ = ["haxe","Unserializer"];
haxe.Unserializer.initCodes = function() {
	var codes = new Array();
	{
		var _g1 = 0, _g = haxe.Unserializer.BASE64.length;
		while(_g1 < _g) {
			var i = _g1++;
			codes[haxe.Unserializer.BASE64.cca(i)] = i;
		}
	}
	return codes;
}
haxe.Unserializer.run = function(v) {
	return new haxe.Unserializer(v).unserialize();
}
haxe.Unserializer.prototype.buf = null;
haxe.Unserializer.prototype.cache = null;
haxe.Unserializer.prototype.get = function(p) {
	return this.buf.cca(p);
}
haxe.Unserializer.prototype.length = null;
haxe.Unserializer.prototype.pos = null;
haxe.Unserializer.prototype.readDigits = function() {
	var k = 0;
	var s = false;
	var fpos = this.pos;
	while(true) {
		var c = this.buf.cca(this.pos);
		if(Math.isNaN(c)) break;
		if(c == 45) {
			if(this.pos != fpos) break;
			s = true;
			this.pos++;
			continue;
		}
		c -= 48;
		if(c < 0 || c > 9) break;
		k = k * 10 + c;
		this.pos++;
	}
	if(s) k *= -1;
	return k;
}
haxe.Unserializer.prototype.resolver = null;
haxe.Unserializer.prototype.scache = null;
haxe.Unserializer.prototype.setResolver = function(r) {
	if(r == null) this.resolver = { resolveClass : function(_) {
		return null;
	}, resolveEnum : function(_) {
		return null;
	}}
	else this.resolver = r;
}
haxe.Unserializer.prototype.unserialize = function() {
	switch(this.buf.cca(this.pos++)) {
	case 110:{
		return null;
	}break;
	case 116:{
		return true;
	}break;
	case 102:{
		return false;
	}break;
	case 122:{
		return 0;
	}break;
	case 105:{
		return this.readDigits();
	}break;
	case 100:{
		var p1 = this.pos;
		while(true) {
			var c = this.buf.cca(this.pos);
			if((c >= 43 && c < 58) || c == 101 || c == 69) this.pos++;
			else break;
		}
		return Std.parseFloat(this.buf.substr(p1,this.pos - p1));
	}break;
	case 121:{
		var len = this.readDigits();
		if(this.buf.charAt(this.pos++) != ":" || this.length - this.pos < len) throw "Invalid string length";
		var s = this.buf.substr(this.pos,len);
		this.pos += len;
		s = StringTools.urlDecode(s);
		this.scache.push(s);
		return s;
	}break;
	case 107:{
		return Math.NaN;
	}break;
	case 109:{
		return Math.NEGATIVE_INFINITY;
	}break;
	case 112:{
		return Math.POSITIVE_INFINITY;
	}break;
	case 97:{
		var buf = this.buf;
		var a = new Array();
		this.cache.push(a);
		while(true) {
			var c = this.buf.cca(this.pos);
			if(c == 104) {
				this.pos++;
				break;
			}
			if(c == 117) {
				this.pos++;
				var n = this.readDigits();
				a[(a.length + n) - 1] = null;
			}
			else a.push(this.unserialize());
		}
		return a;
	}break;
	case 111:{
		var o = { }
		this.cache.push(o);
		this.unserializeObject(o);
		return o;
	}break;
	case 114:{
		var n = this.readDigits();
		if(n < 0 || n >= this.cache.length) throw "Invalid reference";
		return this.cache[n];
	}break;
	case 82:{
		var n = this.readDigits();
		if(n < 0 || n >= this.scache.length) throw "Invalid string reference";
		return this.scache[n];
	}break;
	case 120:{
		throw this.unserialize();
	}break;
	case 99:{
		var name = this.unserialize();
		var cl = this.resolver.resolveClass(name);
		if(cl == null) throw "Class not found " + name;
		var o = Type.createEmptyInstance(cl);
		this.cache.push(o);
		this.unserializeObject(o);
		return o;
	}break;
	case 119:{
		var name = this.unserialize();
		var edecl = this.resolver.resolveEnum(name);
		if(edecl == null) throw "Enum not found " + name;
		return this.unserializeEnum(edecl,this.unserialize());
	}break;
	case 106:{
		var name = this.unserialize();
		var edecl = this.resolver.resolveEnum(name);
		if(edecl == null) throw "Enum not found " + name;
		this.pos++;
		var index = this.readDigits();
		var tag = Type.getEnumConstructs(edecl)[index];
		if(tag == null) throw (("Unknown enum index " + name) + "@") + index;
		return this.unserializeEnum(edecl,tag);
	}break;
	case 108:{
		var l = new List();
		this.cache.push(l);
		var buf = this.buf;
		while(this.buf.cca(this.pos) != 104) l.add(this.unserialize());
		this.pos++;
		return l;
	}break;
	case 98:{
		var h = new Hash();
		this.cache.push(h);
		var buf = this.buf;
		while(this.buf.cca(this.pos) != 104) {
			var s = this.unserialize();
			h.set(s,this.unserialize());
		}
		this.pos++;
		return h;
	}break;
	case 113:{
		var h = new IntHash();
		this.cache.push(h);
		var buf = this.buf;
		var c = this.buf.cca(this.pos++);
		while(c == 58) {
			var i = this.readDigits();
			h.set(i,this.unserialize());
			c = this.buf.cca(this.pos++);
		}
		if(c != 104) throw "Invalid IntHash format";
		return h;
	}break;
	case 118:{
		var d = Date.fromString(this.buf.substr(this.pos,19));
		this.cache.push(d);
		this.pos += 19;
		return d;
	}break;
	case 115:{
		var len = this.readDigits();
		var buf = this.buf;
		if(buf.charAt(this.pos++) != ":" || this.length - this.pos < len) throw "Invalid bytes length";
		var codes = haxe.Unserializer.CODES;
		if(codes == null) {
			codes = haxe.Unserializer.initCodes();
			haxe.Unserializer.CODES = codes;
		}
		var i = this.pos;
		var rest = len & 3;
		var size = (len >> 2) * 3 + (((rest >= 2)?rest - 1:0));
		var max = i + (len - rest);
		var bytes = haxe.io.Bytes.alloc(size);
		var bpos = 0;
		while(i < max) {
			var c1 = codes[buf.cca(i++)];
			var c2 = codes[buf.cca(i++)];
			bytes.b[bpos++] = (((c1 << 2) | (c2 >> 4)) & 255);
			var c3 = codes[buf.cca(i++)];
			bytes.b[bpos++] = (((c2 << 4) | (c3 >> 2)) & 255);
			var c4 = codes[buf.cca(i++)];
			bytes.b[bpos++] = (((c3 << 6) | c4) & 255);
		}
		if(rest >= 2) {
			var c1 = codes[buf.cca(i++)];
			var c2 = codes[buf.cca(i++)];
			bytes.b[bpos++] = (((c1 << 2) | (c2 >> 4)) & 255);
			if(rest == 3) {
				var c3 = codes[buf.cca(i++)];
				bytes.b[bpos++] = (((c2 << 4) | (c3 >> 2)) & 255);
			}
		}
		this.pos += len;
		this.cache.push(bytes);
		return bytes;
	}break;
	default:{
		null;
	}break;
	}
	this.pos--;
	throw ((("Invalid char " + this.buf.charAt(this.pos)) + " at position ") + this.pos);
}
haxe.Unserializer.prototype.unserializeEnum = function(edecl,tag) {
	var constr = Reflect.field(edecl,tag);
	if(constr == null) throw (("Unknown enum tag " + Type.getEnumName(edecl)) + ".") + tag;
	if(this.buf.cca(this.pos++) != 58) throw "Invalid enum format";
	var nargs = this.readDigits();
	if(nargs == 0) {
		this.cache.push(constr);
		return constr;
	}
	var args = new Array();
	while(nargs > 0) {
		args.push(this.unserialize());
		nargs -= 1;
	}
	var e = constr.apply(edecl,args);
	this.cache.push(e);
	return e;
}
haxe.Unserializer.prototype.unserializeObject = function(o) {
	while(true) {
		if(this.pos >= this.length) throw "Invalid object";
		if(this.buf.cca(this.pos) == 103) break;
		var k = this.unserialize();
		if(!Std["is"](k,String)) throw "Invalid object key";
		var v = this.unserialize();
		o[k] = v;
	}
	this.pos++;
}
haxe.Unserializer.prototype.__class__ = haxe.Unserializer;
haxe.remoting.Context = function(p) { if( p === $_ ) return; {
	this.objects = new Hash();
}}
haxe.remoting.Context.__name__ = ["haxe","remoting","Context"];
haxe.remoting.Context.share = function(name,obj) {
	var ctx = new haxe.remoting.Context();
	ctx.addObject(name,obj);
	return ctx;
}
haxe.remoting.Context.prototype.addObject = function(name,obj,recursive) {
	this.objects.set(name,{ obj : obj, rec : recursive});
}
haxe.remoting.Context.prototype.call = function(path,params) {
	if(path.length < 2) throw ("Invalid path '" + path.join(".")) + "'";
	var inf = this.objects.get(path[0]);
	if(inf == null) throw "No such object " + path[0];
	var o = inf.obj;
	var m = Reflect.field(o,path[1]);
	if(path.length > 2) {
		if(!inf.rec) throw "Can't access " + path.join(".");
		{
			var _g1 = 2, _g = path.length;
			while(_g1 < _g) {
				var i = _g1++;
				o = m;
				m = Reflect.field(o,path[i]);
			}
		}
	}
	if(!Reflect.isFunction(m)) throw "No such method " + path.join(".");
	return m.apply(o,params);
}
haxe.remoting.Context.prototype.objects = null;
haxe.remoting.Context.prototype.__class__ = haxe.remoting.Context;
Std = function() { }
Std.__name__ = ["Std"];
Std["is"] = function(v,t) {
	return js.Boot.__instanceof(v,t);
}
Std.string = function(s) {
	return js.Boot.__string_rec(s,"");
}
Std["int"] = function(x) {
	if(x < 0) return Math.ceil(x);
	return Math.floor(x);
}
Std.parseInt = function(x) {
	var v = parseInt(x);
	if(Math.isNaN(v)) return null;
	return v;
}
Std.parseFloat = function(x) {
	return parseFloat(x);
}
Std.random = function(x) {
	return Math.floor(Math.random() * x);
}
Std.prototype.__class__ = Std;
SaveMapResult = { __ename__ : ["SaveMapResult"], __constructs__ : ["success","attemptChangeRoot","errorSavingDB"] }
SaveMapResult.attemptChangeRoot = ["attemptChangeRoot",1];
SaveMapResult.attemptChangeRoot.toString = $estr;
SaveMapResult.attemptChangeRoot.__enum__ = SaveMapResult;
SaveMapResult.errorSavingDB = function(e) { var $x = ["errorSavingDB",2,e]; $x.__enum__ = SaveMapResult; $x.toString = $estr; return $x; }
SaveMapResult.success = function(ids,desc) { var $x = ["success",0,ids,desc]; $x.__enum__ = SaveMapResult; $x.toString = $estr; return $x; }
KeepAliveResult = { __ename__ : ["KeepAliveResult"], __constructs__ : ["none","some","tooMuchData","error"] }
KeepAliveResult.error = function(msg,code) { var $x = ["error",3,msg,code]; $x.__enum__ = KeepAliveResult; $x.toString = $estr; return $x; }
KeepAliveResult.none = ["none",0];
KeepAliveResult.none.toString = $estr;
KeepAliveResult.none.__enum__ = KeepAliveResult;
KeepAliveResult.some = function(commands) { var $x = ["some",1,commands]; $x.__enum__ = KeepAliveResult; $x.toString = $estr; return $x; }
KeepAliveResult.tooMuchData = ["tooMuchData",2];
KeepAliveResult.tooMuchData.toString = $estr;
KeepAliveResult.tooMuchData.__enum__ = KeepAliveResult;
RegistrationKeyCheckResult = { __ename__ : ["RegistrationKeyCheckResult"], __constructs__ : ["valid","invalid","existing"] }
RegistrationKeyCheckResult.existing = ["existing",2];
RegistrationKeyCheckResult.existing.toString = $estr;
RegistrationKeyCheckResult.existing.__enum__ = RegistrationKeyCheckResult;
RegistrationKeyCheckResult.invalid = ["invalid",1];
RegistrationKeyCheckResult.invalid.toString = $estr;
RegistrationKeyCheckResult.invalid.__enum__ = RegistrationKeyCheckResult;
RegistrationKeyCheckResult.valid = function(nickname) { var $x = ["valid",0,nickname]; $x.__enum__ = RegistrationKeyCheckResult; $x.toString = $estr; return $x; }
ImportFormat = { __ename__ : ["ImportFormat"], __constructs__ : ["comap","mindmanager","freemind","opml"] }
ImportFormat.comap = ["comap",0];
ImportFormat.comap.toString = $estr;
ImportFormat.comap.__enum__ = ImportFormat;
ImportFormat.freemind = ["freemind",2];
ImportFormat.freemind.toString = $estr;
ImportFormat.freemind.__enum__ = ImportFormat;
ImportFormat.mindmanager = ["mindmanager",1];
ImportFormat.mindmanager.toString = $estr;
ImportFormat.mindmanager.__enum__ = ImportFormat;
ImportFormat.opml = ["opml",3];
ImportFormat.opml.toString = $estr;
ImportFormat.opml.__enum__ = ImportFormat;
ExportFormat = { __ename__ : ["ExportFormat"], __constructs__ : ["comap","mindmanager","html_bullets","html_layout","rtf","freemind","mpx","csv_semicolomn","csv_comma","csv_tab","csv_space","opml","svg","pdf"] }
ExportFormat.comap = ["comap",0];
ExportFormat.comap.toString = $estr;
ExportFormat.comap.__enum__ = ExportFormat;
ExportFormat.csv_comma = ["csv_comma",8];
ExportFormat.csv_comma.toString = $estr;
ExportFormat.csv_comma.__enum__ = ExportFormat;
ExportFormat.csv_semicolomn = ["csv_semicolomn",7];
ExportFormat.csv_semicolomn.toString = $estr;
ExportFormat.csv_semicolomn.__enum__ = ExportFormat;
ExportFormat.csv_space = ["csv_space",10];
ExportFormat.csv_space.toString = $estr;
ExportFormat.csv_space.__enum__ = ExportFormat;
ExportFormat.csv_tab = ["csv_tab",9];
ExportFormat.csv_tab.toString = $estr;
ExportFormat.csv_tab.__enum__ = ExportFormat;
ExportFormat.freemind = ["freemind",5];
ExportFormat.freemind.toString = $estr;
ExportFormat.freemind.__enum__ = ExportFormat;
ExportFormat.html_bullets = ["html_bullets",2];
ExportFormat.html_bullets.toString = $estr;
ExportFormat.html_bullets.__enum__ = ExportFormat;
ExportFormat.html_layout = ["html_layout",3];
ExportFormat.html_layout.toString = $estr;
ExportFormat.html_layout.__enum__ = ExportFormat;
ExportFormat.mindmanager = ["mindmanager",1];
ExportFormat.mindmanager.toString = $estr;
ExportFormat.mindmanager.__enum__ = ExportFormat;
ExportFormat.mpx = ["mpx",6];
ExportFormat.mpx.toString = $estr;
ExportFormat.mpx.__enum__ = ExportFormat;
ExportFormat.opml = ["opml",11];
ExportFormat.opml.toString = $estr;
ExportFormat.opml.__enum__ = ExportFormat;
ExportFormat.pdf = ["pdf",13];
ExportFormat.pdf.toString = $estr;
ExportFormat.pdf.__enum__ = ExportFormat;
ExportFormat.rtf = ["rtf",4];
ExportFormat.rtf.toString = $estr;
ExportFormat.rtf.__enum__ = ExportFormat;
ExportFormat.svg = ["svg",12];
ExportFormat.svg.toString = $estr;
ExportFormat.svg.__enum__ = ExportFormat;
SpellingErrorStatus = { __ename__ : ["SpellingErrorStatus"], __constructs__ : ["normal","replaced","skipped"] }
SpellingErrorStatus.normal = ["normal",0];
SpellingErrorStatus.normal.toString = $estr;
SpellingErrorStatus.normal.__enum__ = SpellingErrorStatus;
SpellingErrorStatus.replaced = ["replaced",1];
SpellingErrorStatus.replaced.toString = $estr;
SpellingErrorStatus.replaced.__enum__ = SpellingErrorStatus;
SpellingErrorStatus.skipped = ["skipped",2];
SpellingErrorStatus.skipped.toString = $estr;
SpellingErrorStatus.skipped.__enum__ = SpellingErrorStatus;
LoginMethod = { __ename__ : ["LoginMethod"], __constructs__ : ["joomlaCookie","flashCookie","simple","withSalt","simpleWithRegKey","withSaltAndRegKey","registrationKey","ldap","notifier"] }
LoginMethod.flashCookie = function(email,md5Password) { var $x = ["flashCookie",1,email,md5Password]; $x.__enum__ = LoginMethod; $x.toString = $estr; return $x; }
LoginMethod.joomlaCookie = ["joomlaCookie",0];
LoginMethod.joomlaCookie.toString = $estr;
LoginMethod.joomlaCookie.__enum__ = LoginMethod;
LoginMethod.ldap = function(email,clearPassword) { var $x = ["ldap",7,email,clearPassword]; $x.__enum__ = LoginMethod; $x.toString = $estr; return $x; }
LoginMethod.notifier = function(email,Id) { var $x = ["notifier",8,email,Id]; $x.__enum__ = LoginMethod; $x.toString = $estr; return $x; }
LoginMethod.registrationKey = function(email,key) { var $x = ["registrationKey",6,email,key]; $x.__enum__ = LoginMethod; $x.toString = $estr; return $x; }
LoginMethod.simple = function(email,md5Password,remember) { var $x = ["simple",2,email,md5Password,remember]; $x.__enum__ = LoginMethod; $x.toString = $estr; return $x; }
LoginMethod.simpleWithRegKey = function(email,md5Password,remember,regKey,map) { var $x = ["simpleWithRegKey",4,email,md5Password,remember,regKey,map]; $x.__enum__ = LoginMethod; $x.toString = $estr; return $x; }
LoginMethod.withSalt = function(email,hash,remember) { var $x = ["withSalt",3,email,hash,remember]; $x.__enum__ = LoginMethod; $x.toString = $estr; return $x; }
LoginMethod.withSaltAndRegKey = function(email,hash,remember,regKey,map) { var $x = ["withSaltAndRegKey",5,email,hash,remember,regKey,map]; $x.__enum__ = LoginMethod; $x.toString = $estr; return $x; }
ServerLoginResult = { __ename__ : ["ServerLoginResult"], __constructs__ : ["ok","needhash","invalidCredentials"] }
ServerLoginResult.invalidCredentials = ["invalidCredentials",2];
ServerLoginResult.invalidCredentials.toString = $estr;
ServerLoginResult.invalidCredentials.__enum__ = ServerLoginResult;
ServerLoginResult.needhash = function(salt) { var $x = ["needhash",1,salt]; $x.__enum__ = ServerLoginResult; $x.toString = $estr; return $x; }
ServerLoginResult.ok = function(loginData) { var $x = ["ok",0,loginData]; $x.__enum__ = ServerLoginResult; $x.toString = $estr; return $x; }
SignUpResult = { __ename__ : ["SignUpResult"], __constructs__ : ["ok","emailExists","wrongKey"] }
SignUpResult.emailExists = ["emailExists",1];
SignUpResult.emailExists.toString = $estr;
SignUpResult.emailExists.__enum__ = SignUpResult;
SignUpResult.ok = ["ok",0];
SignUpResult.ok.toString = $estr;
SignUpResult.ok.__enum__ = SignUpResult;
SignUpResult.wrongKey = ["wrongKey",2];
SignUpResult.wrongKey.toString = $estr;
SignUpResult.wrongKey.__enum__ = SignUpResult;
SignUpMethod = { __ename__ : ["SignUpMethod"], __constructs__ : ["regKey","simple"] }
SignUpMethod.regKey = function(key) { var $x = ["regKey",0,key]; $x.__enum__ = SignUpMethod; $x.toString = $estr; return $x; }
SignUpMethod.simple = ["simple",1];
SignUpMethod.simple.toString = $estr;
SignUpMethod.simple.__enum__ = SignUpMethod;
List = function(p) { if( p === $_ ) return; {
	this.length = 0;
}}
List.__name__ = ["List"];
List.prototype.add = function(item) {
	var x = [item];
	if(this.h == null) this.h = x;
	else this.q[1] = x;
	this.q = x;
	this.length++;
}
List.prototype.clear = function() {
	this.h = null;
	this.q = null;
	this.length = 0;
}
List.prototype.filter = function(f) {
	var l2 = new List();
	var l = this.h;
	while(l != null) {
		var v = l[0];
		l = l[1];
		if(f(v)) l2.add(v);
	}
	return l2;
}
List.prototype.first = function() {
	return (this.h == null?null:this.h[0]);
}
List.prototype.h = null;
List.prototype.isEmpty = function() {
	return (this.h == null);
}
List.prototype.iterator = function() {
	return { h : this.h, hasNext : function() {
		return (this.h != null);
	}, next : function() {
		if(this.h == null) return null;
		var x = this.h[0];
		this.h = this.h[1];
		return x;
	}}
}
List.prototype.join = function(sep) {
	var s = new StringBuf();
	var first = true;
	var l = this.h;
	while(l != null) {
		if(first) first = false;
		else s.b[s.b.length] = sep;
		s.b[s.b.length] = l[0];
		l = l[1];
	}
	return s.b.join("");
}
List.prototype.last = function() {
	return (this.q == null?null:this.q[0]);
}
List.prototype.length = null;
List.prototype.map = function(f) {
	var b = new List();
	var l = this.h;
	while(l != null) {
		var v = l[0];
		l = l[1];
		b.add(f(v));
	}
	return b;
}
List.prototype.pop = function() {
	if(this.h == null) return null;
	var x = this.h[0];
	this.h = this.h[1];
	if(this.h == null) this.q = null;
	this.length--;
	return x;
}
List.prototype.push = function(item) {
	var x = [item,this.h];
	this.h = x;
	if(this.q == null) this.q = x;
	this.length++;
}
List.prototype.q = null;
List.prototype.remove = function(v) {
	var prev = null;
	var l = this.h;
	while(l != null) {
		if(l[0] == v) {
			if(prev == null) this.h = l[1];
			else prev[1] = l[1];
			if(this.q == l) this.q = prev;
			this.length--;
			return true;
		}
		prev = l;
		l = l[1];
	}
	return false;
}
List.prototype.toString = function() {
	var s = new StringBuf();
	var first = true;
	var l = this.h;
	s.b[s.b.length] = "{";
	while(l != null) {
		if(first) first = false;
		else s.b[s.b.length] = ", ";
		s.b[s.b.length] = Std.string(l[0]);
		l = l[1];
	}
	s.b[s.b.length] = "}";
	return s.b.join("");
}
List.prototype.__class__ = List;
connect.ClientProxy = function(c) { if( c === $_ ) return; {
	connect.Remoting_ProxiedConnectionClient.apply(this,[c]);
}}
connect.ClientProxy.__name__ = ["connect","ClientProxy"];
connect.ClientProxy.__super__ = connect.Remoting_ProxiedConnectionClient;
for(var k in connect.Remoting_ProxiedConnectionClient.prototype ) connect.ClientProxy.prototype[k] = connect.Remoting_ProxiedConnectionClient.prototype[k];
connect.ClientProxy.prototype.__class__ = connect.ClientProxy;
connect.ProxiedConnectionServer = function(p) { if( p === $_ ) return; {
	this.cnx = null;
	this.clientProxy = null;
	this.logoutData = null;
	this.trialStatistics = null;
	haxe.Log.trace = function(v,infos) {
		var posInfos = (null != infos?((infos.fileName + ":") + infos.lineNumber) + ":\n":"");
		js.Lib.alert(posInfos + Std.string(v));
	}
	this.savedHash = null;
}}
connect.ProxiedConnectionServer.__name__ = ["connect","ProxiedConnectionServer"];
connect.ProxiedConnectionServer.connection = null;
connect.ProxiedConnectionServer.main = function() {
	var ctx = new haxe.remoting.Context();
	ctx.addObject("proxiedConnectionServerInstance",connect.ProxiedConnectionServer.instance);
	connect.ProxiedConnectionServer.connection = haxe.remoting.ExternalConnection.flashConnect(connect.FlashJsConnectionProtocol.CONNECTION_NAME,connect.FlashJsConnectionProtocol.FLASH_ID,ctx);
}
connect.ProxiedConnectionServer.prototype.addBookmark = function(title,browser) {
	var url = js.Lib.document.location;
	switch(browser) {
	case "Explorer":{
		js.Lib.window.external.AddFavorite(url,title);
	}break;
	default:{
		js.Lib.alert("Unfortunately, your browser does not allow to bookmark this map automatically for you.\nTo bookmark it, just bookmark the current page in your browser as you normally do.");
	}break;
	}
}
connect.ProxiedConnectionServer.prototype.checkSkype = function() {
	var navigator = js.Lib.window.navigator;
	var activex = ((navigator.userAgent.indexOf("Win") != -1) && (navigator.userAgent.indexOf("MSIE") != -1) && (Std.parseInt(navigator.appVersion) >= 4));
	var CantDetect = ((navigator.userAgent.indexOf("Safari") != -1) || (navigator.userAgent.indexOf("Opera") != -1));
	var detected = null;
	if(detected == null && activex) {
		js.Lib.document.write(["<script language=\"VBscript\">","Function isSkypeInstalled()","on error resume next","Set oSkype = CreateObject(\"Skype.Detection\")","isSkypeInstalled = IsObject(oSkype)","Set oSkype = nothing","End Function","</script>"].join("\n"));
	}
	if(CantDetect) {
		return true;
	}
	else if(!activex) {
		var skypeMime = navigator.mimeTypes["application/x-skype"];
		detected = true;
		if(skypeMime != null) {
			return true;
		}
		else {
			return false;
		}
	}
	else {
		if(isSkypeInstalled()) {
			detected = true;
			return true;
		}
		return false;
	}
	return false;
}
connect.ProxiedConnectionServer.prototype.clientProxy = null;
connect.ProxiedConnectionServer.prototype.cnx = null;
connect.ProxiedConnectionServer.prototype.doAutosave = function() {
	this.clientProxy.doAutosave();
}
connect.ProxiedConnectionServer.prototype.doLogout = function() {
	if(null != this.logoutData) {
		this.sendDirectRequest("logout",this.logoutData.params,false);
	}
}
connect.ProxiedConnectionServer.prototype.doRecordTrialStatistics = function() {
	if(null != this.trialStatistics) {
		this.sendDirectRequest("recordTrialStatistics",this.trialStatistics.params,false);
	}
}
connect.ProxiedConnectionServer.prototype.genHash = function(h) {
	var hash = [];
	{
		var _g = 0, _g1 = Reflect.fields(h);
		while(_g < _g1.length) {
			var f = _g1[_g];
			++_g;
			hash.push((f + "=") + Reflect.field(h,f));
		}
	}
	return hash.join("&");
}
connect.ProxiedConnectionServer.prototype.getCookies = function() {
	return js.Cookie.all();
	return null;
}
connect.ProxiedConnectionServer.prototype.getWordPosition = function(str,word) {
	str = (" " + str) + " ";
	var regExp = new EReg(("\\W" + word) + "\\W","");
	return (regExp.match(str)?regExp.matchedPos().pos:-1);
	return -1;
}
connect.ProxiedConnectionServer.prototype.handleFocusLost = function() {
	this.clientProxy.handleFocusLost();
}
connect.ProxiedConnectionServer.prototype.hasFocus = function() {
	return (document.hasFocus());
	return true;
}
connect.ProxiedConnectionServer.prototype.initConnection = function(url,version,objectId) {
	this.url = url;
	if(null == this.cnx) {
		this.cnx = haxe.remoting.HttpAsyncConnection.urlConnect(url);
	}
	this.setBohrConnection(connect.ProxiedConnectionServer.connection);
	return version == Protocol.version;
}
connect.ProxiedConnectionServer.prototype.invoke = function(id,path,params) {
	var cn = this.cnx;
	{
		var _g = 0;
		while(_g < path.length) {
			var item = path[_g];
			++_g;
			cn = cn.resolve(item);
		}
	}
	var me = this;
	cn.setErrorHandler(function(e) {
		me.reportError(e,id);
	});
	var doCall = function(f,a1,a2) {
		return function() {
			return f(a1,a2);
		}
	}($closure(cn,"call"),params,function(res) {
		me.reportData(res,id);
	});
	doCall();
	return;
}
connect.ProxiedConnectionServer.prototype.logoutData = null;
connect.ProxiedConnectionServer.prototype.makeRequestData = function(path,params) {
	return (null != path && null != params?{ path : path, params : params}:null);
}
connect.ProxiedConnectionServer.prototype.notifyAboutUnload = function() {
	this.clientProxy.notifyAboutUnload();
}
connect.ProxiedConnectionServer.prototype.notifyMouseWheelListeners = function(delta) {
	this.clientProxy.notifyMouseWheelListeners(delta);
}
connect.ProxiedConnectionServer.prototype.onFocus = function() {
	if(this.clientProxy != null && this.savedHash != null && this.savedHash != js.Lib.window.location.hash) {
		this.clientProxy.handleHashChange(this.parseHash(js.Lib.window.location.hash));
		this.saveHash();
	}
}
connect.ProxiedConnectionServer.prototype.parseHash = function(hash) {
	if(hash.length > 0 && hash.charAt(0) == "#") {
		hash = hash.substr(1);
	}
	var params = hash.split("&");
	var result = { }
	{
		var _g = 0;
		while(_g < params.length) {
			var i = params[_g];
			++_g;
			if("" != i) {
				var pair = i.split("=");
				result[pair[0]] = pair[1];
			}
		}
	}
	return result;
}
connect.ProxiedConnectionServer.prototype.refreshFlash = function() {
	js.Lib.window.location.reload(true);
}
connect.ProxiedConnectionServer.prototype.reportData = function(data,id) {
	try {
		if(null != id) this.clientProxy.handleResult(data,id);
	}
	catch( $e11 ) {
		{
			var e = $e11;
			null;
		}
	}
}
connect.ProxiedConnectionServer.prototype.reportError = function(error,id) {
	try {
		if(null != id) this.clientProxy.handleError(error,id);
	}
	catch( $e12 ) {
		{
			var e = $e12;
			null;
		}
	}
}
connect.ProxiedConnectionServer.prototype.saveHash = function() {
	this.savedHash = js.Lib.window.location.hash;
}
connect.ProxiedConnectionServer.prototype.savedHash = null;
connect.ProxiedConnectionServer.prototype.sendDirectRequest = function(action,params,post) {
	try {
		var h = new haxe.Http(this.url);
		h.setParameter("action",action);
		h.setParameter("requestData",haxe.Serializer.run(params));
		h["async"] = false;
		h.request(post);
	}
	catch( $e13 ) {
		{
			var e = $e13;
			null;
		}
	}
}
connect.ProxiedConnectionServer.prototype.setBohrConnection = function(conn) {
	if(null == this.clientProxy) {
		this.clientProxy = new connect.ClientProxy(conn.resolve("externalProxyInstance"));
	}
	this.timer = new haxe.Timer(1000);
	var me = this;
	this.timer.run = function() {
		me.onFocus();
		if(js.Lib.isIE && !(document.hasFocus())) {
			me.handleFocusLost();
		}
	}
}
connect.ProxiedConnectionServer.prototype.setCookie = function(name,value,expireDelay) {
	js.Cookie.set(name,value,expireDelay);
}
connect.ProxiedConnectionServer.prototype.setLogoutData = function(path,params) {
	this.logoutData = this.makeRequestData(path,params);
}
connect.ProxiedConnectionServer.prototype.setTrialStatistics = function(path,params) {
	this.trialStatistics = this.makeRequestData(path,params);
}
connect.ProxiedConnectionServer.prototype.setUrlParam = function(param,value) {
	var hash = js.Lib.window.location.hash;
	var params = this.parseHash(hash);
	if(value == null) {
		Reflect.deleteField(params,param);
	}
	else {
		params[param] = value;
	}
	var result = this.genHash(params);
	if(result.length > 0) {
		js.Lib.window.location.hash = result;
	}
	else if(js.Lib.window.location.hash.length > 0) {
		js.Lib.window.location.hash = "#";
	}
	this.saveHash();
}
connect.ProxiedConnectionServer.prototype.timer = null;
connect.ProxiedConnectionServer.prototype.trialStatistics = null;
connect.ProxiedConnectionServer.prototype.url = null;
connect.ProxiedConnectionServer.prototype.__class__ = connect.ProxiedConnectionServer;
haxe.Serializer = function(p) { if( p === $_ ) return; {
	this.buf = new StringBuf();
	this.cache = new Array();
	this.useCache = haxe.Serializer.USE_CACHE;
	this.useEnumIndex = haxe.Serializer.USE_ENUM_INDEX;
	this.shash = new Hash();
	this.scount = 0;
}}
haxe.Serializer.__name__ = ["haxe","Serializer"];
haxe.Serializer.run = function(v) {
	var s = new haxe.Serializer();
	s.serialize(v);
	return s.toString();
}
haxe.Serializer.prototype.buf = null;
haxe.Serializer.prototype.cache = null;
haxe.Serializer.prototype.scount = null;
haxe.Serializer.prototype.serialize = function(v) {
	var $e = (Type["typeof"](v));
	switch( $e[1] ) {
	case 0:
	{
		this.buf.add("n");
	}break;
	case 1:
	{
		if(v == 0) {
			this.buf.add("z");
			return;
		}
		this.buf.add("i");
		this.buf.add(v);
	}break;
	case 2:
	{
		if(Math.isNaN(v)) this.buf.add("k");
		else if(!Math.isFinite(v)) this.buf.add((v < 0?"m":"p"));
		else {
			this.buf.add("d");
			this.buf.add(v);
		}
	}break;
	case 3:
	{
		this.buf.add((v?"t":"f"));
	}break;
	case 6:
	var c = $e[2];
	{
		if(c == String) {
			this.serializeString(v);
			return;
		}
		if(this.useCache && this.serializeRef(v)) return;
		switch(c) {
		case Array:{
			var ucount = 0;
			this.buf.add("a");
			var l = v["length"];
			{
				var _g = 0;
				while(_g < l) {
					var i = _g++;
					if(v[i] == null) ucount++;
					else {
						if(ucount > 0) {
							if(ucount == 1) this.buf.add("n");
							else {
								this.buf.add("u");
								this.buf.add(ucount);
							}
							ucount = 0;
						}
						this.serialize(v[i]);
					}
				}
			}
			if(ucount > 0) {
				if(ucount == 1) this.buf.add("n");
				else {
					this.buf.add("u");
					this.buf.add(ucount);
				}
			}
			this.buf.add("h");
		}break;
		case List:{
			this.buf.add("l");
			var v1 = v;
			{ var $it14 = v1.iterator();
			while( $it14.hasNext() ) { var i = $it14.next();
			this.serialize(i);
			}}
			this.buf.add("h");
		}break;
		case Date:{
			var d = v;
			this.buf.add("v");
			this.buf.add(d.toString());
		}break;
		case Hash:{
			this.buf.add("b");
			var v1 = v;
			{ var $it15 = v1.keys();
			while( $it15.hasNext() ) { var k = $it15.next();
			{
				this.serializeString(k);
				this.serialize(v1.get(k));
			}
			}}
			this.buf.add("h");
		}break;
		case IntHash:{
			this.buf.add("q");
			var v1 = v;
			{ var $it16 = v1.keys();
			while( $it16.hasNext() ) { var k = $it16.next();
			{
				this.buf.add(":");
				this.buf.add(k);
				this.serialize(v1.get(k));
			}
			}}
			this.buf.add("h");
		}break;
		case haxe.io.Bytes:{
			var v1 = v;
			var i = 0;
			var max = v1.length - 2;
			var chars = "";
			var b64 = haxe.Serializer.BASE64;
			while(i < max) {
				var b1 = v1.b[i++];
				var b2 = v1.b[i++];
				var b3 = v1.b[i++];
				chars += ((b64.charAt(b1 >> 2) + b64.charAt(((b1 << 4) | (b2 >> 4)) & 63)) + b64.charAt(((b2 << 2) | (b3 >> 6)) & 63)) + b64.charAt(b3 & 63);
			}
			if(i == max) {
				var b1 = v1.b[i++];
				var b2 = v1.b[i++];
				chars += (b64.charAt(b1 >> 2) + b64.charAt(((b1 << 4) | (b2 >> 4)) & 63)) + b64.charAt((b2 << 2) & 63);
			}
			else if(i == max + 1) {
				var b1 = v1.b[i++];
				chars += b64.charAt(b1 >> 2) + b64.charAt((b1 << 4) & 63);
			}
			this.buf.add("s");
			this.buf.add(chars.length);
			this.buf.add(":");
			this.buf.add(chars);
		}break;
		default:{
			this.cache.pop();
			this.buf.add("c");
			this.serializeString(Type.getClassName(c));
			this.cache.push(v);
			this.serializeFields(v);
		}break;
		}
	}break;
	case 4:
	{
		if(this.useCache && this.serializeRef(v)) return;
		this.buf.add("o");
		this.serializeFields(v);
	}break;
	case 7:
	var e = $e[2];
	{
		if(this.useCache && this.serializeRef(v)) return;
		this.cache.pop();
		this.buf.add((this.useEnumIndex?"j":"w"));
		this.serializeString(Type.getEnumName(e));
		if(this.useEnumIndex) {
			this.buf.add(":");
			this.buf.add(v[1]);
		}
		else this.serializeString(v[0]);
		this.buf.add(":");
		var l = v["length"];
		this.buf.add(l - 2);
		{
			var _g = 2;
			while(_g < l) {
				var i = _g++;
				this.serialize(v[i]);
			}
		}
		this.cache.push(v);
	}break;
	case 5:
	{
		throw "Cannot serialize function";
	}break;
	default:{
		throw "Cannot serialize " + Std.string(v);
	}break;
	}
}
haxe.Serializer.prototype.serializeException = function(e) {
	this.buf.add("x");
	this.serialize(e);
}
haxe.Serializer.prototype.serializeFields = function(v) {
	{
		var _g = 0, _g1 = Reflect.fields(v);
		while(_g < _g1.length) {
			var f = _g1[_g];
			++_g;
			this.serializeString(f);
			this.serialize(Reflect.field(v,f));
		}
	}
	this.buf.add("g");
}
haxe.Serializer.prototype.serializeRef = function(v) {
	var vt = typeof(v);
	{
		var _g1 = 0, _g = this.cache.length;
		while(_g1 < _g) {
			var i = _g1++;
			var ci = this.cache[i];
			if(typeof(ci) == vt && ci == v) {
				this.buf.add("r");
				this.buf.add(i);
				return true;
			}
		}
	}
	this.cache.push(v);
	return false;
}
haxe.Serializer.prototype.serializeString = function(s) {
	var x = this.shash.get(s);
	if(x != null) {
		this.buf.add("R");
		this.buf.add(x);
		return;
	}
	this.shash.set(s,this.scount++);
	this.buf.add("y");
	s = StringTools.urlEncode(s);
	this.buf.add(s.length);
	this.buf.add(":");
	this.buf.add(s);
}
haxe.Serializer.prototype.shash = null;
haxe.Serializer.prototype.toString = function() {
	return this.buf.b.join("");
}
haxe.Serializer.prototype.useCache = null;
haxe.Serializer.prototype.useEnumIndex = null;
haxe.Serializer.prototype.__class__ = haxe.Serializer;
connect.FlashJsConnectionProtocol = function() { }
connect.FlashJsConnectionProtocol.__name__ = ["connect","FlashJsConnectionProtocol"];
connect.FlashJsConnectionProtocol.prototype.__class__ = connect.FlashJsConnectionProtocol;
haxe.Http = function(url) { if( url === $_ ) return; {
	this.url = url;
	this.headers = new Hash();
	this.params = new Hash();
	this.async = true;
}}
haxe.Http.__name__ = ["haxe","Http"];
haxe.Http.requestUrl = function(url) {
	var h = new haxe.Http(url);
	h.async = false;
	var r = null;
	h.onData = function(d) {
		r = d;
	}
	h.onError = function(e) {
		throw e;
	}
	h.request(false);
	return r;
}
haxe.Http.prototype.async = null;
haxe.Http.prototype.headers = null;
haxe.Http.prototype.onData = function(data) {
	null;
}
haxe.Http.prototype.onError = function(msg) {
	null;
}
haxe.Http.prototype.onStatus = function(status) {
	null;
}
haxe.Http.prototype.params = null;
haxe.Http.prototype.postData = null;
haxe.Http.prototype.request = function(post) {
	var me = this;
	var r = new js.XMLHttpRequest();
	var onreadystatechange = function() {
		if(r.readyState != 4) return;
		var s = (function($this) {
			var $r;
			try {
				$r = r.status;
			}
			catch( $e17 ) {
				{
					var e = $e17;
					$r = null;
				}
			}
			return $r;
		}(this));
		if(s == undefined) s = null;
		if(s != null) me.onStatus(s);
		if(s != null && s >= 200 && s < 400) me.onData(r.responseText);
		else switch(s) {
		case null:{
			me.onError("Failed to connect or resolve host");
		}break;
		case 12029:{
			me.onError("Failed to connect to host");
		}break;
		case 12007:{
			me.onError("Unknown host");
		}break;
		default:{
			me.onError("Http Error #" + r.status);
		}break;
		}
	}
	if(this.async) r.onreadystatechange = onreadystatechange;
	var uri = this.postData;
	if(uri != null) post = true;
	else { var $it18 = this.params.keys();
	while( $it18.hasNext() ) { var p = $it18.next();
	{
		if(uri == null) uri = "";
		else uri += "&";
		uri += (StringTools.urlDecode(p) + "=") + StringTools.urlEncode(this.params.get(p));
	}
	}}
	try {
		if(post) r.open("POST",this.url,this.async);
		else if(uri != null) {
			var question = this.url.split("?").length <= 1;
			r.open("GET",(this.url + ((question?"?":"&"))) + uri,this.async);
			uri = null;
		}
		else r.open("GET",this.url,this.async);
	}
	catch( $e19 ) {
		{
			var e = $e19;
			{
				this.onError(e.toString());
				return;
			}
		}
	}
	if(this.headers.get("Content-Type") == null && post && this.postData == null) r.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	{ var $it20 = this.headers.keys();
	while( $it20.hasNext() ) { var h = $it20.next();
	r.setRequestHeader(h,this.headers.get(h));
	}}
	r.send(uri);
	if(!this.async) onreadystatechange();
}
haxe.Http.prototype.setHeader = function(header,value) {
	this.headers.set(header,value);
}
haxe.Http.prototype.setParameter = function(param,value) {
	this.params.set(param,value);
}
haxe.Http.prototype.setPostData = function(data) {
	this.postData = data;
}
haxe.Http.prototype.url = null;
haxe.Http.prototype.__class__ = haxe.Http;
ValueType = { __ename__ : ["ValueType"], __constructs__ : ["TNull","TInt","TFloat","TBool","TObject","TFunction","TClass","TEnum","TUnknown"] }
ValueType.TBool = ["TBool",3];
ValueType.TBool.toString = $estr;
ValueType.TBool.__enum__ = ValueType;
ValueType.TClass = function(c) { var $x = ["TClass",6,c]; $x.__enum__ = ValueType; $x.toString = $estr; return $x; }
ValueType.TEnum = function(e) { var $x = ["TEnum",7,e]; $x.__enum__ = ValueType; $x.toString = $estr; return $x; }
ValueType.TFloat = ["TFloat",2];
ValueType.TFloat.toString = $estr;
ValueType.TFloat.__enum__ = ValueType;
ValueType.TFunction = ["TFunction",5];
ValueType.TFunction.toString = $estr;
ValueType.TFunction.__enum__ = ValueType;
ValueType.TInt = ["TInt",1];
ValueType.TInt.toString = $estr;
ValueType.TInt.__enum__ = ValueType;
ValueType.TNull = ["TNull",0];
ValueType.TNull.toString = $estr;
ValueType.TNull.__enum__ = ValueType;
ValueType.TObject = ["TObject",4];
ValueType.TObject.toString = $estr;
ValueType.TObject.__enum__ = ValueType;
ValueType.TUnknown = ["TUnknown",8];
ValueType.TUnknown.toString = $estr;
ValueType.TUnknown.__enum__ = ValueType;
if(typeof js=='undefined') js = {}
js.Lib = function() { }
js.Lib.__name__ = ["js","Lib"];
js.Lib.isIE = null;
js.Lib.isOpera = null;
js.Lib.document = null;
js.Lib.window = null;
js.Lib.alert = function(v) {
	alert(js.Boot.__string_rec(v,""));
}
js.Lib.eval = function(code) {
	return eval(code);
}
js.Lib.setErrorHandler = function(f) {
	js.Lib.onerror = f;
}
js.Lib.prototype.__class__ = js.Lib;
js.Boot = function() { }
js.Boot.__name__ = ["js","Boot"];
js.Boot.__unhtml = function(s) {
	return s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;");
}
js.Boot.__trace = function(v,i) {
	var msg = (i != null?((i.fileName + ":") + i.lineNumber) + ": ":"");
	msg += js.Boot.__unhtml(js.Boot.__string_rec(v,"")) + "<br/>";
	var d = document.getElementById("haxe:trace");
	if(d == null) alert("No haxe:trace element defined\n" + msg);
	else d.innerHTML += msg;
}
js.Boot.__clear_trace = function() {
	var d = document.getElementById("haxe:trace");
	if(d != null) d.innerHTML = "";
	else null;
}
js.Boot.__closure = function(o,f) {
	var m = o[f];
	if(m == null) return null;
	var f1 = function() {
		return m.apply(o,arguments);
	}
	f1.scope = o;
	f1.method = m;
	return f1;
}
js.Boot.__string_rec = function(o,s) {
	if(o == null) return "null";
	if(s.length >= 5) return "<...>";
	var t = typeof(o);
	if(t == "function" && (o.__name__ != null || o.__ename__ != null)) t = "object";
	switch(t) {
	case "object":{
		if(o instanceof Array) {
			if(o.__enum__ != null) {
				if(o.length == 2) return o[0];
				var str = o[0] + "(";
				s += "\t";
				{
					var _g1 = 2, _g = o.length;
					while(_g1 < _g) {
						var i = _g1++;
						if(i != 2) str += "," + js.Boot.__string_rec(o[i],s);
						else str += js.Boot.__string_rec(o[i],s);
					}
				}
				return str + ")";
			}
			var l = o.length;
			var i;
			var str = "[";
			s += "\t";
			{
				var _g = 0;
				while(_g < l) {
					var i1 = _g++;
					str += ((i1 > 0?",":"")) + js.Boot.__string_rec(o[i1],s);
				}
			}
			str += "]";
			return str;
		}
		var tostr;
		try {
			tostr = o.toString;
		}
		catch( $e21 ) {
			{
				var e = $e21;
				{
					return "???";
				}
			}
		}
		if(tostr != null && tostr != Object.toString) {
			var s2 = o.toString();
			if(s2 != "[object Object]") return s2;
		}
		var k = null;
		var str = "{\n";
		s += "\t";
		var hasp = (o.hasOwnProperty != null);
		for( var k in o ) { ;
		if(hasp && !o.hasOwnProperty(k)) continue;
		if(k == "prototype" || k == "__class__" || k == "__super__" || k == "__interfaces__") continue;
		if(str.length != 2) str += ", \n";
		str += ((s + k) + " : ") + js.Boot.__string_rec(o[k],s);
		}
		s = s.substring(1);
		str += ("\n" + s) + "}";
		return str;
	}break;
	case "function":{
		return "<function>";
	}break;
	case "string":{
		return o;
	}break;
	default:{
		return String(o);
	}break;
	}
}
js.Boot.__interfLoop = function(cc,cl) {
	if(cc == null) return false;
	if(cc == cl) return true;
	var intf = cc.__interfaces__;
	if(intf != null) {
		var _g1 = 0, _g = intf.length;
		while(_g1 < _g) {
			var i = _g1++;
			var i1 = intf[i];
			if(i1 == cl || js.Boot.__interfLoop(i1,cl)) return true;
		}
	}
	return js.Boot.__interfLoop(cc.__super__,cl);
}
js.Boot.__instanceof = function(o,cl) {
	try {
		if(o instanceof cl) {
			if(cl == Array) return (o.__enum__ == null);
			return true;
		}
		if(js.Boot.__interfLoop(o.__class__,cl)) return true;
	}
	catch( $e22 ) {
		{
			var e = $e22;
			{
				if(cl == null) return false;
			}
		}
	}
	switch(cl) {
	case Int:{
		return Math.ceil(o%2147483648.0) === o;
	}break;
	case Float:{
		return typeof(o) == "number";
	}break;
	case Bool:{
		return o === true || o === false;
	}break;
	case String:{
		return typeof(o) == "string";
	}break;
	case Dynamic:{
		return true;
	}break;
	default:{
		if(o == null) return false;
		return o.__enum__ == cl || (cl == Class && o.__name__ != null) || (cl == Enum && o.__ename__ != null);
	}break;
	}
}
js.Boot.__init = function() {
	js.Lib.isIE = (typeof document!='undefined' && document.all != null && typeof window!='undefined' && window.opera == null);
	js.Lib.isOpera = (typeof window!='undefined' && window.opera != null);
	Array.prototype.copy = Array.prototype.slice;
	Array.prototype.insert = function(i,x) {
		this.splice(i,0,x);
	}
	Array.prototype.remove = (Array.prototype.indexOf?function(obj) {
		var idx = this.indexOf(obj);
		if(idx == -1) return false;
		this.splice(idx,1);
		return true;
	}:function(obj) {
		var i = 0;
		var l = this.length;
		while(i < l) {
			if(this[i] == obj) {
				this.splice(i,1);
				return true;
			}
			i++;
		}
		return false;
	});
	Array.prototype.iterator = function() {
		return { cur : 0, arr : this, hasNext : function() {
			return this.cur < this.arr.length;
		}, next : function() {
			return this.arr[this.cur++];
		}}
	}
	var cca = String.prototype.charCodeAt;
	String.prototype.cca = cca;
	String.prototype.charCodeAt = function(i) {
		var x = cca.call(this,i);
		if(isNaN(x)) return null;
		return x;
	}
	var oldsub = String.prototype.substr;
	String.prototype.substr = function(pos,len) {
		if(pos != null && pos != 0 && len != null && len < 0) return "";
		if(len == null) len = this.length;
		if(pos < 0) {
			pos = this.length + pos;
			if(pos < 0) pos = 0;
		}
		else if(len < 0) {
			len = (this.length + len) - pos;
		}
		return oldsub.apply(this,[pos,len]);
	}
	$closure = js.Boot.__closure;
}
js.Boot.prototype.__class__ = js.Boot;
DateTools = function() { }
DateTools.__name__ = ["DateTools"];
DateTools.__format_get = function(d,e) {
	return (function($this) {
		var $r;
		switch(e) {
		case "%":{
			$r = "%";
		}break;
		case "C":{
			$r = StringTools.lpad(Std.string(Std["int"](d.getFullYear() / 100)),"0",2);
		}break;
		case "d":{
			$r = StringTools.lpad(Std.string(d.getDate()),"0",2);
		}break;
		case "D":{
			$r = DateTools.__format(d,"%m/%d/%y");
		}break;
		case "e":{
			$r = Std.string(d.getDate());
		}break;
		case "H":case "k":{
			$r = StringTools.lpad(Std.string(d.getHours()),(e == "H"?"0":" "),2);
		}break;
		case "I":case "l":{
			$r = (function($this) {
				var $r;
				var hour = d.getHours() % 12;
				$r = StringTools.lpad(Std.string((hour == 0?12:hour)),(e == "I"?"0":" "),2);
				return $r;
			}($this));
		}break;
		case "m":{
			$r = StringTools.lpad(Std.string(d.getMonth() + 1),"0",2);
		}break;
		case "M":{
			$r = StringTools.lpad(Std.string(d.getMinutes()),"0",2);
		}break;
		case "n":{
			$r = "\n";
		}break;
		case "p":{
			$r = (d.getHours() > 11?"PM":"AM");
		}break;
		case "r":{
			$r = DateTools.__format(d,"%I:%M:%S %p");
		}break;
		case "R":{
			$r = DateTools.__format(d,"%H:%M");
		}break;
		case "s":{
			$r = Std.string(Std["int"](d.getTime() / 1000));
		}break;
		case "S":{
			$r = StringTools.lpad(Std.string(d.getSeconds()),"0",2);
		}break;
		case "t":{
			$r = "\t";
		}break;
		case "T":{
			$r = DateTools.__format(d,"%H:%M:%S");
		}break;
		case "u":{
			$r = (function($this) {
				var $r;
				var t = d.getDay();
				$r = (t == 0?"7":Std.string(t));
				return $r;
			}($this));
		}break;
		case "w":{
			$r = Std.string(d.getDay());
		}break;
		case "y":{
			$r = StringTools.lpad(Std.string(d.getFullYear() % 100),"0",2);
		}break;
		case "Y":{
			$r = Std.string(d.getFullYear());
		}break;
		default:{
			$r = (function($this) {
				var $r;
				throw ("Date.format %" + e) + "- not implemented yet.";
				return $r;
			}($this));
		}break;
		}
		return $r;
	}(this));
}
DateTools.__format = function(d,f) {
	var r = new StringBuf();
	var p = 0;
	while(true) {
		var np = f.indexOf("%",p);
		if(np < 0) break;
		r.b[r.b.length] = f.substr(p,np - p);
		r.b[r.b.length] = DateTools.__format_get(d,f.substr(np + 1,1));
		p = np + 2;
	}
	r.b[r.b.length] = f.substr(p,f.length - p);
	return r.b.join("");
}
DateTools.format = function(d,f) {
	return DateTools.__format(d,f);
}
DateTools.delta = function(d,t) {
	return Date.fromTime(d.getTime() + t);
}
DateTools.getMonthDays = function(d) {
	var month = d.getMonth();
	var year = d.getFullYear();
	if(month != 1) return DateTools.DAYS_OF_MONTH[month];
	var isB = ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);
	return (isB?29:28);
}
DateTools.seconds = function(n) {
	return n * 1000.0;
}
DateTools.minutes = function(n) {
	return (n * 60.0) * 1000.0;
}
DateTools.hours = function(n) {
	return ((n * 60.0) * 60.0) * 1000.0;
}
DateTools.days = function(n) {
	return (((n * 24.0) * 60.0) * 60.0) * 1000.0;
}
DateTools.parse = function(t) {
	var s = t / 1000;
	var m = s / 60;
	var h = m / 60;
	return { ms : t % 1000, seconds : Std["int"](s % 60), minutes : Std["int"](m % 60), hours : Std["int"](h % 24), days : Std["int"](h / 24)}
}
DateTools.make = function(o) {
	return o.ms + 1000.0 * (o.seconds + 60.0 * (o.minutes + 60.0 * (o.hours + 24.0 * o.days)));
}
DateTools.prototype.__class__ = DateTools;
IntHash = function(p) { if( p === $_ ) return; {
	this.h = {}
	if(this.h.__proto__ != null) {
		this.h.__proto__ = null;
		delete(this.h.__proto__);
	}
	else null;
}}
IntHash.__name__ = ["IntHash"];
IntHash.prototype.exists = function(key) {
	return this.h[key] != null;
}
IntHash.prototype.get = function(key) {
	return this.h[key];
}
IntHash.prototype.h = null;
IntHash.prototype.iterator = function() {
	return { ref : this.h, it : this.keys(), hasNext : function() {
		return this.it.hasNext();
	}, next : function() {
		var i = this.it.next();
		return this.ref[i];
	}}
}
IntHash.prototype.keys = function() {
	var a = new Array();
	
			for( x in this.h )
				a.push(x);
		;
	return a.iterator();
}
IntHash.prototype.remove = function(key) {
	if(this.h[key] == null) return false;
	delete(this.h[key]);
	return true;
}
IntHash.prototype.set = function(key,value) {
	this.h[key] = value;
}
IntHash.prototype.toString = function() {
	var s = new StringBuf();
	s.b[s.b.length] = "{";
	var it = this.keys();
	{ var $it23 = it;
	while( $it23.hasNext() ) { var i = $it23.next();
	{
		s.b[s.b.length] = i;
		s.b[s.b.length] = " => ";
		s.b[s.b.length] = Std.string(this.get(i));
		if(it.hasNext()) s.b[s.b.length] = ", ";
	}
	}}
	s.b[s.b.length] = "}";
	return s.b.join("");
}
IntHash.prototype.__class__ = IntHash;
js.Cookie = function() { }
js.Cookie.__name__ = ["js","Cookie"];
js.Cookie.set = function(name,value,expireDelay,path,domain) {
	var s = (name + "=") + StringTools.urlEncode(value);
	if(expireDelay != null) {
		var d = DateTools.delta(Date.now(),expireDelay * 1000);
		s += ";expires=" + d.toGMTString();
	}
	if(path != null) {
		s += ";path=" + path;
	}
	if(domain != null) {
		s += ";domain=" + domain;
	}
	js.Lib.document.cookie = s;
}
js.Cookie.all = function() {
	var h = new Hash();
	var a = js.Lib.document.cookie.split(";");
	{
		var _g = 0;
		while(_g < a.length) {
			var e = a[_g];
			++_g;
			e = StringTools.ltrim(e);
			var t = e.split("=");
			if(t.length < 2) continue;
			h.set(t[0],StringTools.urlDecode(t[1]));
		}
	}
	return h;
}
js.Cookie.get = function(name) {
	return js.Cookie.all().get(name);
}
js.Cookie.exists = function(name) {
	return js.Cookie.all().exists(name);
}
js.Cookie.remove = function(name,path,domain) {
	js.Cookie.set(name,"",-10,path,domain);
}
js.Cookie.prototype.__class__ = js.Cookie;
EReg = function(r,opt) { if( r === $_ ) return; {
	opt = opt.split("u").join("");
	this.r = new RegExp(r,opt);
}}
EReg.__name__ = ["EReg"];
EReg.prototype.customReplace = function(s,f) {
	var buf = new StringBuf();
	while(true) {
		if(!this.match(s)) break;
		buf.b[buf.b.length] = this.matchedLeft();
		buf.b[buf.b.length] = f(this);
		s = this.matchedRight();
	}
	buf.b[buf.b.length] = s;
	return buf.b.join("");
}
EReg.prototype.match = function(s) {
	this.r.m = this.r.exec(s);
	this.r.s = s;
	this.r.l = RegExp.leftContext;
	this.r.r = RegExp.rightContext;
	return (this.r.m != null);
}
EReg.prototype.matched = function(n) {
	return (this.r.m != null && n >= 0 && n < this.r.m.length?this.r.m[n]:(function($this) {
		var $r;
		throw "EReg::matched";
		return $r;
	}(this)));
}
EReg.prototype.matchedLeft = function() {
	if(this.r.m == null) throw "No string matched";
	if(this.r.l == null) return this.r.s.substr(0,this.r.m.index);
	return this.r.l;
}
EReg.prototype.matchedPos = function() {
	if(this.r.m == null) throw "No string matched";
	return { pos : this.r.m.index, len : this.r.m[0].length}
}
EReg.prototype.matchedRight = function() {
	if(this.r.m == null) throw "No string matched";
	if(this.r.r == null) {
		var sz = this.r.m.index + this.r.m[0].length;
		return this.r.s.substr(sz,this.r.s.length - sz);
	}
	return this.r.r;
}
EReg.prototype.r = null;
EReg.prototype.replace = function(s,by) {
	return s.replace(this.r,by);
}
EReg.prototype.split = function(s) {
	var d = "#__delim__#";
	return s.replace(this.r,d).split(d);
}
EReg.prototype.__class__ = EReg;
BroadcastCommandContents = { __ename__ : ["BroadcastCommandContents"], __constructs__ : ["insertRoot","changeTopic","modifyStructure","changeStructure","moveSelection","stopEditingMap","changePresentation","processPresentation","changeFocus","expandTopic","sendChatMessage","uploadSuccess","uploadFail","nop","changePermissions","changeMapDescription"] }
BroadcastCommandContents.changeFocus = function(topicid) { var $x = ["changeFocus",8,topicid]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.changeMapDescription = function(mapId,newDesc) { var $x = ["changeMapDescription",15,mapId,newDesc]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.changePermissions = function(data,message,pendingUsers,disabledUsers) { var $x = ["changePermissions",14,data,message,pendingUsers,disabledUsers]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.changePresentation = function(presentation) { var $x = ["changePresentation",6,presentation]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.changeStructure = function(oldParent,oldIndex,oldChildrenAfter,newParent,newIndex,newChildrenAfter,topic) { var $x = ["changeStructure",3,oldParent,oldIndex,oldChildrenAfter,newParent,newIndex,newChildrenAfter,topic]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.changeTopic = function(id,newContents,oldContents) { var $x = ["changeTopic",1,id,newContents,oldContents]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.expandTopic = function(topicid,expand) { var $x = ["expandTopic",9,topicid,expand]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.insertRoot = function(topic) { var $x = ["insertRoot",0,topic]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.modifyStructure = function(parent,before,after,missing) { var $x = ["modifyStructure",2,parent,before,after,missing]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.moveSelection = function(clientid,topicid) { var $x = ["moveSelection",4,clientid,topicid]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.nop = ["nop",13];
BroadcastCommandContents.nop.toString = $estr;
BroadcastCommandContents.nop.__enum__ = BroadcastCommandContents;
BroadcastCommandContents.processPresentation = function(slide) { var $x = ["processPresentation",7,slide]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.sendChatMessage = function(message) { var $x = ["sendChatMessage",10,message]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.stopEditingMap = function(id,reason) { var $x = ["stopEditingMap",5,id,reason]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.uploadFail = function(errorMessage) { var $x = ["uploadFail",12,errorMessage]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
BroadcastCommandContents.uploadSuccess = function(filename,desc) { var $x = ["uploadSuccess",11,filename,desc]; $x.__enum__ = BroadcastCommandContents; $x.toString = $estr; return $x; }
$Main = function() { }
$Main.__name__ = ["@Main"];
$Main.prototype.__class__ = $Main;
$_ = {}
js.Boot.__res = {}
js.Boot.__init();
{
	Date.now = function() {
		return new Date();
	}
	Date.fromTime = function(t) {
		var d = new Date();
		d["setTime"](t);
		return d;
	}
	Date.fromString = function(s) {
		switch(s.length) {
		case 8:{
			var k = s.split(":");
			var d = new Date();
			d["setTime"](0);
			d["setUTCHours"](k[0]);
			d["setUTCMinutes"](k[1]);
			d["setUTCSeconds"](k[2]);
			return d;
		}break;
		case 10:{
			var k = s.split("-");
			return new Date(k[0],k[1] - 1,k[2],0,0,0);
		}break;
		case 19:{
			var k = s.split(" ");
			var y = k[0].split("-");
			var t = k[1].split(":");
			return new Date(y[0],y[1] - 1,y[2],t[0],t[1],t[2]);
		}break;
		default:{
			throw "Invalid date format : " + s;
		}break;
		}
	}
	Date.prototype["toString"] = function() {
		var date = this;
		var m = date.getMonth() + 1;
		var d = date.getDate();
		var h = date.getHours();
		var mi = date.getMinutes();
		var s = date.getSeconds();
		return (((((((((date.getFullYear() + "-") + ((m < 10?"0" + m:"" + m))) + "-") + ((d < 10?"0" + d:"" + d))) + " ") + ((h < 10?"0" + h:"" + h))) + ":") + ((mi < 10?"0" + mi:"" + mi))) + ":") + ((s < 10?"0" + s:"" + s));
	}
	Date.prototype.__class__ = Date;
	Date.__name__ = ["Date"];
}
{
	String.prototype.__class__ = String;
	String.__name__ = ["String"];
	Array.prototype.__class__ = Array;
	Array.__name__ = ["Array"];
	Int = { __name__ : ["Int"]}
	Dynamic = { __name__ : ["Dynamic"]}
	Float = Number;
	Float.__name__ = ["Float"];
	Bool = { __ename__ : ["Bool"]}
	Class = { __name__ : ["Class"]}
	Enum = { }
	Void = { __ename__ : ["Void"]}
}
{
	Math.NaN = Number["NaN"];
	Math.NEGATIVE_INFINITY = Number["NEGATIVE_INFINITY"];
	Math.POSITIVE_INFINITY = Number["POSITIVE_INFINITY"];
	Math.isFinite = function(i) {
		return isFinite(i);
	}
	Math.isNaN = function(i) {
		return isNaN(i);
	}
	Math.__name__ = ["Math"];
}
{
	js.Lib.document = document;
	js.Lib.window = window;
	onerror = function(msg,url,line) {
		var f = js.Lib.onerror;
		if( f == null )
			return false;
		return f(msg,[url+":"+line]);
	}
}
{
	js["XMLHttpRequest"] = (window.XMLHttpRequest?XMLHttpRequest:(window.ActiveXObject?function() {
		try {
			return new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch( $e24 ) {
			{
				var e = $e24;
				{
					try {
						return new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch( $e25 ) {
						{
							var e1 = $e25;
							{
								throw "Unable to create XMLHttpRequest object.";
							}
						}
					}
				}
			}
		}
	}:(function($this) {
		var $r;
		throw "Unable to create XMLHttpRequest object.";
		return $r;
	}(this))));
}
haxe.remoting.ExternalConnection.connections = new Hash();
haxe.Timer.arr = new Array();
Protocol.version = 101;
Protocol.OK = 0;
Protocol.VERSION_ERROR = 1;
Protocol.UNSERIALIZE_EXCEPTION = 2;
Protocol.INVOKE_EXCEPTION = 3;
Protocol.SERVER_EXCEPTION = 4;
Protocol.REQUEST_REJECTED = 5;
haxe.Unserializer.DEFAULT_RESOLVER = Type;
haxe.Unserializer.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
haxe.Unserializer.CODES = null;
connect.ProxiedConnectionServer.instance = new connect.ProxiedConnectionServer();
haxe.Serializer.USE_CACHE = false;
haxe.Serializer.USE_ENUM_INDEX = false;
haxe.Serializer.BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%:";
connect.FlashJsConnectionProtocol.FLASH_ID = "bohr";
connect.FlashJsConnectionProtocol.CONNECTION_NAME = "default";
js.Lib.onerror = null;
DateTools.DAYS_OF_MONTH = [31,28,31,30,31,30,31,31,30,31,30,31];
$Main.init = connect.ProxiedConnectionServer.main();
