/* Windowオブジェクト */

var WindowSystem = function (w, t) {
	this.initialize(w, t);
};
WindowSystem.prototype = {
	win: null,
	win_title: null,
	parent_win: null,
	initialize: function(w, t) {
		this.win       = xGetElementById(w);
		this.win_title = xGetElementById(t);
		if (this.win && this.win_title) {
			xEnableDragEx(this.win, this.win_title, xGetElementById('win_solid'));
		}
	},
	setCenter: function() {
		var w = Math.round((xClientWidth() - xWidth(this.win)) / 2);
		var h = Math.round((xClientHeight() - xHeight(this.win)) / 2);
		xLeft(this.win, w);
		xTop(this.win, h);
	}
};

