/*
* 功能：处理问卷调查部分
*/
function setVoteUrl() {
	var voteForm = document.getElementById("webvote");
	return showVoteInfo(voteForm.voteid.value);
}
/*
* 查看指定调查的结果
*/
function showVoteInfo(voteid){
	var url = "?voteid=" + voteid;
	window.open("webVoteInfoAction!show.action" + url, "_VoteWin", "width=400px,height=200px,top=200,left=300");
	return false;
}
///LSW
function checkVote(){
var vote_num=$j('input[name=contentid]').length;
if(vote_num==0){
alert("对不起，暂时无法进行投票！");
return false;
}else{
var result='?';
var chks=$j('input[name=contentid]:checked');
var $_chks=$j(chks);
$_chks.each(function(ind){
	result=result+'contentid='+$j(this).val()+'&';
});
if(result=='?'){
alert("请选择你要投票的选项！");
return false;
}else{
var d=result.substring(1,result.length-1);
$j.ajax({type:"get",url:rootpath+"/webVoteInfoAction!isHasVote.action",data:d,cache:false,
datatype:"html",success:function(data){
if(data=="true"){
	alert('对不起，您已经参与过调查了！');
}else{
	result=result.substring(0,result.length-1);
	window.open("webVoteInfoAction!save.action" + result, "_VoteWin", "width=400px,height=200px,top=200,left=300");
}}});}}return false;
}
