/**
 * @author Dominik Scholz
 */

var contentproxy = {
	// vars
	window: null,
	contentLoader: null,
	styles: {
		windowStyle: {
			width: '200px',
			height: '200px'
		},
		bodyStyle: {
		}
	},
	
	// load content by url
	open: function(url, data) {
		this.contentLoader = new cx.utils.ContentLoader('WGT_ContentProxy', 'getContent', null, [url, data])
		if (!this.window || this.window.closed) this.window = new cx.controls.SpotlightWindow(this.contentLoader, this.styles);
		else this.window.load(this.contentLoader);
		return false;
	},
	
	// close content window
	close: function() {
		this.window.close();
	},
	
	// show loading indicator
	showLoadingIndicator: function() {
		this.window.showLoadingIndicator();
	}
};