extend(FloatFrame, ResizeTopBottom);

function FloatFrame()
{	
	var th = this
//--------------------------------//
	
	var top = new createjs.Container()
	var bottom = new createjs.Container()

	FloatFrame.superclass.constructor.apply(this, [top, bottom])

	var top_frame = new createjs.Sprite(jsons["JSON2"], "window_top_640x600");
	var bottom_frame = new createjs.Sprite(jsons["JSON2"], "window_bottom");
	setCoor(bottom_frame, 0, 380)
	top.addChild(top_frame)
	bottom.addChild(bottom_frame)

	this.addChild(top)
	this.addChild(bottom)

	this.addToTopPlatform = function(o, ind){
		if(typeof(ind) == "number")
			top.addChildAt(o, ind)
		else
			top.addChild(o)
	}

	this.addToBottomPlatform = function(o, ind){
		if(typeof(ind) == "number")
			bottom.addChildAt(o, ind)
		else
			bottom.addChild(o)
	}
}