/**
 * Sb image form loader scripts
 *
 * @copyright (c) 2004-2008, SWsoft
 */
var SbImageFormLoader = Class.create();
SbImageFormLoader.prototype = {

	/**
	 * Indicates that form already loaded
	 *
	 * @var bool
	 * @access private
	 */
	_isLoaded: false,

	/**
	 * Initialises the class
	 *
	 * @access public
	 * @return void
	 */
	initialize: function() {
		var loader = this;
		self.sbImageFormObject.observeOnAfterOpen(
			function() {
				loader.initFormContent();
			}
		);
	},

	/**
	 * Loads form content if it is not loaded
	 *
	 * @access public
	 * @return void
	 */
	initFormContent: function() {
		if (!this._isLoaded) {
			$('sbImageFormContent').src = self.baseUrl + '/Wizard/Edit/Wysiwyg/SbImage';
			this._isLoaded = true;
		}
	}
}