extend(ResizeTopBottom, createjs.Container);

function ResizeTopBottom(_top, _bottom){
	
	this.initialize();
	var th = this
//--------------------------------//
	var dy = 0
	var max_dSize = (__HEIGHTBG - HEIGHTGAME)/2

	listenResize(this)
	
	this.resize = function(w, h, game_w, game_h, rel){
		var rel = (game_h/__HEIGHTBG) * 100
		var full_h = h * 100/rel
		dy = (full_h - HEIGHTGAME)/2
		if(dy > max_dSize)
			dy = max_dSize
		_top.y = 0 - dy
		_bottom.y = 0 + dy		
	}
	
	ResizeGame()
}