var postit_date = 0;
if (!Neighborrow.PostsIt) Neighborrow.PostsIt = {};

Neighborrow.PostsIt.createPost = function(form_id) {
	$(form_id).request({onComplete: function(){
		PostsIt.listPost({postit_date: postit_date, neighborrowhoodID: $F(($(form_id))['neighborrowhoodID'])});
	}});
}

Neighborrow.PostsIt.deletePost = function(params) {
	new Ajax.Request(root + "/idea/edit.php", {parameters: params, onComplete: function(){
		PostsIt.listPost({postit_date: postit_date, neighborrowhoodID: params.neighborrowhoodID});
	}});
}

Neighborrow.PostsIt.listPost = function(params) {
	postit_date = params.postit_date;
	new Ajax.Request(root + "/views/postsIt_list.php", {method:'get', parameters: params, onComplete: function(res){
		$('post_container').innerHTML = res.responseText;
	}});
}

var PostsIt = Neighborrow.PostsIt;