var g_tid;
function getCommend(showid)
{
	ajax = new Ajax.Request("/ajax_server_commend.php",{parameters:"cmd=1&showid=" + showid,uonLoading:getCommendLoading(showid),onSuccess:getCommendSuccess,onFailure:getCommendError,method:'post'});
}

function getCommendLoading(showid)
{
	g_tid = showid; 
	$('showCommend' + g_tid).style.display = 'block';
	$('showCommend' + g_tid).innerHTML = 'loading.....';
}

function getCommendSuccess(res)
{
	$('showCommend' + g_tid).innerHTML = res.responseText;
}

function getCommendError()
{
    alert('错误：读取关注列表失败!');
}


function getCommendSend(showid,input_eyouid,input_email)
{
		g_tid = showid;
		ajax = new Ajax.Request("/ajax_server_commend.php",{parameters:"cmd=2&showid=" + g_tid + "&inpute=" + input_eyouid + "&inputm=" +  input_email,uonLoading:getSendLoading,onSuccess:getSendSuccess,onFailure:getSendError,method:'post'});
}
	
function getSendLoading()
{	
	//$('showCommend' + g_tid).style.display = 'none';
    $('showCommend' + g_tid).innerHTML = 'Loading.....';
}

function getSendSuccess(res)
{
	alert('推荐成功!');
    //$('showCommend' + g_tid).innerHTML = res.responseText;
	$('showCommend' + g_tid).style.display = 'none';
 
}	
 
function getSendError()
{
	alert('错误：推荐失败，请稍后再试!');
}
