var win;

function showItem(url, width, height) {
	if ($('item') == null) {
		win = new Window('item', {className: 'alphacube', resizable: false, zIndex: 100, maximizable: false, showEffect: Effect.Appear, hideEffect: Effect.SwitchOff, draggable: true});	
		win.setSize(width, height);
		win.setAjaxContent(url, {asynchronous: true}, true, false);
		win.setDestroyOnClose();
		win.setCloseCallback(
			function romoveSound() {
				win.setHTMLContent('');
				return true;
			}
		);
		win.toFront();
		win.showCenter();
	} else {
		win.setAjaxContent(url, {asynchronous: true}, true, false);
	}
}

function insertEditor(path, title, type) {
	win.setHTMLContent('');
	if ($('search') != null) {
		item.destroy();
	}
	win.destroy();
	window.frames['editFrame'].insertEditor(path, title, type);
}