
function checkFeed(){
	
	var jsonString = document.getElementById('currentitems').value;
	
	dojo.xhrPost({
	    form: "miniFeed", // read the url: from the action="" of the <form>
	    timeout: 3000, // give up after 3 seconds
	    handleAs: "text",
	    content: { currentitems:jsonString}, // creates ?part=one&another=part with GET, Sent as POST data when using xhrPost
	    load: function(response) {
			if(response){
				updateFeed();
			}
	   	} 
	});
}

function updateFeed(){
	dojo.xhrGet({
	    url:"feed/viewfeed",
	    content: {disableLayout:1},
	    load: function(response) {
			if(response){
				document.getElementById('mini-feed').innerHTML = response;
				dojo.style("mini-feed", "opacity", "0");
				dojo.fadeIn({node : 'mini-feed',duration:1000}).play();
			}
	   	} 
    })
}
