net = {}
net.staugler = {}
net.staugler.flivpee = {}
net.staugler.flivpee.interfaces = {}
net.staugler.flivpee.interfaces.FlivpeeWidget = function() { }
net.staugler.flivpee.interfaces.FlivpeeWidget.__name__ = ["net","staugler","flivpee","interfaces","FlivpeeWidget"];
net.staugler.flivpee.interfaces.FlivpeeWidget.prototype.__class__ = net.staugler.flivpee.interfaces.FlivpeeWidget;
net.staugler.flivpee.javascript = {}
net.staugler.flivpee.javascript.SystemMessages = function(instance) { if( instance === $_ ) return; {
	this._inst = instance;
	this._inst.className = this._inst.id + "_base";
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_LOADING,this,$closure(this,"_set_state_loading"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_PLAYING,this,$closure(this,"_set_state_playing"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_BUFFERING,this,$closure(this,"_set_state_buffering"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_STOPPED,this,$closure(this,"_set_state_stopped"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_PAUSED,this,$closure(this,"_set_state_paused"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_VIDEO_NOT_FOUND,this,$closure(this,"_set_state_video_not_found"));
}}
net.staugler.flivpee.javascript.SystemMessages.__name__ = ["net","staugler","flivpee","javascript","SystemMessages"];
net.staugler.flivpee.javascript.SystemMessages.prototype._inst = null;
net.staugler.flivpee.javascript.SystemMessages.prototype._set_state = function(state) {
	this._inst.className = this._inst.id + "_base " + this._inst.id + "_" + state;
}
net.staugler.flivpee.javascript.SystemMessages.prototype._set_state_buffering = function() {
	this._set_state("buffering");
}
net.staugler.flivpee.javascript.SystemMessages.prototype._set_state_loading = function() {
	this._set_state("loading");
}
net.staugler.flivpee.javascript.SystemMessages.prototype._set_state_paused = function(paused) {
	if(paused) {
		this._set_state("paused");
	}
	else {
		this._set_state_playing();
	}
}
net.staugler.flivpee.javascript.SystemMessages.prototype._set_state_playing = function() {
	this._set_state("playing");
}
net.staugler.flivpee.javascript.SystemMessages.prototype._set_state_stopped = function() {
	this._set_state("stopped");
}
net.staugler.flivpee.javascript.SystemMessages.prototype._set_state_video_not_found = function() {
	this._set_state("video_not_found");
}
net.staugler.flivpee.javascript.SystemMessages.prototype.__class__ = net.staugler.flivpee.javascript.SystemMessages;
net.staugler.flivpee.javascript.SystemMessages.__interfaces__ = [net.staugler.flivpee.interfaces.FlivpeeWidget];
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.baseEncode = function(s,base) {
	var len = base.length;
	var nbits = 1;
	while(len > 1 << nbits) nbits++;
	if(nbits > 8 || len != 1 << nbits) throw "baseEncode: base must be a power of two.";
	var size = Std["int"]((s.length * 8 + nbits - 1) / nbits);
	var out = new StringBuf();
	var buf = 0;
	var curbits = 0;
	var mask = ((1 << nbits) - 1);
	var pin = 0;
	while(size-- > 0) {
		while(curbits < nbits) {
			curbits += 8;
			buf <<= 8;
			var t = s.charCodeAt(pin++);
			if(t > 255) throw "baseEncode: bad chars";
			buf |= t;
		}
		curbits -= nbits;
		out.addChar(base.charCodeAt((buf >> curbits) & mask));
	}
	return out.toString();
}
StringTools.baseDecode = function(s,base) {
	var len = base.length;
	var nbits = 1;
	while(len > 1 << nbits) nbits++;
	if(nbits > 8 || len != 1 << nbits) throw "baseDecode: base must be a power of two.";
	var size = (s.length * 8 + nbits - 1) / nbits;
	var tbl = new Array();
	{
		var _g1 = 0, _g = 256;
		while(_g1 < _g) {
			var i = _g1;
			++_g1;
			tbl[i] = -1;
		}
	}
	{
		var _g1 = 0, _g = len;
		while(_g1 < _g) {
			var i = _g1;
			++_g1;
			tbl[base.charCodeAt(i)] = i;
		}
	}
	var size1 = (s.length * nbits) / 8;
	var out = new StringBuf();
	var buf = 0;
	var curbits = 0;
	var pin = 0;
	while(size1-- > 0) {
		while(curbits < 8) {
			curbits += nbits;
			buf <<= nbits;
			var i = tbl[s.charCodeAt(pin++)];
			if(i == -1) throw "baseDecode: bad chars";
			buf |= i;
		}
		curbits -= 8;
		out.addChar((buf >> curbits) & 255);
	}
	return out.toString();
}
StringTools.hex = function(n,digits) {
	var s = "";
	var hexChars = "0123456789ABCDEF";
	do {
		s = hexChars.charAt(n % 16) + s;
		n = Std["int"](n / 16);
	} while(n > 0);
	if(digits != null) while(s.length < digits) s = "0" + s;
	return s;
}
StringTools.prototype.__class__ = StringTools;
net.staugler.flivpee.javascript.buttons = {}
net.staugler.flivpee.javascript.buttons.PageButton = function(instance) { if( instance === $_ ) return; {
	this._inst = instance;
	this._setup_events();
	this.disable();
}}
net.staugler.flivpee.javascript.buttons.PageButton.__name__ = ["net","staugler","flivpee","javascript","buttons","PageButton"];
net.staugler.flivpee.javascript.buttons.PageButton.prototype.__click = function() {
	if(this._enabled) {
		this._click();
	}
}
net.staugler.flivpee.javascript.buttons.PageButton.prototype.__mousedown = function() {
	if(this._enabled) {
		this._mousedown();
	}
}
net.staugler.flivpee.javascript.buttons.PageButton.prototype._click = function() {
	null;
}
net.staugler.flivpee.javascript.buttons.PageButton.prototype._enabled = null;
net.staugler.flivpee.javascript.buttons.PageButton.prototype._inst = null;
net.staugler.flivpee.javascript.buttons.PageButton.prototype._mousedown = function() {
	null;
}
net.staugler.flivpee.javascript.buttons.PageButton.prototype._mouseout = function() {
	if(this._enabled) {
		this._set_class("out");
	}
}
net.staugler.flivpee.javascript.buttons.PageButton.prototype._mouseover = function() {
	if(this._enabled) {
		this._set_class("over");
	}
}
net.staugler.flivpee.javascript.buttons.PageButton.prototype._set_class = function(str) {
	this._inst.className = this._inst.id + "_base " + this._inst.id + "_" + str;
	return "";
}
net.staugler.flivpee.javascript.buttons.PageButton.prototype._setup_events = function() {
	this._inst.onmouseover = $closure(this,"_mouseover");
	this._inst.onmouseout = $closure(this,"_mouseout");
	this._inst.onmousedown = $closure(this,"__mousedown");
	this._inst.onclick = $closure(this,"__click");
}
net.staugler.flivpee.javascript.buttons.PageButton.prototype.disable = function() {
	this._enabled = false;
	this._set_class("disabled");
}
net.staugler.flivpee.javascript.buttons.PageButton.prototype.enable = function() {
	this._enabled = true;
	this._set_class("out");
}
net.staugler.flivpee.javascript.buttons.PageButton.prototype.state = null;
net.staugler.flivpee.javascript.buttons.PageButton.prototype.__class__ = net.staugler.flivpee.javascript.buttons.PageButton;
net.staugler.flivpee.javascript.buttons.PageButton.__interfaces__ = [net.staugler.flivpee.interfaces.FlivpeeWidget];
net.staugler.flivpee.javascript.buttons.UnpauseButton = function(instance) { if( instance === $_ ) return; {
	net.staugler.flivpee.javascript.buttons.PageButton.apply(this,[instance]);
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_LOADING,this,$closure(this,"disable"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_PLAYING,this,$closure(this,"disable"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_STOPPED,this,$closure(this,"disable"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_PAUSED,this,$closure(this,"_app_paused"));
}}
net.staugler.flivpee.javascript.buttons.UnpauseButton.__name__ = ["net","staugler","flivpee","javascript","buttons","UnpauseButton"];
net.staugler.flivpee.javascript.buttons.UnpauseButton.__super__ = net.staugler.flivpee.javascript.buttons.PageButton;
for(var k in net.staugler.flivpee.javascript.buttons.PageButton.prototype ) net.staugler.flivpee.javascript.buttons.UnpauseButton.prototype[k] = net.staugler.flivpee.javascript.buttons.PageButton.prototype[k];
net.staugler.flivpee.javascript.buttons.UnpauseButton.prototype._app_paused = function(paused) {
	if(paused) {
		this.enable();
	}
	else {
		this.disable();
	}
}
net.staugler.flivpee.javascript.buttons.UnpauseButton.prototype._click = function() {
	net.staugler.flivpee.javascript.Flivpage.pause(false);
}
net.staugler.flivpee.javascript.buttons.UnpauseButton.prototype.__class__ = net.staugler.flivpee.javascript.buttons.UnpauseButton;
Reflect = function() { }
Reflect.__name__ = ["Reflect"];
Reflect.empty = function() {
	return {}
}
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) {
	try {
		return o[field];
	}
	catch( $e1 ) {
		{
			var e = $e1;
			{
				return null;
			}
		}
	}
}
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.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 = Reflect.empty();
	{ var $it3 = Reflect.fields(o).iterator();
	while( $it3.hasNext() ) { var f = $it3.next();
	Reflect.setField(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;
				++_g1;
				a.push(arguments[i]);
			}
		}
		return f(a);
	}
}
Reflect.prototype.__class__ = Reflect;
net.staugler.flivpee.javascript.sliders = {}
net.staugler.flivpee.javascript.sliders.PageSlider = function(instance) { if( instance === $_ ) return; {
	this._inst = instance;
	this._inst.className = this._inst.id + "_base";
	this._inst.onclick = $closure(this,"__click");
	this._inst.onmouseover = $closure(this,"_start_watching");
	this._inst.onmouseout = $closure(this,"_stop_watching");
	var tmp;
	tmp = net.staugler.flivpee.javascript.Flivpage.find_by_id(this._inst.id + "_indicator");
	if(tmp) {
		this._indicator = new net.staugler.flivpee.javascript.sliders.PageSliderElement(tmp);
	}
	tmp = net.staugler.flivpee.javascript.Flivpage.find_by_id(this._inst.id + "_rollover");
	if(tmp) {
		this._rollover = new net.staugler.flivpee.javascript.sliders.PageSliderElement(tmp);
		this._rollover.hide();
	}
	this.disable();
}}
net.staugler.flivpee.javascript.sliders.PageSlider.__name__ = ["net","staugler","flivpee","javascript","sliders","PageSlider"];
net.staugler.flivpee.javascript.sliders.PageSlider.prototype.__click = function(event) {
	if(this._enabled) {
		var pos = this._find_pos(event);
		this._indicator.display(pos);
		this._click(pos);
	}
}
net.staugler.flivpee.javascript.sliders.PageSlider.prototype._click = function(pos) {
	null;
}
net.staugler.flivpee.javascript.sliders.PageSlider.prototype._enabled = null;
net.staugler.flivpee.javascript.sliders.PageSlider.prototype._find_pos = function(event) {
	var str_w = this._inst.offsetWidth;
	var total_offset = 0;
	var node = this._inst;
	while(node.offsetLeft != null) {
		total_offset += node.offsetLeft;
		node = node.parentNode;
	}
	var mousex = (event != null && event.clientX != null?event.clientX:window.event.clientX);
	var w = str_w;
	var x = mousex - total_offset;
	var pos = x / w;
	if(pos < 0) {
		pos = 0;
	}
	else if(pos > 1) {
		pos = 1;
	}
	return pos;
}
net.staugler.flivpee.javascript.sliders.PageSlider.prototype._indicator = null;
net.staugler.flivpee.javascript.sliders.PageSlider.prototype._inst = null;
net.staugler.flivpee.javascript.sliders.PageSlider.prototype._rollover = null;
net.staugler.flivpee.javascript.sliders.PageSlider.prototype._start_watching = function() {
	if(this._enabled) {
		this._inst.onmousemove = $closure(this,"_update");
		this._rollover.show();
	}
}
net.staugler.flivpee.javascript.sliders.PageSlider.prototype._stop_watching = function() {
	this._inst.onmousemove = null;
	this._rollover.hide();
}
net.staugler.flivpee.javascript.sliders.PageSlider.prototype._update = function(event) {
	var pos = this._find_pos(event);
	this._rollover.display(pos);
}
net.staugler.flivpee.javascript.sliders.PageSlider.prototype.disable = function() {
	this._enabled = false;
	this._stop_watching();
}
net.staugler.flivpee.javascript.sliders.PageSlider.prototype.enable = function() {
	this._enabled = true;
}
net.staugler.flivpee.javascript.sliders.PageSlider.prototype.__class__ = net.staugler.flivpee.javascript.sliders.PageSlider;
net.staugler.flivpee.javascript.sliders.PageSlider.__interfaces__ = [net.staugler.flivpee.interfaces.FlivpeeWidget];
net.staugler.flivpee.javascript.sliders.TimelineSlider = function(instance) { if( instance === $_ ) return; {
	net.staugler.flivpee.javascript.sliders.PageSlider.apply(this,[instance]);
	try {
		this._buffer = new net.staugler.flivpee.javascript.sliders.PageSliderElement(net.staugler.flivpee.javascript.Flivpage.find_by_id(this._inst.id + "_buffer"));
	}
	catch( $e4 ) {
		{
			var e = $e4;
			{
				null;
			}
		}
	}
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_LOADING,this,$closure(this,"_unwatch"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_STOPPED,this,$closure(this,"_reset"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_PAUSED,this,$closure(this,"_pause"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_SEEK,this,$closure(this,"_unwatch"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_VIDEO_NOT_FOUND,this,$closure(this,"_reset"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_PLAYING,this,$closure(this,"_watch"));
}}
net.staugler.flivpee.javascript.sliders.TimelineSlider.__name__ = ["net","staugler","flivpee","javascript","sliders","TimelineSlider"];
net.staugler.flivpee.javascript.sliders.TimelineSlider.__super__ = net.staugler.flivpee.javascript.sliders.PageSlider;
for(var k in net.staugler.flivpee.javascript.sliders.PageSlider.prototype ) net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype[k] = net.staugler.flivpee.javascript.sliders.PageSlider.prototype[k];
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._buffer = null;
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._clear_timeline = function() {
	this._duration_field.clear();
	this._indicator.display(0);
	this._buffer.display(0);
	this.disable();
}
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._click = function(pos) {
	net.staugler.flivpee.javascript.Flivpage.seek(pos);
}
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._duration_field = null;
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._pause = function(paused) {
	if(paused) {
		this._unwatch();
	}
	else {
		this._watch();
	}
}
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._reset = function() {
	this._unwatch();
	this._clear_timeline();
}
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._sanity_check = function(num) {
	if(num < 0) {
		return 0;
	}
	else if(num > 1) {
		return 1;
	}
	return num;
}
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._t = null;
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._unwatch = function() {
	if(this._t != null) {
		this._t.stop();
		this._t = null;
	}
}
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._update_timeline = function() {
	var obj = net.staugler.flivpee.javascript.Flivpage.find_timeline_props();
	var buffer_pos = obj.buffer;
	var playhead_pos = obj.playhead;
	buffer_pos = this._sanity_check(buffer_pos);
	playhead_pos = this._sanity_check(playhead_pos);
	this._indicator.display(playhead_pos);
	this._buffer.display(buffer_pos);
	if(this._duration_field == null) {
		this._duration_field = function($this) {
			var $r;
			var tmp = net.staugler.flivpee.javascript.Flivpage.find_widget(net.staugler.flivpee.javascript.Flivpage.WIDGET_DURATION);
			$r = (Std["is"](tmp,net.staugler.flivpee.javascript.DurationField)?tmp:function($this) {
				var $r;
				throw "Class cast error";
				return $r;
			}($this));
			return $r;
		}(this);
	}
	this._duration_field.update(obj.time,obj.duration);
}
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype._watch = function() {
	if(this._t == null) {
		this._t = new haxe.Timer(500);
		this._t.run = $closure(this,"_update_timeline");
		this.enable();
	}
}
net.staugler.flivpee.javascript.sliders.TimelineSlider.prototype.__class__ = net.staugler.flivpee.javascript.sliders.TimelineSlider;
haxe = {}
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;
StringBuf = function(p) { if( p === $_ ) return; {
	this.b = "";
}}
StringBuf.__name__ = ["StringBuf"];
StringBuf.prototype.add = function(x) {
	this.b += x;
}
StringBuf.prototype.addChar = function(c) {
	this.b += String.fromCharCode(c);
}
StringBuf.prototype.addSub = function(s,pos,len) {
	this.b += s.substr(pos,len);
}
StringBuf.prototype.b = null;
StringBuf.prototype.toString = function() {
	return this.b;
}
StringBuf.prototype.__class__ = StringBuf;
haxe.Firebug = function() { }
haxe.Firebug.__name__ = ["haxe","Firebug"];
haxe.Firebug.detect = function() {
	try {
		return console != null && console.error != null;
	}
	catch( $e5 ) {
		{
			var e = $e5;
			{
				return false;
			}
		}
	}
}
haxe.Firebug.redirectTraces = function() {
	haxe.Log.trace = $closure(haxe.Firebug,"trace");
	js.Lib.setErrorHandler($closure(haxe.Firebug,"onError"));
}
haxe.Firebug.onError = function(err,stack) {
	var buf = err + "\n";
	{ var $it6 = stack.iterator();
	while( $it6.hasNext() ) { var s = $it6.next();
	buf += "Called from " + s + "\n";
	}}
	haxe.Firebug.trace(buf,null);
	return true;
}
haxe.Firebug.trace = function(v,inf) {
	var type = (inf != null && inf.customParams != null?inf.customParams[0]:null);
	if(type != "warn" && type != "info" && type != "debug" && type != "error") type = (inf == null?"error":"log");
	console[type](((inf == null?"":inf.fileName + ":" + inf.lineNumber + " : ")) + Std.string(v));
}
haxe.Firebug.prototype.__class__ = haxe.Firebug;
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) { if( time === $_ ) return; {
	this.id = haxe.Timer.arr.length;
	haxe.Timer.arr[this.id] = this;
	this.timerId = window.setInterval("haxe.Timer.arr[" + this.id + "].run();",time);
}}
haxe.Timer.__name__ = ["haxe","Timer"];
haxe.Timer.delayed = function(f,time) {
	return function() {
		var t = new haxe.Timer(time);
		t.run = function() {
			t.stop();
			f();
		}
	}
}
haxe.Timer.queue = function(f,time) {
	haxe.Timer.fqueue.push(f);
	(haxe.Timer.delayed(function() {
		(haxe.Timer.fqueue.shift())();
	},(time == null?0:time)))();
}
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;
Type = function() { }
Type.__name__ = ["Type"];
Type.toEnum = function(t) {
	try {
		if(t.__ename__ == null) return null;
		return t;
	}
	catch( $e7 ) {
		{
			var e = $e7;
			null;
		}
	}
	return null;
}
Type.toClass = function(t) {
	try {
		if(t.__name__ == null) return null;
		return t;
	}
	catch( $e8 ) {
		{
			var e = $e8;
			null;
		}
	}
	return null;
}
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( $e9 ) {
			{
				var e = $e9;
				{
					cl = null;
				}
			}
		}
		if(cl == null || cl.__name__ == null) return null;
		else null;
	}
	return cl;
}
Type.resolveEnum = function(name) {
	var e;
	{
		try {
			e = eval(name);
		}
		catch( $e10 ) {
			{
				var e1 = $e10;
				{
					e1 = null;
				}
			}
		}
		if(e == null || e.__ename__ == null) return null;
		else null;
	}
	return e;
}
Type.createInstance = function(cl,args) {
	if(args.length >= 6) throw "Too many arguments";
	return new cl(args[0],args[1],args[2],args[3],args[4],args[5]);
}
Type.createEmptyInstance = function(cl) {
	return new cl($_);
}
Type.getInstanceFields = function(c) {
	var a = Reflect.fields(c.prototype);
	c = c.__super__;
	while(c != null) {
		a = a.concat(Reflect.fields(c.prototype));
		c = c.__super__;
	}
	while(a.remove("__class__")) null;
	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) {
	var a = Reflect.fields(e);
	a.remove("__ename__");
	return a;
}
Type["typeof"] = function(v) {
	switch(typeof(v)) {
	case "boolean":{
		return ValueType.TBool;
	}break;
	case "string":{
		return ValueType.TClass(String);
	}break;
	case "number":{
		if(v + 1 == v) return ValueType.TFloat;
		if(Math.ceil(v) == v) 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;
	if(a[0] != b[0]) return false;
	{
		var _g1 = 1, _g = a.length;
		while(_g1 < _g) {
			var i = _g1;
			++_g1;
			if(!Type.enumEq(a[i],b[i])) return false;
		}
	}
	var e = a.__enum__;
	if(e != b.__enum__ || e == null) return false;
	return true;
}
Type.enumConstructor = function(e) {
	return e[0];
}
Type.enumParameters = function(e) {
	return e.slice(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.run = function(v) {
	return new haxe.Unserializer(v).unserialize();
}
haxe.Unserializer.prototype.buf = null;
haxe.Unserializer.prototype.cache = null;
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.charCodeAt(this.pos);
		if(c == null) 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 = { resolveEnum : function(_) {
		return null;
	}, resolveClass : function(_) {
		return null;
	}}
	else this.resolver = r;
}
haxe.Unserializer.prototype.unserialize = function() {
	switch(this.buf.charCodeAt(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.charCodeAt(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 a = new Array();
		this.cache.push(a);
		while(true) {
			var c = this.buf.charCodeAt(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 = Reflect.empty();
		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;
		var tag = this.unserialize();
		if(!Std["is"](tag,String)) throw "Invalid enum tag";
		var constr = Reflect.field(edecl,tag);
		if(constr == null) throw "Unknown enum tag " + name + "." + tag;
		if(this.buf.charCodeAt(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 = Reflect.callMethod(edecl,constr,args);
		this.cache.push(e);
		return e;
	}break;
	case 108:{
		var l = new List();
		while(this.buf.charCodeAt(this.pos) != 104) l.add(this.unserialize());
		this.pos++;
		return l;
	}break;
	case 98:{
		var h = new Hash();
		while(this.buf.charCodeAt(this.pos) != 104) {
			var s = this.unserialize();
			h.set(s,this.unserialize());
		}
		this.pos++;
		return h;
	}break;
	case 113:{
		var h = new IntHash();
		var c = this.buf.charCodeAt(this.pos++);
		while(c == 58) {
			var i = this.readDigits();
			h.set(i,this.unserialize());
			c = this.buf.charCodeAt(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.pos += 19;
		return d;
	}break;
	case 115:{
		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;
		this.scache.push(s);
		return s;
	}break;
	case 106:{
		var len = this.readDigits();
		if(this.buf.charAt(this.pos++) != ":") throw "Invalid string length";
		var s = this.buf.substr(this.pos,len);
		this.pos += len;
		var delim = "##__delim__##";
		var a = s.split("\\\\");
		s = a.join(delim).split("\\r").join("\r").split("\\n").join("\n").split(delim).join("\\");
		this.scache.push(s);
		return s;
	}break;
	default:{
		null;
	}break;
	}
	this.pos--;
	throw ("Invalid char " + this.buf.charAt(this.pos) + " at position " + this.pos);
}
haxe.Unserializer.prototype.unserializeObject = function(o) {
	while(true) {
		if(this.pos >= this.length) throw "Invalid object";
		if(this.buf.charCodeAt(this.pos) == 103) break;
		var k = this.unserialize();
		if(!Std["is"](k,String)) throw "Invalid object key";
		var v = this.unserialize();
		Reflect.setField(o,k,v);
	}
	this.pos++;
}
haxe.Unserializer.prototype.__class__ = haxe.Unserializer;
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) {
	return Math.floor(x);
}
Std.bool = function(x) {
	return (x !== 0 && x != null && x !== false);
}
Std.parseInt = function(x) {
	{
		var v = parseInt(x);
		if(Math.isNaN(v)) return null;
		return v;
	}
}
Std.parseFloat = function(x) {
	return parseFloat(x);
}
Std.chr = function(x) {
	return String.fromCharCode(x);
}
Std.ord = function(x) {
	if(x == "") return null;
	else return x.charCodeAt(0);
}
Std.random = function(x) {
	return Math.floor(Math.random() * x);
}
Std.resource = function(name) {
	return js.Boot.__res[name];
}
Std.prototype.__class__ = Std;
List = function(p) { if( p === $_ ) return; {
	this.length = 0;
}}
List.__name__ = ["List"];
List.prototype.add = function(item) {
	var x = [item,null];
	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.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 { next : function() {
		{
			if(this.h == null) return null;
			var x = this.h[0];
			this.h = this.h[1];
			return x;
		}
	}, hasNext : function() {
		return (this.h != null);
	}, h : this.h}
}
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.add(sep);
		s.add(l[0]);
		l = l[1];
	}
	return s.toString();
}
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.add("{");
	while(l != null) {
		if(first) first = false;
		else s.add(", ");
		s.add(l[0]);
		l = l[1];
	}
	s.add("}");
	return s.toString();
}
List.prototype.__class__ = List;
haxe.Serializer = function(p) { if( p === $_ ) return; {
	this.buf = new StringBuf();
	this.cache = new Array();
	this.useCache = haxe.Serializer.USE_CACHE;
	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[0] ) {
	case "TNull":
	{
		this.buf.add("n");
	}break;
	case "TInt":
	{
		if(v == 0) {
			this.buf.add("z");
			return;
		}
		this.buf.add("i");
		this.buf.add(v);
	}break;
	case "TFloat":
	{
		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 "TBool":
	{
		this.buf.add((v?"t":"f"));
	}break;
	case "TClass":
	var c = $e[1];
	{
		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 _g1 = 0, _g = l;
				while(_g1 < _g) {
					var i = _g1;
					++_g1;
					{
						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 $it11 = v.iterator();
			while( $it11.hasNext() ) { var i = $it11.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 $it12 = v.keys();
			while( $it12.hasNext() ) { var k = $it12.next();
			{
				this.serializeString(k);
				this.serialize(v.get(k));
			}
			}}
			this.buf.add("h");
		}break;
		case IntHash:{
			this.buf.add("q");
			{ var $it13 = v.keys();
			while( $it13.hasNext() ) { var k = $it13.next();
			{
				this.buf.add(":");
				this.buf.add(k);
				this.serialize(v.get(k));
			}
			}}
			this.buf.add("h");
		}break;
		default:{
			this.cache.pop();
			this.buf.add("c");
			this.serialize(Type.getClassName(c));
			this.cache.push(v);
			this.serializeFields(v);
		}break;
		}
	}break;
	case "TObject":
	{
		if(this.useCache && this.serializeRef(v)) return;
		this.buf.add("o");
		this.serializeFields(v);
	}break;
	case "TEnum":
	var e = $e[1];
	{
		if(this.useCache && this.serializeRef(v)) return;
		this.cache.pop();
		this.buf.add("w");
		this.serialize(Type.getEnumName(e));
		this.serializeString(v[0]);
		this.buf.add(":");
		var l = v["length"];
		this.buf.add(l - 1);
		{
			var _g1 = 1, _g = l;
			while(_g1 < _g) {
				var i = _g1;
				++_g1;
				this.serialize(v[i]);
			}
		}
		this.cache.push(v);
	}break;
	case "TFunction":
	{
		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 $it14 = Reflect.fields(v).iterator();
	while( $it14.hasNext() ) { var f = $it14.next();
	{
		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;
			++_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.toString();
}
haxe.Serializer.prototype.useCache = null;
haxe.Serializer.prototype.__class__ = haxe.Serializer;
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.request = 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( $e15 ) {
				{
					var e = $e15;
					$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;
		}
	}
	r.onreadystatechange = onreadystatechange;
	var uri = this.postData;
	if(uri != null) post = true;
	else { var $it16 = this.params.keys();
	while( $it16.hasNext() ) { var p = $it16.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( $e17 ) {
		{
			var e = $e17;
			{
				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 $it18 = this.headers.keys();
	while( $it18.hasNext() ) { var h = $it18.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"] }
ValueType.TBool = ["TBool"];
ValueType.TBool.__enum__ = ValueType;
ValueType.TClass = function(c) { var $x = ["TClass",c]; $x.__enum__ = ValueType; return $x; }
ValueType.TEnum = function(e) { var $x = ["TEnum",e]; $x.__enum__ = ValueType; return $x; }
ValueType.TFloat = ["TFloat"];
ValueType.TFloat.__enum__ = ValueType;
ValueType.TFunction = ["TFunction"];
ValueType.TFunction.__enum__ = ValueType;
ValueType.TInt = ["TInt"];
ValueType.TInt.__enum__ = ValueType;
ValueType.TNull = ["TNull"];
ValueType.TNull.__enum__ = ValueType;
ValueType.TObject = ["TObject"];
ValueType.TObject.__enum__ = ValueType;
ValueType.TUnknown = ["TUnknown"];
ValueType.TUnknown.__enum__ = ValueType;
net.staugler.flivpee.javascript.Flivpage = function() { }
net.staugler.flivpee.javascript.Flivpage.__name__ = ["net","staugler","flivpee","javascript","Flivpage"];
net.staugler.flivpee.javascript.Flivpage._flash = null;
net.staugler.flivpee.javascript.Flivpage._event_listeners = null;
net.staugler.flivpee.javascript.Flivpage._widgets = null;
net.staugler.flivpee.javascript.Flivpage.main = function() {
	if(haxe.Firebug.detect()) {
		haxe.Firebug.redirectTraces();
	}
	{
		window.Flivpee = net.staugler.flivpee.javascript.Flivpage;
	}
	net.staugler.flivpee.javascript.Flivpage._event_listeners = new Array();
	net.staugler.flivpee.javascript.Flivpage._widgets = new Array();
	{
		var _g1 = 0, _g = 9;
		while(_g1 < _g) {
			var i = _g1;
			++_g1;
			{
				net.staugler.flivpee.javascript.Flivpage._event_listeners[i] = new net.staugler.flivpee.javascript.EventListenerList();
			}
		}
	}
}
net.staugler.flivpee.javascript.Flivpage.flivpee_ready = function() {
	net.staugler.flivpee.javascript.Flivpage._flash = haxe.remoting.Connection.flashConnect(net.staugler.flivpee.javascript.Flivpage.flivpee_target);
	net.staugler.flivpee.javascript.Flivpage.app_ready();
	null;
}
net.staugler.flivpee.javascript.Flivpage.find_by_id = function(id) {
	try {
		return js.Lib.document.getElementById(id);
	}
	catch( $e19 ) {
		{
			var e = $e19;
			{
				null;
			}
		}
	}
	return null;
}
net.staugler.flivpee.javascript.Flivpage.add_event_listener = function(event,target,method) {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[event].add(target,method);
}
net.staugler.flivpee.javascript.Flivpage.rem_event_listener = function(event,target) {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[event].rem(target);
}
net.staugler.flivpee.javascript.Flivpage.loading = function() {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[net.staugler.flivpee.javascript.Flivpage.EVENT_LOADING].broadcast([]);
}
net.staugler.flivpee.javascript.Flivpage.buffering = function() {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[net.staugler.flivpee.javascript.Flivpage.EVENT_BUFFERING].broadcast([]);
}
net.staugler.flivpee.javascript.Flivpage.playing = function() {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[net.staugler.flivpee.javascript.Flivpage.EVENT_PLAYING].broadcast([]);
}
net.staugler.flivpee.javascript.Flivpage.stopped = function() {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[net.staugler.flivpee.javascript.Flivpage.EVENT_STOPPED].broadcast([]);
}
net.staugler.flivpee.javascript.Flivpage.paused = function(bool) {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[net.staugler.flivpee.javascript.Flivpage.EVENT_PAUSED].broadcast([bool]);
}
net.staugler.flivpee.javascript.Flivpage.seek_success = function() {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[net.staugler.flivpee.javascript.Flivpage.EVENT_SEEK].broadcast([true]);
}
net.staugler.flivpee.javascript.Flivpage.seek_failed = function() {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[net.staugler.flivpee.javascript.Flivpage.EVENT_SEEK].broadcast([false]);
}
net.staugler.flivpee.javascript.Flivpage.new_volume = function(pos) {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[net.staugler.flivpee.javascript.Flivpage.EVENT_VOLUME].broadcast([pos]);
}
net.staugler.flivpee.javascript.Flivpage.video_not_found = function() {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[net.staugler.flivpee.javascript.Flivpage.EVENT_VIDEO_NOT_FOUND].broadcast([]);
}
net.staugler.flivpee.javascript.Flivpage.app_ready = function() {
	net.staugler.flivpee.javascript.Flivpage._event_listeners[net.staugler.flivpee.javascript.Flivpage.EVENT_APP_READY].broadcast([]);
}
net.staugler.flivpee.javascript.Flivpage.play = function(url) {
	net.staugler.flivpee.javascript.Flivpage._flash.__resolve("net").__resolve("staugler").__resolve("flivpee").__resolve("flash").__resolve("Flivpee").__resolve("play").call([url]);
}
net.staugler.flivpee.javascript.Flivpage.stop = function() {
	net.staugler.flivpee.javascript.Flivpage._flash.__resolve("net").__resolve("staugler").__resolve("flivpee").__resolve("flash").__resolve("Flivpee").__resolve("stop").call([]);
}
net.staugler.flivpee.javascript.Flivpage.pause = function(bool) {
	net.staugler.flivpee.javascript.Flivpage._flash.__resolve("net").__resolve("staugler").__resolve("flivpee").__resolve("flash").__resolve("Flivpee").__resolve("pause").call([bool]);
}
net.staugler.flivpee.javascript.Flivpage.seek = function(pos) {
	net.staugler.flivpee.javascript.Flivpage._flash.__resolve("net").__resolve("staugler").__resolve("flivpee").__resolve("flash").__resolve("Flivpee").__resolve("seek").call([pos]);
}
net.staugler.flivpee.javascript.Flivpage.volume = function(pos) {
	net.staugler.flivpee.javascript.Flivpage._flash.__resolve("net").__resolve("staugler").__resolve("flivpee").__resolve("flash").__resolve("Flivpee").__resolve("volume").call([pos]);
}
net.staugler.flivpee.javascript.Flivpage.find_timeline_props = function() {
	return net.staugler.flivpee.javascript.Flivpage._flash.__resolve("net").__resolve("staugler").__resolve("flivpee").__resolve("flash").__resolve("Flivpee").__resolve("find_timeline_props").call([]);
}
net.staugler.flivpee.javascript.Flivpage.toggle_fullscreen = function() {
	net.staugler.flivpee.javascript.Flivpage._flash.__resolve("net").__resolve("staugler").__resolve("flivpee").__resolve("flash").__resolve("Flivpee").__resolve("toggle_fullscreen").call([]);
}
net.staugler.flivpee.javascript.Flivpage.build_complete_ui = function(box_id) {
	var box = net.staugler.flivpee.javascript.Flivpage.find_by_id(box_id);
	net.staugler.flivpee.javascript.Flivpage.build_widget(box,net.staugler.flivpee.javascript.Flivpage.WIDGET_FLIVPEE_BOX);
	net.staugler.flivpee.javascript.Flivpage.build_widget(box,net.staugler.flivpee.javascript.Flivpage.WIDGET_MESSAGES);
	net.staugler.flivpee.javascript.Flivpage.build_widget(box,net.staugler.flivpee.javascript.Flivpage.WIDGET_TIMELINE);
	net.staugler.flivpee.javascript.Flivpage.build_widget(box,net.staugler.flivpee.javascript.Flivpage.WIDGET_DURATION);
	net.staugler.flivpee.javascript.Flivpage.build_widget(box,net.staugler.flivpee.javascript.Flivpage.WIDGET_STOP);
	net.staugler.flivpee.javascript.Flivpage.build_widget(box,net.staugler.flivpee.javascript.Flivpage.WIDGET_PAUSE);
	net.staugler.flivpee.javascript.Flivpage.build_widget(box,net.staugler.flivpee.javascript.Flivpage.WIDGET_UNPAUSE);
	net.staugler.flivpee.javascript.Flivpage.build_widget(box,net.staugler.flivpee.javascript.Flivpage.WIDGET_MUTE);
	net.staugler.flivpee.javascript.Flivpage.build_widget(box,net.staugler.flivpee.javascript.Flivpage.WIDGET_VOLUME);
}
net.staugler.flivpee.javascript.Flivpage.build_widget = function(parent,widget) {
	var w_id = "flivpee_";
	switch(widget) {
	case net.staugler.flivpee.javascript.Flivpage.WIDGET_FLIVPEE_BOX:{
		w_id += "box";
		net.staugler.flivpee.javascript.Flivpage._widgets[widget] = new net.staugler.flivpee.javascript.FlivpeeBox(net.staugler.flivpee.javascript.Flivpage.draw_div(parent,w_id));
	}break;
	case net.staugler.flivpee.javascript.Flivpage.WIDGET_MESSAGES:{
		w_id += "messages";
		net.staugler.flivpee.javascript.Flivpage._widgets[widget] = new net.staugler.flivpee.javascript.SystemMessages(net.staugler.flivpee.javascript.Flivpage.draw_div(parent,w_id));
	}break;
	case net.staugler.flivpee.javascript.Flivpage.WIDGET_DURATION:{
		w_id += "duration";
		net.staugler.flivpee.javascript.Flivpage._widgets[widget] = new net.staugler.flivpee.javascript.DurationField(net.staugler.flivpee.javascript.Flivpage.draw_div(parent,w_id));
	}break;
	case net.staugler.flivpee.javascript.Flivpage.WIDGET_STOP:{
		w_id += "stop";
		net.staugler.flivpee.javascript.Flivpage._widgets[widget] = new net.staugler.flivpee.javascript.buttons.StopButton(net.staugler.flivpee.javascript.Flivpage.draw_div(parent,w_id));
	}break;
	case net.staugler.flivpee.javascript.Flivpage.WIDGET_PAUSE:{
		w_id += "pause";
		net.staugler.flivpee.javascript.Flivpage._widgets[widget] = new net.staugler.flivpee.javascript.buttons.PauseButton(net.staugler.flivpee.javascript.Flivpage.draw_div(parent,w_id));
	}break;
	case net.staugler.flivpee.javascript.Flivpage.WIDGET_UNPAUSE:{
		w_id += "unpause";
		net.staugler.flivpee.javascript.Flivpage._widgets[widget] = new net.staugler.flivpee.javascript.buttons.UnpauseButton(net.staugler.flivpee.javascript.Flivpage.draw_div(parent,w_id));
	}break;
	case net.staugler.flivpee.javascript.Flivpage.WIDGET_MUTE:{
		w_id += "mute";
		net.staugler.flivpee.javascript.Flivpage._widgets[widget] = new net.staugler.flivpee.javascript.buttons.MuteButton(net.staugler.flivpee.javascript.Flivpage.draw_div(parent,w_id));
	}break;
	case net.staugler.flivpee.javascript.Flivpage.WIDGET_TIMELINE:{
		w_id += "timeline";
		var t = net.staugler.flivpee.javascript.Flivpage.draw_div(parent,w_id);
		var t_buffer = net.staugler.flivpee.javascript.Flivpage.draw_div(t,w_id + "_buffer");
		var t_indicator = net.staugler.flivpee.javascript.Flivpage.draw_div(t,w_id + "_indicator");
		var t_rollover = net.staugler.flivpee.javascript.Flivpage.draw_div(t,w_id + "_rollover");
		net.staugler.flivpee.javascript.Flivpage._widgets[widget] = new net.staugler.flivpee.javascript.sliders.TimelineSlider(t);
	}break;
	case net.staugler.flivpee.javascript.Flivpage.WIDGET_VOLUME:{
		w_id += "volume";
		var v = net.staugler.flivpee.javascript.Flivpage.draw_div(parent,w_id);
		var v_indicator = net.staugler.flivpee.javascript.Flivpage.draw_div(v,w_id + "_indicator");
		var v_rollover = net.staugler.flivpee.javascript.Flivpage.draw_div(v,w_id + "_rollover");
		net.staugler.flivpee.javascript.Flivpage._widgets[widget] = new net.staugler.flivpee.javascript.sliders.VolumeSlider(v);
	}break;
	}
	return net.staugler.flivpee.javascript.Flivpage._widgets[widget];
}
net.staugler.flivpee.javascript.Flivpage.find_widget = function(widget) {
	return net.staugler.flivpee.javascript.Flivpage._widgets[widget];
}
net.staugler.flivpee.javascript.Flivpage.draw_div = function(parent,id,klass,style) {
	var div = js.Lib.document.createElement("div");
	if(id != null) {
		div.setAttribute("id",id);
	}
	if(klass != null) {
		div.setAttribute("class",klass);
	}
	if(style != null) {
		div.setAttribute("style",style);
	}
	if(parent != null) {
		parent.appendChild(div);
	}
	return div;
}
net.staugler.flivpee.javascript.Flivpage.prototype.__class__ = net.staugler.flivpee.javascript.Flivpage;
js = {}
js.Lib = function() { }
js.Lib.__name__ = ["js","Lib"];
js.Lib.isIE = null;
js.Lib.isOpera = 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;
		return function() {
			return m.apply(o,arguments);
		}
	}
}
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 == 1) return o[0];
					var str = o[0] + "(";
					s += "\t";
					{
						var _g1 = 1, _g = o.length;
						while(_g1 < _g) {
							var i = _g1;
							++_g1;
							{
								if(i != 1) 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 _g1 = 0, _g = l;
					while(_g1 < _g) {
						var i1 = _g1;
						++_g1;
						str += ((i1 > 0?",":"")) + js.Boot.__string_rec(o[i1],s);
					}
				}
				str += "]";
				return str;
			}
			var tostr;
			try {
				tostr = o.toString;
			}
			catch( $e20 ) {
				{
					var e = $e20;
					{
						return "???";
					}
				}
			}
			if(tostr != null && tostr != Object.toString) {
				var s2 = o.toString();
				if(s2 != "[object Object]") return s2;
			}
			var k;
			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;
			++_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( $e21 ) {
			{
				var e = $e21;
				{
					if(cl == null) return false;
				}
			}
		}
		switch(cl) {
		case Int:{
			return (Math.ceil(o) === o) && isFinite(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 && o.__enum__ == cl) return true;
			return false;
		}break;
		}
	}
}
js.Boot.__init = function() {
	{
		js.Lib.isIE = (document.all != null && window.opera == null);
		js.Lib.isOpera = (window.opera != null);
		Array.prototype.copy = Array.prototype.slice;
		Array.prototype.insert = function(i,x) {
			this.splice(i,0,x);
		}
		Array.prototype.remove = 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 { next : function() {
				return this.arr[this.cur++];
			}, hasNext : function() {
				return this.cur < this.arr.length;
			}, arr : this, cur : 0}
		}
		String.prototype.__class__ = String;
		String.__name__ = ["String"];
		Array.prototype.__class__ = Array;
		Array.__name__ = ["Array"];
		var cca = String.prototype.charCodeAt;
		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]);
		}
		Int = new Object();
		Dynamic = new Object();
		Float = Number;
		Bool = new Object();
		Bool["true"] = true;
		Bool["false"] = false;
		$closure = js.Boot.__closure;
	}
}
js.Boot.prototype.__class__ = js.Boot;
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 { next : function() {
		var i = this.it.next();
		return this.ref[i];
	}, hasNext : function() {
		return this.it.hasNext();
	}, it : this.keys(), ref : this.h}
}
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.add("{");
	var it = this.keys();
	{ var $it22 = it;
	while( $it22.hasNext() ) { var i = $it22.next();
	{
		s.add(i);
		s.add(" => ");
		s.add(Std.string(this.get(i)));
		if(it.hasNext()) s.add(", ");
	}
	}}
	s.add("}");
	return s.toString();
}
IntHash.prototype.__class__ = IntHash;
net.staugler.flivpee.javascript.buttons.PauseButton = function(instance) { if( instance === $_ ) return; {
	net.staugler.flivpee.javascript.buttons.PageButton.apply(this,[instance]);
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_LOADING,this,$closure(this,"disable"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_PLAYING,this,$closure(this,"enable"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_STOPPED,this,$closure(this,"disable"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_PAUSED,this,$closure(this,"_app_paused"));
}}
net.staugler.flivpee.javascript.buttons.PauseButton.__name__ = ["net","staugler","flivpee","javascript","buttons","PauseButton"];
net.staugler.flivpee.javascript.buttons.PauseButton.__super__ = net.staugler.flivpee.javascript.buttons.PageButton;
for(var k in net.staugler.flivpee.javascript.buttons.PageButton.prototype ) net.staugler.flivpee.javascript.buttons.PauseButton.prototype[k] = net.staugler.flivpee.javascript.buttons.PageButton.prototype[k];
net.staugler.flivpee.javascript.buttons.PauseButton.prototype._app_paused = function(paused) {
	if(paused) {
		this.disable();
	}
	else {
		this.enable();
	}
}
net.staugler.flivpee.javascript.buttons.PauseButton.prototype._click = function() {
	net.staugler.flivpee.javascript.Flivpage.pause(true);
}
net.staugler.flivpee.javascript.buttons.PauseButton.prototype.__class__ = net.staugler.flivpee.javascript.buttons.PauseButton;
net.staugler.flivpee.javascript.DurationField = function(instance) { if( instance === $_ ) return; {
	this._inst = instance;
	this._inst.className = this._inst.id + "_base";
}}
net.staugler.flivpee.javascript.DurationField.__name__ = ["net","staugler","flivpee","javascript","DurationField"];
net.staugler.flivpee.javascript.DurationField.prototype._inst = null;
net.staugler.flivpee.javascript.DurationField.prototype._time_to_string = function(seconds) {
	var min = Math.floor(seconds / 60);
	var sec = Math.ceil(seconds % 60);
	if(sec == 60) {
		min += 1;
		sec = 0;
	}
	var str = "";
	str += min + "";
	str += ":";
	str += (sec < 10?"0" + sec:sec + "");
	return str;
}
net.staugler.flivpee.javascript.DurationField.prototype.clear = function() {
	this._inst.innerHTML = " ";
}
net.staugler.flivpee.javascript.DurationField.prototype.update = function(time,duration) {
	var new_html = "";
	new_html += "<span class=\"flivpee_duration_time\">" + this._time_to_string(time) + "</span>";
	new_html += " / ";
	new_html += "<span class=\"flivpee_duration_total\">" + this._time_to_string(duration) + "</span>";
	this._inst.innerHTML = new_html;
}
net.staugler.flivpee.javascript.DurationField.prototype.__class__ = net.staugler.flivpee.javascript.DurationField;
net.staugler.flivpee.javascript.DurationField.__interfaces__ = [net.staugler.flivpee.interfaces.FlivpeeWidget];
net.staugler.flivpee.javascript.buttons.FullscreenButton = function(instance) { if( instance === $_ ) return; {
	net.staugler.flivpee.javascript.buttons.PageButton.apply(this,[instance]);
	this.enable();
}}
net.staugler.flivpee.javascript.buttons.FullscreenButton.__name__ = ["net","staugler","flivpee","javascript","buttons","FullscreenButton"];
net.staugler.flivpee.javascript.buttons.FullscreenButton.__super__ = net.staugler.flivpee.javascript.buttons.PageButton;
for(var k in net.staugler.flivpee.javascript.buttons.PageButton.prototype ) net.staugler.flivpee.javascript.buttons.FullscreenButton.prototype[k] = net.staugler.flivpee.javascript.buttons.PageButton.prototype[k];
net.staugler.flivpee.javascript.buttons.FullscreenButton.prototype._click = function() {
	net.staugler.flivpee.javascript.Flivpage.toggle_fullscreen();
}
net.staugler.flivpee.javascript.buttons.FullscreenButton.prototype.__class__ = net.staugler.flivpee.javascript.buttons.FullscreenButton;
net.staugler.flivpee.javascript.sliders.PageSliderElement = function(instance) { if( instance === $_ ) return; {
	this._inst = instance;
	this._inst.className = this._inst.id + "_base";
}}
net.staugler.flivpee.javascript.sliders.PageSliderElement.__name__ = ["net","staugler","flivpee","javascript","sliders","PageSliderElement"];
net.staugler.flivpee.javascript.sliders.PageSliderElement.prototype._inst = null;
net.staugler.flivpee.javascript.sliders.PageSliderElement.prototype.display = function(pos) {
	this._inst.style.width = (pos * 100) + "%";
}
net.staugler.flivpee.javascript.sliders.PageSliderElement.prototype.hide = function() {
	this._inst.style.visibility = "hidden";
}
net.staugler.flivpee.javascript.sliders.PageSliderElement.prototype.show = function() {
	this._inst.style.visibility = "visible";
}
net.staugler.flivpee.javascript.sliders.PageSliderElement.prototype.__class__ = net.staugler.flivpee.javascript.sliders.PageSliderElement;
net.staugler.flivpee.javascript.EventListenerList = function(p) { if( p === $_ ) return; {
	this._l = new Array();
}}
net.staugler.flivpee.javascript.EventListenerList.__name__ = ["net","staugler","flivpee","javascript","EventListenerList"];
net.staugler.flivpee.javascript.EventListenerList.prototype._b_params = null;
net.staugler.flivpee.javascript.EventListenerList.prototype._broadcast = function(params) {
	{
		var _g1 = 0, _g = this._l.length;
		while(_g1 < _g) {
			var i = _g1;
			++_g1;
			{
				var t = this._l[i]._get_target();
				var m = this._l[i]._get_method();
				Reflect.callMethod(t,m,params);
			}
		}
	}
	this._b_params = params;
}
net.staugler.flivpee.javascript.EventListenerList.prototype._is_present = function(target,remove) {
	{
		var _g1 = 0, _g = this._l.length;
		while(_g1 < _g) {
			var i = _g1;
			++_g1;
			{
				if(this._l[i]._get_target() == target) {
					if(remove) {
						this._l.splice(i,1);
					}
					return true;
				}
			}
		}
	}
	return false;
}
net.staugler.flivpee.javascript.EventListenerList.prototype._l = null;
net.staugler.flivpee.javascript.EventListenerList.prototype.add = function(target,method) {
	if(!this._is_present(target,false)) {
		var entry = new net.staugler.flivpee.javascript.EventListenerListEntry(target,method);
		this._l.push(entry);
		if(this._b_params != null) {
			Reflect.callMethod(entry._get_target(),entry._get_method(),this._b_params);
		}
	}
	return true;
}
net.staugler.flivpee.javascript.EventListenerList.prototype.broadcast = function(params) {
	this._broadcast(params);
}
net.staugler.flivpee.javascript.EventListenerList.prototype.rem = function(target) {
	return this._is_present(target,true);
}
net.staugler.flivpee.javascript.EventListenerList.prototype.__class__ = net.staugler.flivpee.javascript.EventListenerList;
net.staugler.flivpee.javascript.EventListenerListEntry = function(target,method) { if( target === $_ ) return; {
	this._target = target;
	this._method = method;
}}
net.staugler.flivpee.javascript.EventListenerListEntry.__name__ = ["net","staugler","flivpee","javascript","EventListenerListEntry"];
net.staugler.flivpee.javascript.EventListenerListEntry.prototype._get_method = function() {
	return this._method;
}
net.staugler.flivpee.javascript.EventListenerListEntry.prototype._get_target = function() {
	return this._target;
}
net.staugler.flivpee.javascript.EventListenerListEntry.prototype._method = null;
net.staugler.flivpee.javascript.EventListenerListEntry.prototype._target = null;
net.staugler.flivpee.javascript.EventListenerListEntry.prototype.method = null;
net.staugler.flivpee.javascript.EventListenerListEntry.prototype.target = null;
net.staugler.flivpee.javascript.EventListenerListEntry.prototype.__class__ = net.staugler.flivpee.javascript.EventListenerListEntry;
net.staugler.flivpee.javascript.sliders.VolumeSlider = function(instance) { if( instance === $_ ) return; {
	net.staugler.flivpee.javascript.sliders.PageSlider.apply(this,[instance]);
	this.enable();
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_VOLUME,this,$closure(this,"_new_volume"));
}}
net.staugler.flivpee.javascript.sliders.VolumeSlider.__name__ = ["net","staugler","flivpee","javascript","sliders","VolumeSlider"];
net.staugler.flivpee.javascript.sliders.VolumeSlider.__super__ = net.staugler.flivpee.javascript.sliders.PageSlider;
for(var k in net.staugler.flivpee.javascript.sliders.PageSlider.prototype ) net.staugler.flivpee.javascript.sliders.VolumeSlider.prototype[k] = net.staugler.flivpee.javascript.sliders.PageSlider.prototype[k];
net.staugler.flivpee.javascript.sliders.VolumeSlider.prototype._click = function(pos) {
	net.staugler.flivpee.javascript.Flivpage.volume(pos);
}
net.staugler.flivpee.javascript.sliders.VolumeSlider.prototype._new_volume = function(vol) {
	this._indicator.display(vol);
}
net.staugler.flivpee.javascript.sliders.VolumeSlider.prototype.__class__ = net.staugler.flivpee.javascript.sliders.VolumeSlider;
net.staugler.flivpee.javascript.buttons.MuteButton = function(instance) { if( instance === $_ ) return; {
	net.staugler.flivpee.javascript.buttons.PageButton.apply(this,[instance]);
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_PLAYING,this,$closure(this,"enable"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_VOLUME,this,$closure(this,"_new_volume"));
}}
net.staugler.flivpee.javascript.buttons.MuteButton.__name__ = ["net","staugler","flivpee","javascript","buttons","MuteButton"];
net.staugler.flivpee.javascript.buttons.MuteButton.__super__ = net.staugler.flivpee.javascript.buttons.PageButton;
for(var k in net.staugler.flivpee.javascript.buttons.PageButton.prototype ) net.staugler.flivpee.javascript.buttons.MuteButton.prototype[k] = net.staugler.flivpee.javascript.buttons.PageButton.prototype[k];
net.staugler.flivpee.javascript.buttons.MuteButton.prototype._click = function() {
	if(!this._muted) {
		net.staugler.flivpee.javascript.Flivpage.volume(0);
	}
	else {
		var new_vol = (this._volume_buffer > 0?this._volume_buffer:.5);
		net.staugler.flivpee.javascript.Flivpage.volume(new_vol);
	}
}
net.staugler.flivpee.javascript.buttons.MuteButton.prototype._muted = null;
net.staugler.flivpee.javascript.buttons.MuteButton.prototype._new_volume = function(vol) {
	if(vol > 0) {
		this._volume_buffer = vol;
		this._muted = false;
	}
	else {
		this._muted = true;
	}
}
net.staugler.flivpee.javascript.buttons.MuteButton.prototype._volume_buffer = null;
net.staugler.flivpee.javascript.buttons.MuteButton.prototype.__class__ = net.staugler.flivpee.javascript.buttons.MuteButton;
net.staugler.flivpee.javascript.FlivpeeBox = function(instance) { if( instance === $_ ) return; {
	this._inst = instance;
	this._inst.className = this._inst.id + "_base " + this._inst.id + "_stopped";
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_LOADING,this,$closure(this,"hide"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_PLAYING,this,$closure(this,"show"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_STOPPED,this,$closure(this,"hide"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_VIDEO_NOT_FOUND,this,$closure(this,"hide"));
}}
net.staugler.flivpee.javascript.FlivpeeBox.__name__ = ["net","staugler","flivpee","javascript","FlivpeeBox"];
net.staugler.flivpee.javascript.FlivpeeBox.prototype._inst = null;
net.staugler.flivpee.javascript.FlivpeeBox.prototype.hide = function() {
	this._inst.className = this._inst.id + "_base " + this._inst.id + "_stopped";
}
net.staugler.flivpee.javascript.FlivpeeBox.prototype.show = function() {
	this._inst.className = this._inst.id + "_base " + this._inst.id + "_streaming";
}
net.staugler.flivpee.javascript.FlivpeeBox.prototype.__class__ = net.staugler.flivpee.javascript.FlivpeeBox;
net.staugler.flivpee.javascript.FlivpeeBox.__interfaces__ = [net.staugler.flivpee.interfaces.FlivpeeWidget];
net.staugler.flivpee.javascript.buttons.StopButton = function(instance) { if( instance === $_ ) return; {
	net.staugler.flivpee.javascript.buttons.PageButton.apply(this,[instance]);
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_LOADING,this,$closure(this,"_app_loading"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_STOPPED,this,$closure(this,"_app_stopped"));
	net.staugler.flivpee.javascript.Flivpage.add_event_listener(net.staugler.flivpee.javascript.Flivpage.EVENT_VIDEO_NOT_FOUND,this,$closure(this,"_app_video_not_found"));
}}
net.staugler.flivpee.javascript.buttons.StopButton.__name__ = ["net","staugler","flivpee","javascript","buttons","StopButton"];
net.staugler.flivpee.javascript.buttons.StopButton.__super__ = net.staugler.flivpee.javascript.buttons.PageButton;
for(var k in net.staugler.flivpee.javascript.buttons.PageButton.prototype ) net.staugler.flivpee.javascript.buttons.StopButton.prototype[k] = net.staugler.flivpee.javascript.buttons.PageButton.prototype[k];
net.staugler.flivpee.javascript.buttons.StopButton.prototype._app_loading = function(params) {
	this.enable();
}
net.staugler.flivpee.javascript.buttons.StopButton.prototype._app_stopped = function(params) {
	this.disable();
}
net.staugler.flivpee.javascript.buttons.StopButton.prototype._app_video_not_found = function(params) {
	this.disable();
}
net.staugler.flivpee.javascript.buttons.StopButton.prototype._click = function() {
	net.staugler.flivpee.javascript.Flivpage.stop();
}
net.staugler.flivpee.javascript.buttons.StopButton.prototype.__class__ = net.staugler.flivpee.javascript.buttons.StopButton;
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 {
		return this.hasOwnProperty.call(this.h,key);
	}
	catch( $e23 ) {
		{
			var e = $e23;
			{
				
				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 { next : function() {
		var i = this.it.next();
		return this.ref[i];
	}, hasNext : function() {
		return this.it.hasNext();
	}, it : this.keys(), ref : this.h}
}
Hash.prototype.keys = function() {
	var a = new Array();
	
			for(var i in this.h)
				a.push(i);
		;
	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.add("{");
	var it = this.keys();
	{ var $it24 = it;
	while( $it24.hasNext() ) { var i = $it24.next();
	{
		s.add(i);
		s.add(" => ");
		s.add(Std.string(this.get(i)));
		if(it.hasNext()) s.add(", ");
	}
	}}
	s.add("}");
	return s.toString();
}
Hash.prototype.__class__ = Hash;
haxe.remoting = {}
haxe.remoting.Connection = function(data,path) { if( data === $_ ) return; {
	this.__data = data;
	this.__path = path;
}}
haxe.remoting.Connection.__name__ = ["haxe","remoting","Connection"];
haxe.remoting.Connection.doCall = function(path,f,params) {
	try {
		var params1 = new haxe.Unserializer(params).unserialize();
		var obj = js.Lib.eval(path);
		var fun = Reflect.field(obj,f);
		if(fun == null) throw "Invalid remoting call : " + path + "." + f;
		var v = Reflect.callMethod(obj,fun,params1);
		var s = new haxe.Serializer();
		s.serialize(v);
		return s.toString() + "#";
	}
	catch( $e25 ) {
		{
			var e = $e25;
			{
				var s = new haxe.Serializer();
				s.serializeException(e);
				return s.toString();
			}
		}
	}
}
haxe.remoting.Connection.jsRemoting = function() {
	return "yes";
}
haxe.remoting.Connection.bind = function(name,obj) {
	_cnx[name] = obj;
}
haxe.remoting.Connection.flashConnect = function(objId) {
	var x = window.document[objId];
	if(x == null) throw "Could not find flash object '" + objId + "'";
	if(x.remotingCall == null) throw "The flash object is not ready or does not contain haxe.remoting.Connection";
	return new haxe.remoting.Connection(x,[]);
}
haxe.remoting.Connection.urlConnect = function(url) {
	return new haxe.remoting.Connection(url,[]);
}
haxe.remoting.Connection.prototype.__data = null;
haxe.remoting.Connection.prototype.__path = null;
haxe.remoting.Connection.prototype.__resolve = function(field) {
	var s = new haxe.remoting.Connection(this.__data,this.__path.copy());
	s.__path.push(field);
	return s;
}
haxe.remoting.Connection.prototype.call = function(params) {
	var p = this.__path.copy();
	var f = p.pop();
	var path = p.join(".");
	var s = new haxe.Serializer();
	s.serialize(params);
	var params1 = s.toString();
	var s1;
	if(this.__data.remotingCall == null) {
		var h = new haxe.Http(this.__data);
		h.async = false;
		h.onData = function(d) {
			s1 = d;
		}
		h.onError = function(e) {
			throw e;
		}
		h.setHeader("X-Haxe-Remoting","1");
		h.setParameter("__x",params1);
		h.request(true);
	}
	else s1 = this.__data.remotingCall(path,f,params1);
	if(s1 == null) throw "Failed to call Flash method " + this.__path.join(".");
	return new haxe.Unserializer(s1).unserialize();
}
haxe.remoting.Connection.prototype.__class__ = haxe.remoting.Connection;
$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 m = this.getMonth() + 1;
		var d = this.getDate();
		var h = this.getHours();
		var mi = this.getMinutes();
		var s = this.getSeconds();
		return this.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"];
}
{
	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);
	}
}
{
	
			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( $e26 ) {
			{
				var e = $e26;
				{
					try {
						return new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch( $e27 ) {
						{
							var e1 = $e27;
							{
								throw "Unable to create XMLHttpRequest object.";
							}
						}
					}
				}
			}
		}
	}:function($this) {
		var $r;
		throw "Unable to create XMLHttpRequest object.";
		return $r;
	}(this)));
}
{
	_cnx = new Object();
}
haxe.Timer.arr = new Array();
haxe.Timer.fqueue = new Array();
haxe.Unserializer.DEFAULT_RESOLVER = Type;
haxe.Serializer.USE_CACHE = false;
net.staugler.flivpee.javascript.Flivpage.flivpee_target = "flivpee";
net.staugler.flivpee.javascript.Flivpage.EVENT_LOADING = 0;
net.staugler.flivpee.javascript.Flivpage.EVENT_PLAYING = 1;
net.staugler.flivpee.javascript.Flivpage.EVENT_BUFFERING = 2;
net.staugler.flivpee.javascript.Flivpage.EVENT_STOPPED = 3;
net.staugler.flivpee.javascript.Flivpage.EVENT_PAUSED = 4;
net.staugler.flivpee.javascript.Flivpage.EVENT_SEEK = 5;
net.staugler.flivpee.javascript.Flivpage.EVENT_VOLUME = 6;
net.staugler.flivpee.javascript.Flivpage.EVENT_VIDEO_NOT_FOUND = 7;
net.staugler.flivpee.javascript.Flivpage.EVENT_APP_READY = 8;
net.staugler.flivpee.javascript.Flivpage.WIDGET_MESSAGES = 0;
net.staugler.flivpee.javascript.Flivpage.WIDGET_TIMELINE = 1;
net.staugler.flivpee.javascript.Flivpage.WIDGET_DURATION = 2;
net.staugler.flivpee.javascript.Flivpage.WIDGET_STOP = 3;
net.staugler.flivpee.javascript.Flivpage.WIDGET_PAUSE = 4;
net.staugler.flivpee.javascript.Flivpage.WIDGET_UNPAUSE = 5;
net.staugler.flivpee.javascript.Flivpage.WIDGET_MUTE = 6;
net.staugler.flivpee.javascript.Flivpage.WIDGET_VOLUME = 7;
net.staugler.flivpee.javascript.Flivpage.WIDGET_FLIVPEE_BOX = 8;
js.Lib.document = document;
js.Lib.window = window;
js.Lib.onerror = null;
$Main.init = net.staugler.flivpee.javascript.Flivpage.main();
