//为自唱投票
function usersongVote(userSongId){
	var pars="userSongId="+userSongId;
	var url="publish/publishVote.action";
	$.ajax({
		type: "GET",
		url: url,
		data: pars,
		dataType: "json",
		success:function(xml){
		var value=xml.message[0].result;
		var voteCount=xml.message[0].voteCount;
		var id=xml.message[0].id;
		if(value=="0"){
			alert("投票成功!");
			document.getElementById("voteCount_"+id).innerHTML=voteCount;
		}
		if(value=="1"){
			alert("您还没有登录!");
		}
		if(value=="error"){
			alert("发生意想不到的错误!");
		}
		if(value=="2"){
			alert("您已经投过票了，请不要重复投!");
		}
		}
	});
}/*
function postUserSongVote(url,pars){
	var myAjax = new Ajax.Request(
	                    url,
	                    {method: 'post', postBody:pars , onComplete:showSongData , onFailure:showFailed}
	                    );
}
function showFailed(request){
	alert("连接失败....");
}
function showSongData(request){
	var doc=request.responseXML.documentElement;
	var node=doc.getElementsByTagName('result');
	var value=node[0].firstChild.nodeValue;
	var voteCount=node[0].attributes.getNamedItem('voteCount').value;
	var id=node[0].attributes.getNamedItem('id').value;
	if(value=="0"){
		alert("投票成功!");
		document.getElementById("voteCount_"+id).innerHTML=voteCount;
	}
	if(value=="1"){
		alert("您还没有登录!");
	}
	if(value=="error"){
		alert("发生意想不到的错误!");
	}
	if(value=="2"){
		alert("您已经投过票了，请不要重复投!");
	}
}*/