/**
 * PostManager constructor
 */
PostManager = function(oConfig, mConfig)
{
	return this.init(oConfig, mConfig);
};

/**
 * PostManager Prototype
 */
PostManager.prototype = {
	
	/**
	 * properties
	 */
	config: null,	// constructor params object
	tsel: null,		// tag selector instance
	prv: null,		// preview area manager instance
	dsel: null,		// date picker
	
	/**
	 * methods
	 */
	init : function(oConfig, mConfig)
	{
		this.config	= oConfig;
		
		this.tsel	= new TagSelector(this.config);
		this.prv	= new Preview(this.config, this.tsel);
		this.dsel	= new DateSelector(this.config);
		this.msel	= new MapSelector(mConfig);
		YAHOO.util.Event.addListener(
					this.config.formSubmitId,
					'click',
					this.confirmSubmit,
					this);
	},
	
	confirmSubmit: function(ev, me)
	{
		if(window.confirm('投稿を送信します。'))
		{
			me.tsel.setHiddens();
			YAHOO.util.Dom.get(me.config.formId).submit();
		}
	}
};
