/**
 * 
 * Javascript library
 * Windows v1.0.0
 * 
 * */

win = {
	windows: {},
	popup: function (url, name, width, height, left, top, params, content) {
		if (! width) width = 640;
		if (! height) height = 480;
		if (! left) left = (document.body.clientWidth / 2) - (width / 2);
		if (! top) top = (document.body.clientHeight / 2) - (height / 2);
		tmp = window.open(url, name, 'width='+ width +',height='+ height +',left='+ left +',top='+ top +','+ params);
		tmp.focus();
		this.windows[name] = tmp;
		return tmp;
	},
	close: function (name) {
		this.windows[name].close();
		delete this.windows[name];
		return true;
	}
}
