function ifundVote(fundname,fundId){
		if(JRJ.bom.getCookie("ifundRating")==fundId){
			var alt = new JRJ.ui.Alerts();
			alt.alert({
				draggable : true,
				okButton : '确定',
				message:"请勿重复投票",
				title:"重复投票"
			});
			return false;
		};
		dlg = new JRJ.ui.Dialogs();
		var html = "";
		html += '<form action="http://'+fundId+'.ifund.jrj.com.cn/addFundRating.jspa" target="postformiframe" method="post">';
		html += '<div class="fdvote" name="fdvote" id="fdvote">';
		html += '<ul>';
		html += '<li><span>收&nbsp;&nbsp;&nbsp;&nbsp;益：</span>';
		html += '<div id="sy" class="vstars"></div><script type="text/javascript">$("#sy").rater({maxvalue:5});</script>';
		html += '<em>3分</em><input type="hidden" name="revenue" id="_sy" value="3"/>';
		html += '</li>';
		html += '<li><span>风险控制:&nbsp;</span>';
		html += '<div id="fxkz" class="vstars"></div><script type="text/javascript">$("#fxkz").rater({maxvalue:5});</script>';
		html += '<em>3分</em><input type="hidden" name="venture" id="_fxkz" value="3"/>';
		html += '</li>';
		html += '<li><span>服&nbsp;&nbsp;&nbsp;&nbsp;务：</span>';
		html += '<div id="fw" class="vstars"></div><script type="text/javascript">$("#fw").rater({maxvalue:5});</script>';
		html += '<em>3分</em><input type="hidden" name="service" id="_fw" value="3"/>';
		html += '</li>';
		html += '<li><label>优&nbsp;&nbsp;&nbsp;&nbsp;点：</label><input type="text" id="__merit" class="ip" onclick="clearText(this)" value="请填写您的观点"/>&nbsp;<font color="red">*</font></li>';
		html += '<li><label>缺&nbsp;&nbsp;&nbsp;&nbsp;点：</label><input type="text" id="__fault" class="ip" onclick="clearText(this)" value="请填写您的观点"/>&nbsp;<font color="red">*</font></li>';
		html += '<li><label>综&nbsp;&nbsp;&nbsp;&nbsp;合：</label><input type="text" id="__comment" class="ip" onclick="clearText(this)" value="请填写您的观点"/>&nbsp;<font color="red">*</font></li>';
		html += '</ul>';
		html += '<div class="vbtn"><input type="submit" value="提交" onclick="return checkRatingForm();cancelForm();"/><input type="button" value="取消" onclick="cancelForm();" /><div class="clear"></div></div>';
		html += '</div>';
		html += '<input type="hidden" name="Title" value="'+fundname+'('+fundId+')基金满意度评价">';
		html += '<input type="hidden" name="forumid" value="'+fundId+'">';
		html += '<input type="hidden" name="Detail" id="_Detail" value="">';
		html += '</form>';
		dlg.dialog2({content:html,
			  	title:"请发表您对"+fundname+"的评价",
			  	width:454,
			  	hasCancelBtn:false,                  
				hasOkBtn:false
			  });
}

function cancelForm() {//alert("333");
	//alert($("#jrj-dlg-base jrj-dialog")[0]);
	//$("#jrj-dlg-base jrj-dialog").remove();
	//$("#jrj-dialog-mask").remove();
	dlg.close();
}

function checkRatingForm(){
	var merit = $("#__merit").val();
	var fault = $("#__fault").val();
	var comment = $("#__comment").val();
	if(merit==""||fault==""||comment==""){
		alert("请发表评价!");
		return false;
	}else if(merit=="请填写您的观点"||fault=="请填写您的观点"||comment=="请填写您的观点"){
		alert("请发表评价!");
		return false;
	}
	var txt = ""+merit+"$#$"+fault+"$#$"+comment;
	$("#_Detail").val(txt);
	return true;
}

function loadFundRating(a){
	var callbackResult = function(){
		$("#score").html(fundRating[0].score);//alert(fundRating[0].score.round(0));
		$("#revenue").html(fundRating[0].revenue);
		var revenue_c = fundRating[0].revenue.round(0);
		revenue_c = revenue_c<5?revenue_c:5;
		$("#revenue_class").attr("class","s"+revenue_c);
		$("#venture").html(fundRating[0].venture);
		var venture_c = fundRating[0].venture.round(0);
		venture_c = venture_c<5?venture_c:5;
		$("#venture_class").attr("class","s"+venture_c);
		$("#service").html(fundRating[0].service);
		var service_c = fundRating[0].service.round(0);
		service_c = service_c<5?service_c:5;
		$("#service_class").attr("class","s"+service_c);
		$("#merit").html("优点："+fundRatingComment[0].merit);
		$("#fault").html("缺点："+fundRatingComment[0].fault);
		$("#comment").html("综合："+fundRatingComment[0].comment);
		
	}
	loadScript("/getFundRating.jspa?fundId="+a, callbackResult, "GBK");
}

function clearText(a){
	if(a.value=='请填写您的观点'){
		a.value='';
	}
}
