//删除成功
var forumCategory=null;

//提交表单
do_blog_vote_edit = function(){
    if($('fileNames')!=null&&$('fileNames').value!='')
    {
		$('filePath').value=$('fileNames').value;
	}
  	var oEditor = FCKeditorAPI.GetInstance("content"); 
	var contentValue = oEditor.GetXHTML(true)
	var content = document.getElementById('content');
	content.value = contentValue;
	if (!Longway.ValidationRuleFactory.validate("blog_vote_form")) {
		return false;
	}
	//Element.show("do_blog_vote_edit_operate_message");//投票提交提示信息
	//Element.update("do_blog_vote_edit_operate_message","投票数据处理中.........");
	$("do_blog_vote_commit_button").disabled = true;//投票提交按钮变化
	var opt = {method: "post",postBody: Form.serialize($("blog_vote_form")),onSuccess: do_blog_vote_edit_success,onFailure: do_blog_vote_edit_failure,evalScript:true} 
	new Ajax.Request(toUTF8("/vote/doEdit.jhtml"), opt);	
}

//提交成功
do_blog_vote_edit_success = function(response){
		if (!processResponse(response)) {
				return;
			}
		//Element.update("do_blog_vote_edit_operate_message","添加成功！");
		var str="window.location.href='/forum/list.jhtml?forumCategoryId="+forumCategory+"'";
		showSuccessDialog("保存成功!!!",true,str);
	//	setTimeout("window.location.href='/forum/list.jhtml?forumCategoryId="+forumCategory+"'",1000);
}
//提交失败
do_blog_vote_edit_failure = function(){
		Element.update("do_blog_vote_edit_operate_message","操作失败！");
		$("do_blog_vote_commit_button").disabled = false;
}