
function nominate_topic_add_user(postid)
{
	fetch_object('nominate_topic_button_' + postid).style.display = 'none';

	var handleSuccess = function(o){
		if(o.responseText !== undefined){
			fetch_object('nominate_topic_box_' + postid).innerHTML = o.responseText;
			
			fetch_object('nominate_topic_stamps_' + postid).style.display = '';
		}
	}
	var handleFailure = function(o){
		if(o.responseText !== undefined){
			alert(o.responseText);
		}
	}
	var callback =
	{
  		success: handleSuccess,
  		failure: handleFailure
	};
	var sUrl = 'nominate_topic.php';
	var postData = 'do=nominate_topic_add_user&using_ajax=1&p=' + postid + '&securitytoken=' + SECURITYTOKEN;

	YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
}

function nominate_topic_blog_add_user(blogid)
{
	fetch_object('nominate_topic_blog_button_' + blogid).style.display = 'none';

	var handleSuccess = function(o){
		if(o.responseText !== undefined){
			fetch_object('nominate_topic_blog_box_' + blogid).innerHTML = o.responseText;
			
			fetch_object('nominate_topic_blog_stamps_' + blogid).style.display = '';
		}
	}
	var handleFailure = function(o){
		if(o.responseText !== undefined){
			alert(o.responseText);
		}
	}
	var callback =
	{
  		success: handleSuccess,
  		failure: handleFailure
	};
	var sUrl = 'nominate_topic.php';
	var postData = 'do=nominate_topic_add_user&using_ajax=1&b=' + blogid + '&securitytoken=' + SECURITYTOKEN;

	YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
}

function nominate_topic_remove_user(postid,amount)
{
	// amount = Number(amount); if (amount == 1) fetch_object('nominate_topic_stamps_' + postid).style.display = 'none';
	// NOTE: use of amount is optional; by not using, stamp display is relative to the user;

	fetch_object('nominate_topic_button_' + postid).style.display = ''

	var handleSuccess = function(o){
		if(o.responseText !== undefined){
			fetch_object('nominate_topic_box_' + postid).innerHTML = o.responseText;
			
			fetch_object('nominate_topic_stamps_' + postid).style.display = 'none';
		}
	}
	var handleFailure = function(o){
		if(o.responseText !== undefined){
			alert(o.responseText);
		}
	}
	var callback =
	{
  		success: handleSuccess,
  		failure: handleFailure
	};
	var sUrl = 'nominate_topic.php';
	var postData = 'do=nominate_topic_remove_user&using_ajax=1&p=' + postid + '&securitytoken=' + SECURITYTOKEN;

	YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
}

function nominate_topic_blog_remove_user(blogid,amount)
{
	// amount = Number(amount); if (amount == 1) fetch_object('nominate_topic_blog_stamps_' + blogid).style.display = 'none';
	// NOTE: use of amount is optional; by not using, stamp display is relative to the user;

	fetch_object('nominate_topic_blog_button_' + blogid).style.display = ''

	var handleSuccess = function(o){
		if(o.responseText !== undefined){
			fetch_object('nominate_topic_blog_box_' + blogid).innerHTML = o.responseText;
			
			fetch_object('nominate_topic_blog_stamps_' + blogid).style.display = 'none';
		}
	}
	var handleFailure = function(o){
		if(o.responseText !== undefined){
			alert(o.responseText);
		}
	}
	var callback =
	{
  		success: handleSuccess,
  		failure: handleFailure
	};
	var sUrl = 'nominate_topic.php';
	var postData = 'do=nominate_topic_remove_user&using_ajax=1&b=' + blogid + '&securitytoken=' + SECURITYTOKEN;

	YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
}

function nominate_topic_remove_all(postid)
{
	fetch_object('nominate_topic_button_' + postid).style.display = ''

	var handleSuccess = function(o){
		if(o.responseText !== undefined){
			fetch_object('nominate_topic_box_' + postid).innerHTML = o.responseText;
			fetch_object('nominate_topic_stamps_box_' + postid).innerHTML = o.responseText;
			
			fetch_object('nominate_topic_stamps_' + postid).style.display = 'none';
		}
	}
	var handleFailure = function(o){
		if(o.responseText !== undefined){
			alert(o.responseText);
		}
	}
	var callback =
	{
  		success: handleSuccess,
  		failure: handleFailure
	};
	var sUrl = 'nominate_topic.php';
	var postData = 'do=nominate_topic_remove_all&using_ajax=1&p=' + postid + '&securitytoken=' + SECURITYTOKEN;

	YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
}

function nominate_topic_blog_remove_all(blogid)
{
	fetch_object('nominate_topic_blog_button_' + blogid).style.display = ''

	var handleSuccess = function(o){
		if(o.responseText !== undefined){
			fetch_object('nominate_topic_blog_box_' + blogid).innerHTML = o.responseText;
			fetch_object('nominate_topic_blog_stamps_box_' + blogid).innerHTML = o.responseText;
			
			fetch_object('nominate_topic_blog_stamps_' + blogid).style.display = 'none';
		}
	}
	var handleFailure = function(o){
		if(o.responseText !== undefined){
			alert(o.responseText);
		}
	}
	var callback =
	{
  		success: handleSuccess,
  		failure: handleFailure
	};
	var sUrl = 'nominate_topic.php';
	var postData = 'do=nominate_topic_remove_all&using_ajax=1&b=' + blogid + '&securitytoken=' + SECURITYTOKEN;

	YAHOO.util.Connect.asyncRequest('POST', sUrl, callback, postData);
}
