var result_div;
var session_check = 'heck|||||||||valid|||||||||login';
var session_check_replace = 'check|||||||||valid|||||||||login';

//paging(next/previous link)
function callShoutoutAjaxPaging()
	{
		result_div = div_id;
		new AG_ajax(shout_url,'ajaxShoutout');
		return false;
	}

function ajaxShoutout(data)
	{
		data = unescape(data);
		var obj = document.getElementById(result_div);	
		if(data.indexOf(session_check)>=1)
			{
				data = data.replace(session_check_replace,'');
			}
		else
			{
				location.replace(replace_url);
				return;
			}
		obj.innerHTML = data;
		setTimeout('refreshShoutout()', refreshIntervalTime);
	}

function refreshShoutout()
	{
		callShoutoutAjaxPaging();
	}
//Function to get confirmation to delete the shoutout
function deleteShoutout(shout_url)
	{
		var get_confirm = confirm("Are your sure to delete the shoutout?");
		if (get_confirm)
			{
				window.location = shout_url;
			}
		return false;
	}
