// Copyright (c) 2008 Isos Media Ltd.

var cmsPopup = {
	dialog: function(url, title) {
		window.Shadowbox.open({
			player:  'iframe',
			content: url,
			title:   title,
			width:   550,
			height:  450
		});
		return 0;
	},
	dialogBig: function(url, title) {
		window.Shadowbox.open({
			player:  'iframe',
			content: url,
			title:   title,
			width:   600,
			height:  625
		});
		return 0;
	},
	dialogSmall: function(url, title) {
		window.Shadowbox.open({
			player:  'iframe',
			content: url,
			title:   title,
			width:   450,
			height:  300
		});
		return 0;
	},
	dialogFull: function(url, title) {
		window.Shadowbox.open({
			player:  'iframe',
			content: url,
			title:   title
		});
		return 0;
	},
	imgLib: function(title, opts) {
		var q = '';
		if(opts) {
			var x = [ ];
			for(var k in opts)
				x.push(k + '=' + encodeURIComponent(opts[k]));
			q = '?' + x.join(';');
		}
		window.Shadowbox.open({
			player:  'iframe',
			content: '/cms/picture/browser' + q,
			title:   title,
			width:   500,
			height:  500
		});
		return 0;
	},
	profilePreview: function(title) {
		window.Shadowbox.open({
			player:  'iframe',
			content: '/person/profile_preview',
			title:   title,
			width:   600
		});
		return 0;
	},
	ugPreview: function(title, id) {
		window.Shadowbox.open({
			player:  'iframe',
			content: '/cms/ug/create/preview?id=' + id,
			title:   title,
			width:   650
		});
		return 0;
	}
};

// $HeadURL: http://192.168.1.66/svn/isos/tmpl/static/cms/popup.js $
// $Id: popup.js 5293 2010-02-17 13:49:32Z mu $
