$estr = function() { return js.Boot.__string_rec(this,''); }
js = {}
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( $e0 ) {
			{
				var e = $e0;
				{
					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( $e1 ) {
		{
			var e = $e1;
			{
				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 = (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 { 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;
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;
amm = {}
amm.js = {}
amm.js.base = {}
amm.js.base.Luokka = function(p) { if( p === $_ ) return; {
	this.sisaltaa = [];
}}
amm.js.base.Luokka.__name__ = ["amm","js","base","Luokka"];
amm.js.base.Luokka.prototype.add = function(t) {
	this.sisaltaa.push(t);
}
amm.js.base.Luokka.prototype.addFirst = function(t) {
	this.sisaltaa.insert(0,t);
}
amm.js.base.Luokka.prototype.get = function(no) {
	return this.sisaltaa[no];
}
amm.js.base.Luokka.prototype.remove = function(no) {
	var d = this.sisaltaa[no];
	this.sisaltaa.remove(d);
}
amm.js.base.Luokka.prototype.sisaltaa = null;
amm.js.base.Luokka.prototype.__class__ = amm.js.base.Luokka;
amm.js.base.HtmlLuokka = function(l) { if( l === $_ ) return; {
	amm.js.base.Luokka.apply(this,[]);
	this.tama = js.Lib.document.createElement(l);
	this.setVisible(true);
	this.setDisabled(false);
}}
amm.js.base.HtmlLuokka.__name__ = ["amm","js","base","HtmlLuokka"];
amm.js.base.HtmlLuokka.__super__ = amm.js.base.Luokka;
for(var k in amm.js.base.Luokka.prototype ) amm.js.base.HtmlLuokka.prototype[k] = amm.js.base.Luokka.prototype[k];
amm.js.base.HtmlLuokka.prototype.disabled = null;
amm.js.base.HtmlLuokka.prototype.getDisabled = function() {
	return this.tama.disabled;
}
amm.js.base.HtmlLuokka.prototype.getHtmlClass = function() {
	return this.tama;
}
amm.js.base.HtmlLuokka.prototype.getVisible = function() {
	return (this.tama.style.visibility == "visible");
}
amm.js.base.HtmlLuokka.prototype.setDisabled = function(value) {
	this.tama.disabled = value;
	return this.tama.disabled;
}
amm.js.base.HtmlLuokka.prototype.setVisible = function(value) {
	if(!value) {
		this.tama.style.visibility = "hidden";
	}
	else {
		this.tama.style.visibility = "visible";
	}
	return value;
}
amm.js.base.HtmlLuokka.prototype.tama = null;
amm.js.base.HtmlLuokka.prototype.visible = null;
amm.js.base.HtmlLuokka.prototype.__class__ = amm.js.base.HtmlLuokka;
amm.js.base.Komponentti = function(l) { if( l === $_ ) return; {
	amm.js.base.HtmlLuokka.apply(this,[l]);
	this.tama.style.position = "absolute";
	this.tama.onfocus = $closure(this,"setFocus");
	this.tama.onblur = $closure(this,"lostFocus");
	this.tama.onkeydown = $closure(this,"nappipainettu");
	this.tama.onclick = $closure(this,"painettu");
	this.tama.onscroll = $closure(this,"scroll");
	this.tama.onmousedown = $closure(this,"mousedown");
	this.tama.onmousemove = $closure(this,"mousemove");
	this.tama.onmouseout = $closure(this,"mouseout");
	this.tama.onmouseover = $closure(this,"mouseover");
	this.tama.onmouseup = $closure(this,"mouseup");
	this.tama.onresize = $closure(this,"resize");
	this.missaX = 0;
	this.missaY = 0;
}}
amm.js.base.Komponentti.__name__ = ["amm","js","base","Komponentti"];
amm.js.base.Komponentti.__super__ = amm.js.base.HtmlLuokka;
for(var k in amm.js.base.HtmlLuokka.prototype ) amm.js.base.Komponentti.prototype[k] = amm.js.base.HtmlLuokka.prototype[k];
amm.js.base.Komponentti.prototype._border = null;
amm.js.base.Komponentti.prototype._h = null;
amm.js.base.Komponentti.prototype._w = null;
amm.js.base.Komponentti.prototype._x = null;
amm.js.base.Komponentti.prototype._y = null;
amm.js.base.Komponentti.prototype.addComponent = function(t) {
	this.add(t);
	this.tama.appendChild(t.tama);
	t.setX(this.missaX);
	t.setY(this.missaY);
	this.missaX += t.getWidth();
	this.missaY += t.getHeight();
}
amm.js.base.Komponentti.prototype.addFirstComponent = function(t) {
	this.addFirst(t);
	this.tama.insertBefore(t.tama,this.tama.firstChild);
}
amm.js.base.Komponentti.prototype.bgcolor = null;
amm.js.base.Komponentti.prototype.border = null;
amm.js.base.Komponentti.prototype.color = null;
amm.js.base.Komponentti.prototype.getBgColor = function() {
	return this.tama.style.backgroundColor;
}
amm.js.base.Komponentti.prototype.getBorder = function() {
	return this._border;
}
amm.js.base.Komponentti.prototype.getColor = function() {
	return this.tama.style.color;
}
amm.js.base.Komponentti.prototype.getHeight = function() {
	return this._h;
}
amm.js.base.Komponentti.prototype.getId = function() {
	return this.tama.id;
}
amm.js.base.Komponentti.prototype.getTitle = function() {
	return this.tama.innerHTML;
}
amm.js.base.Komponentti.prototype.getWidth = function() {
	return this._w;
}
amm.js.base.Komponentti.prototype.getX = function() {
	return this._x;
}
amm.js.base.Komponentti.prototype.getY = function() {
	return this._y;
}
amm.js.base.Komponentti.prototype.height = null;
amm.js.base.Komponentti.prototype.id = null;
amm.js.base.Komponentti.prototype.lostFocus = function(e) {
	if(this.onBlur != null) this.onBlur();
}
amm.js.base.Komponentti.prototype.missaX = null;
amm.js.base.Komponentti.prototype.missaY = null;
amm.js.base.Komponentti.prototype.mousedown = function(e) {
	if(this.onMouseDown != null) this.onMouseDown(e);
}
amm.js.base.Komponentti.prototype.mousemove = function(e) {
	if(this.onMouseMove != null) this.onMouseMove(e);
}
amm.js.base.Komponentti.prototype.mouseout = function(e) {
	if(this.onMouseOut != null) this.onMouseOut(e);
}
amm.js.base.Komponentti.prototype.mouseover = function(e) {
	if(this.onMouseOver != null) this.onMouseOver(e);
}
amm.js.base.Komponentti.prototype.mouseup = function(e) {
	if(this.onMouseUp != null) this.onMouseUp(e);
}
amm.js.base.Komponentti.prototype.nappipainettu = function(e) {
	if(this.onKeyDown != null) this.onKeyDown(e);
}
amm.js.base.Komponentti.prototype.onBlur = null;
amm.js.base.Komponentti.prototype.onClick = null;
amm.js.base.Komponentti.prototype.onFocus = null;
amm.js.base.Komponentti.prototype.onKeyDown = null;
amm.js.base.Komponentti.prototype.onMouseDown = null;
amm.js.base.Komponentti.prototype.onMouseMove = null;
amm.js.base.Komponentti.prototype.onMouseOut = null;
amm.js.base.Komponentti.prototype.onMouseOver = null;
amm.js.base.Komponentti.prototype.onMouseUp = null;
amm.js.base.Komponentti.prototype.onResize = null;
amm.js.base.Komponentti.prototype.onScroll = null;
amm.js.base.Komponentti.prototype.painettu = function(e) {
	if(this.onClick != null) this.onClick();
}
amm.js.base.Komponentti.prototype.removeComponent = function(no) {
	this.remove(no);
}
amm.js.base.Komponentti.prototype.resize = function(e) {
	if(this.onResize != null) this.onResize(e);
}
amm.js.base.Komponentti.prototype.scroll = function(e) {
	if(this.onScroll != null) this.onScroll();
}
amm.js.base.Komponentti.prototype.setBgColor = function(v) {
	this.tama.style.backgroundColor = "#" + v;
	return v;
}
amm.js.base.Komponentti.prototype.setBorder = function(b) {
	this._border = b;
	return b;
}
amm.js.base.Komponentti.prototype.setColor = function(v) {
	this.tama.style.color = "#" + v;
	return v;
}
amm.js.base.Komponentti.prototype.setFocus = function(e) {
	if(this.onFocus != null) this.onFocus();
}
amm.js.base.Komponentti.prototype.setHeight = function(v) {
	this.tama.style.height = v + "px";
	this._h = v;
	return v;
}
amm.js.base.Komponentti.prototype.setId = function(v) {
	this.tama.id = v;
	return v;
}
amm.js.base.Komponentti.prototype.setTitle = function(v) {
	this.tama.innerHTML = v;
	return v;
}
amm.js.base.Komponentti.prototype.setWidth = function(v) {
	this.tama.style.width = "" + v + "px";
	this._w = v;
	return v;
}
amm.js.base.Komponentti.prototype.setX = function(v) {
	this.tama.style.left = v + "px";
	this._x = v;
	return v;
}
amm.js.base.Komponentti.prototype.setY = function(v) {
	this.tama.style.top = v + "px";
	this._y = v;
	return v;
}
amm.js.base.Komponentti.prototype.title = null;
amm.js.base.Komponentti.prototype.width = null;
amm.js.base.Komponentti.prototype.x = null;
amm.js.base.Komponentti.prototype.y = null;
amm.js.base.Komponentti.prototype.__class__ = amm.js.base.Komponentti;
amm.js.components = {}
amm.js.components.AmmApplication = function(p) { if( p === $_ ) return; {
	amm.js.base.Komponentti.apply(this,["DIV"]);
	var d = this.tama;
	this.tama = d;
	js.Lib.document.getElementById("app").appendChild(this.tama);
}}
amm.js.components.AmmApplication.__name__ = ["amm","js","components","AmmApplication"];
amm.js.components.AmmApplication.__super__ = amm.js.base.Komponentti;
for(var k in amm.js.base.Komponentti.prototype ) amm.js.components.AmmApplication.prototype[k] = amm.js.base.Komponentti.prototype[k];
amm.js.components.AmmApplication.prototype.getTitle = function() {
	return js.Lib.document.title;
}
amm.js.components.AmmApplication.prototype.setTitle = function(v) {
	js.Lib.document.title = v;
	return v;
}
amm.js.components.AmmApplication.prototype.title = null;
amm.js.components.AmmApplication.prototype.__class__ = amm.js.components.AmmApplication;
FsApp = function(p) { if( p === $_ ) return; {
	amm.js.components.AmmApplication.apply(this,[]);
	this.logo = new amm.js.components.AmmImage("images/logo.jpg");
	this.addComponent(this.logo);
	this.logo.setWidth(448);
	this.logo.setHeight(600);
	this.c = 0;
	var s;
	s = "<font size='5'>Tanssikoulu Four-Step<br><br>Sievi</font><br><br><font size='3'>";
	s = s + "Tanssikoulu Four-Step toimii<br>Sievissä ja sen lähikuntien alueella,<br>";
	s = s + "tarjoten tanssinopetusta laidasta laitaan.<br>";
	s = s + "<br>";
	s = s + "Ohjelmaan kuuluu lavoilla tanssittavat<br>vakio- ja latinalaistanssit<br>ja dancebic-tanssiliikunta<br>";
	s = s + "<br>";
	s = s + "Yhteystiedot:<br>";
	s = s + "<br>";
	s = s + "Jukka Suorsa, tanssinopettaja <br>puh: 0400-287806<br>email:  <a href='mailto:jukkasuorsa@suomi24.fi'>jukkasuorsa@suomi24.fi</a><br>";
	s = s + "<br>";
	s = s + "Kurssit ovat avoinna kaikille, soita tai laita postia.<br>";
	s = s + "<br>";
	s = s + "<br>";
	s = s + "Katso lisää <a href='http://www.dancebic.com' target='new'>www.dancebic.com</a><br>tai <a target='new' href='http://www.freewebs.com/latinobic'>www.freewebs.com/latinobic</a>";
	s = s + "</font>";
	this.t1 = new amm.js.components.AmmCaption(s);
	this.t1.setVisible(false);
	this.addComponent(this.t1);
	this.t1.setX(300);
	this.t1.setY(20);
	this.t1.setWidth(200);
	this.t1.setFontSize(40);
	this.t1.setWidth(400);
	this.t1.setAlign("center");
	this.timeri = new haxe.Timer(2000);
	this.timeri.run = $closure(this,"startRun");
}}
FsApp.__name__ = ["FsApp"];
FsApp.__super__ = amm.js.components.AmmApplication;
for(var k in amm.js.components.AmmApplication.prototype ) FsApp.prototype[k] = amm.js.components.AmmApplication.prototype[k];
FsApp.prototype.c = null;
FsApp.prototype.logo = null;
FsApp.prototype.running = function() {
	if(this.c < 16) {
		this.logo.setWidth(448 - (this.c * 15));
		this.logo.setHeight(600 - (this.c * 20));
		this.c++;
	}
	else {
		this.timeri2.stop();
		this.logo.setWidth(224);
		this.logo.setHeight(300);
		this.t1.setVisible(true);
	}
}
FsApp.prototype.startRun = function() {
	this.timeri.stop();
	this.timeri = null;
	this.timeri2 = new haxe.Timer(30);
	this.timeri2.run = $closure(this,"running");
}
FsApp.prototype.t1 = null;
FsApp.prototype.timeri = null;
FsApp.prototype.timeri2 = null;
FsApp.prototype.__class__ = FsApp;
amm.js.components.AmmCaption = function(t) { if( t === $_ ) return; {
	amm.js.base.Komponentti.apply(this,["DIV"]);
	this.tama.innerHTML = t;
}}
amm.js.components.AmmCaption.__name__ = ["amm","js","components","AmmCaption"];
amm.js.components.AmmCaption.__super__ = amm.js.base.Komponentti;
for(var k in amm.js.base.Komponentti.prototype ) amm.js.components.AmmCaption.prototype[k] = amm.js.base.Komponentti.prototype[k];
amm.js.components.AmmCaption.prototype.align = null;
amm.js.components.AmmCaption.prototype.fontname = null;
amm.js.components.AmmCaption.prototype.fontsize = null;
amm.js.components.AmmCaption.prototype.getAlign = function() {
	return "";
}
amm.js.components.AmmCaption.prototype.getFontName = function() {
	return null;
}
amm.js.components.AmmCaption.prototype.getFontSize = function() {
	return 0;
}
amm.js.components.AmmCaption.prototype.setAlign = function(v) {
	this.tama.style.textAlign = v;
	return v;
}
amm.js.components.AmmCaption.prototype.setFontName = function(v) {
	this.tama.style.fontFamily = v;
	return null;
}
amm.js.components.AmmCaption.prototype.setFontSize = function(v) {
	this.tama.style.fontSize = v + "px";
	return v;
}
amm.js.components.AmmCaption.prototype.__class__ = amm.js.components.AmmCaption;
Main = function() { }
Main.__name__ = ["Main"];
Main.main = function() {
	var app = new FsApp();
}
Main.prototype.__class__ = Main;
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;
amm.js.components.AmmAnimation = function(imgsrc,delay) { if( imgsrc === $_ ) return; {
	amm.js.base.Komponentti.apply(this,["IMG"]);
	this.kuvat = [];
	this.kuvat.push(imgsrc);
	this.current = 0;
	this.tama.src = imgsrc;
	this.timeri = new haxe.Timer(delay);
	this.timeri.run = $closure(this,"vaihda");
}}
amm.js.components.AmmAnimation.__name__ = ["amm","js","components","AmmAnimation"];
amm.js.components.AmmAnimation.__super__ = amm.js.base.Komponentti;
for(var k in amm.js.base.Komponentti.prototype ) amm.js.components.AmmAnimation.prototype[k] = amm.js.base.Komponentti.prototype[k];
amm.js.components.AmmAnimation.prototype.addImage = function(imgsrc) {
	this.tama.src = imgsrc;
	this.kuvat.push(imgsrc);
}
amm.js.components.AmmAnimation.prototype.current = null;
amm.js.components.AmmAnimation.prototype.getSrc = function() {
	return this.tama.src;
}
amm.js.components.AmmAnimation.prototype.kuvat = null;
amm.js.components.AmmAnimation.prototype.setSrc = function(v) {
	this.tama.src = v;
	return v;
}
amm.js.components.AmmAnimation.prototype.src = null;
amm.js.components.AmmAnimation.prototype.timeri = null;
amm.js.components.AmmAnimation.prototype.vaihda = function() {
	this.current++;
	if(this.current > this.kuvat.length - 1) {
		this.current = 0;
	}
	this.tama.src = this.kuvat[this.current];
}
amm.js.components.AmmAnimation.prototype.__class__ = amm.js.components.AmmAnimation;
haxe = {}
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();
	}
}
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;
amm.js.components.AmmImage = function(imgsrc) { if( imgsrc === $_ ) return; {
	amm.js.base.Komponentti.apply(this,["IMG"]);
	this.tama.src = imgsrc;
}}
amm.js.components.AmmImage.__name__ = ["amm","js","components","AmmImage"];
amm.js.components.AmmImage.__super__ = amm.js.base.Komponentti;
for(var k in amm.js.base.Komponentti.prototype ) amm.js.components.AmmImage.prototype[k] = amm.js.base.Komponentti.prototype[k];
amm.js.components.AmmImage.prototype.getSrc = function() {
	return this.tama.src;
}
amm.js.components.AmmImage.prototype.setSrc = function(v) {
	this.tama.src = v;
	return v;
}
amm.js.components.AmmImage.prototype.src = null;
amm.js.components.AmmImage.prototype.__class__ = amm.js.components.AmmImage;
amm.js.components.AmmImageButton = function(img) { if( img === $_ ) return; {
	amm.js.components.AmmImage.apply(this,["res/buttons/" + img + "_2.gif"]);
	this.nimi = img;
	this.lukittu = false;
	this.tama.onmousedown = $closure(this,"nappipainettu");
	this.tama.onmouseover = $closure(this,"paalla");
	this.tama.onmouseout = $closure(this,"poissa");
	this.tama.onmouseup = $closure(this,"paalla");
	this.img0 = new amm.js.components.AmmImage("res/buttons/" + img + "_0.gif");
	this.img1 = new amm.js.components.AmmImage("res/buttons/" + img + "_1.gif");
	this.img2 = new amm.js.components.AmmImage("res/buttons/" + img + "_2.gif");
}}
amm.js.components.AmmImageButton.__name__ = ["amm","js","components","AmmImageButton"];
amm.js.components.AmmImageButton.__super__ = amm.js.components.AmmImage;
for(var k in amm.js.components.AmmImage.prototype ) amm.js.components.AmmImageButton.prototype[k] = amm.js.components.AmmImage.prototype[k];
amm.js.components.AmmImageButton.prototype.img0 = null;
amm.js.components.AmmImageButton.prototype.img1 = null;
amm.js.components.AmmImageButton.prototype.img2 = null;
amm.js.components.AmmImageButton.prototype.lukittu = null;
amm.js.components.AmmImageButton.prototype.nappipainettu = function(e) {
	if(!this.lukittu) {
		this.setSrc(this.img2.getSrc());
		if(this.onButtonClick != null) this.onButtonClick(this.nimi);
	}
}
amm.js.components.AmmImageButton.prototype.nimi = null;
amm.js.components.AmmImageButton.prototype.onButtonClick = null;
amm.js.components.AmmImageButton.prototype.paalla = function(e) {
	if(!this.lukittu) {
		this.setSrc(this.img1.getSrc());
	}
}
amm.js.components.AmmImageButton.prototype.poissa = function(e) {
	if(!this.lukittu) {
		this.setSrc(this.img0.getSrc());
	}
}
amm.js.components.AmmImageButton.prototype.valittuna = function() {
	this.setSrc(this.img2.getSrc());
	this.lukittu = true;
}
amm.js.components.AmmImageButton.prototype.vapautettuna = function() {
	this.lukittu = false;
	this.setSrc(this.img0.getSrc());
}
amm.js.components.AmmImageButton.prototype.__class__ = amm.js.components.AmmImageButton;
amm.js.components.AmmPanel = function(w,h,c) { if( w === $_ ) return; {
	amm.js.base.Komponentti.apply(this,["DIV"]);
	if(w != null) {
		this.setWidth(w);
	}
	if(h != null) {
		this.setHeight(h);
	}
	if(c != null) {
		this.setBgColor(c);
	}
}}
amm.js.components.AmmPanel.__name__ = ["amm","js","components","AmmPanel"];
amm.js.components.AmmPanel.__super__ = amm.js.base.Komponentti;
for(var k in amm.js.base.Komponentti.prototype ) amm.js.components.AmmPanel.prototype[k] = amm.js.base.Komponentti.prototype[k];
amm.js.components.AmmPanel.prototype.__class__ = amm.js.components.AmmPanel;
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;
$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"];
}
{
	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]);
	}
}
{
	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.onerror = null;
haxe.Timer.arr = new Array();
$Main.init = Main.main();

