function more(){
	var i,str;
	str="";
	for(i=6;i<=10;i++){
		str=str+"<div class='voteNew_'>";
		str=str+"候选项"+i+"：";
		str=str+"<input type='text' name='option"+i+"' id='option"+i+"' \/>　<img src='images/del1.gif' alt='' onclick=\"javascript:del("+i+");\" style='cursor:pointer;' \/>";
		str=str+"</div>";
	}
	document.getElementById("more").innerHTML=str;
	document.getElementById("addMore").style.display="none";
}

function addIntr(){
	document.getElementById("optionIntr").style.display="";
}
function del(id)
{
	
	document.getElementById("option"+id).value='';
	document.getElementById("option"+id).focus();
}

								function showCal(d){
									document.getElementById("calbox").style.display="block";
									document.getElementById("caldot").style.display="block";
									createXMLHttpRequest();
									http_request.onreadystatechange=showCalDone;
									http_request.open("POST","calAJAX.php",true);
									http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
									http_request.send("date="+d+"&act=show");
								}
								function showCalDone(){
									if (http_request.readyState==4)
									{
										if (http_request.status==200)
										{	
											rt=http_request.responseText;
											document.getElementById("cal_content").innerHTML=rt;
										}
									}
								}
								function closeCal(){
									document.getElementById("calbox").style.display="none";
									document.getElementById("caldot").style.display="none";
								}
function showReply(id){
	var obj=document.getElementById("commentReplyDo"+id).style.display;
	if (obj=="none"){
		document.getElementById("commentReplyDo"+id).style.display='';
	}else{
		document.getElementById("commentReplyDo"+id).style.display='none';
	}
}
var commentID;
function commentReplyAdd(id,uid){
	commentID=id;
	text=document.getElementById("commentText"+id).value;
	if(text==""){
		alert("回复不能为空");
		return false;
	}
	createXMLHttpRequest();
	http_request.onreadystatechange=commentReplyAddDone;
	http_request.open("POST","commentReplyAddAJAX.php",true);
	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	http_request.send("text="+text+"&id="+id+"&act=save&uid="+uid);
}
function commentReplyAddDone(){
	if (http_request.readyState==4)
	{
		if (http_request.status==200)
		{	
			rt_r=http_request.responseText;
			
			if(rt_r!="E"){
				document.getElementById("commentReply"+commentID).innerHTML=rt_r;
				document.getElementById("commentText"+commentID).value='';
			}else{
				msgBox.ShowInfo("提示","意外原因发布失败！请重试！",function C(){;});
			}
		}
	}
}
function commentReplyDel(reID,uid,id){
	commentID=id;
	createXMLHttpRequest();
	http_request.onreadystatechange=commentReplyDelDone;
	http_request.open("POST","commentReplyAddAJAX.php",true);
	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	http_request.send("id="+id+"&act=del&uid="+uid+"&reid="+reID);
	
}
function commentReplyDelDone(){
	if (http_request.readyState==4)
	{
		if (http_request.status==200)
		{	
			rt_r=http_request.responseText;
			if(rt_r!="E"){
				document.getElementById("commentReply"+commentID).innerHTML=rt_r;
				document.getElementById("commentText"+commentID).value='';
			}else{
				msgBox.ShowInfo("提示","意外原因发布失败！请重试！",function C(){;});
			}
		}
	}
}
function classCommentReplyAdd(id,uid,classID){
	commentID=id;
	text=document.getElementById("commentText"+id).value;
	if(text==""){
		alert("回复不能为空");
		return false;
	}
	createXMLHttpRequest();
	http_request.onreadystatechange=classCommentReplyAddDone;
	http_request.open("POST","classCommentDoAJAX.php",true);
	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	http_request.send("text="+text+"&id="+id+"&act=saveReply&uid="+uid+"&classID="+classID);
}
function classCommentReplyAddDone(){
	if (http_request.readyState==4)
	{
		if (http_request.status==200)
		{	
			rt_r=http_request.responseText;
			if(rt_r!="E"){
				document.getElementById("commentReply"+commentID).innerHTML=rt_r;
				document.getElementById("commentText"+commentID).value='';
			}else{
				msgBox.ShowInfo("提示","意外原因发布失败！请重试！",function C(){;});
			}
		}
	}
}
function classCommentReplyDel(reID,uid,id,classID){
	commentID=id;
	createXMLHttpRequest();
	http_request.onreadystatechange=classCommentReplyDelDone;
	http_request.open("POST","classCommentDoAJAX.php",true);
	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	http_request.send("id="+id+"&act=delReply&uid="+uid+"&reid="+reID+"&classID="+classID);
	
}
function classCommentReplyDelDone(){
	if (http_request.readyState==4)
	{
		if (http_request.status==200)
		{	
			rt_r=http_request.responseText;
			if(rt_r!="E"){
				document.getElementById("commentReply"+commentID).innerHTML=rt_r;
				document.getElementById("commentText"+commentID).value='';
			}else{
				msgBox.ShowInfo("提示","意外原因发布失败！请重试！",function C(){;});
			}
		}
	}
}
//ass
function assCommentReplyAdd(id,uid,assID){
	commentID=id;
	text=document.getElementById("commentText"+id).value;
	if(text==""){
		alert("回复不能为空");
		return false;
	}
	createXMLHttpRequest();
	http_request.onreadystatechange=assCommentReplyAddDone;
	http_request.open("POST","assCommentDoAJAX.php",true);
	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	http_request.send("text="+text+"&id="+id+"&act=saveReply&uid="+uid+"&assID="+assID);
}
function assCommentReplyAddDone(){
	if (http_request.readyState==4)
	{
		if (http_request.status==200)
		{	
			rt_r=http_request.responseText;
			if(rt_r!="E"){
				document.getElementById("commentReply"+commentID).innerHTML=rt_r;
				document.getElementById("commentText"+commentID).value='';
			}else{
				msgBox.ShowInfo("提示","意外原因发布失败！请重试！",function C(){;});
			}
		}
	}
}
function assCommentReplyDel(reID,uid,id,assID){
	commentID=id;
	createXMLHttpRequest();
	http_request.onreadystatechange=assCommentReplyDelDone;
	http_request.open("POST","assCommentDoAJAX.php",true);
	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	http_request.send("id="+id+"&act=delReply&uid="+uid+"&reid="+reID+"&assID="+assID);
	
}
function assCommentReplyDelDone(){
	if (http_request.readyState==4)
	{
		if (http_request.status==200)
		{	
			rt_r=http_request.responseText;
			if(rt_r!="E"){
				document.getElementById("commentReply"+commentID).innerHTML=rt_r;
				document.getElementById("commentText"+commentID).value='';
			}else{
				msgBox.ShowInfo("提示","意外原因发布失败！请重试！",function C(){;});
			}
		}
	}
}
//club
function clubCommentReplyAdd(id,uid,clubID){
	commentID=id;
	text=document.getElementById("commentText"+id).value;
	if(text==""){
		alert("回复不能为空");
		return false;
	}
	createXMLHttpRequest();
	http_request.onreadystatechange=clubCommentReplyAddDone;
	http_request.open("POST","clubCommentDoAJAX.php",true);
	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	http_request.send("text="+text+"&id="+id+"&act=saveReply&uid="+uid+"&clubID="+clubID);
}
function clubCommentReplyAddDone(){
	if (http_request.readyState==4)
	{
		if (http_request.status==200)
		{	
			rt_r=http_request.responseText;
			if(rt_r!="E"){
				document.getElementById("commentReply"+commentID).innerHTML=rt_r;
				document.getElementById("commentText"+commentID).value='';
			}else{
				msgBox.ShowInfo("提示","意外原因发布失败！请重试！",function C(){;});
			}
		}
	}
}
function clubCommentReplyDel(reID,uid,id,clubID){
	commentID=id;
	createXMLHttpRequest();
	http_request.onreadystatechange=clubCommentReplyDelDone;
	http_request.open("POST","clubCommentDoAJAX.php",true);
	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	http_request.send("id="+id+"&act=delReply&uid="+uid+"&reid="+reID+"&clubID="+clubID);
	
}
function clubCommentReplyDelDone(){
	if (http_request.readyState==4)
	{
		if (http_request.status==200)
		{	
			rt_r=http_request.responseText;
			if(rt_r!="E"){
				document.getElementById("commentReply"+commentID).innerHTML=rt_r;
				document.getElementById("commentText"+commentID).value='';
			}else{
				msgBox.ShowInfo("提示","意外原因发布失败！请重试！",function C(){;});
			}
		}
	}
}

//group
function groupCommentReplyAdd(id,uid,groupID){
	commentID=id;
	text=document.getElementById("commentText"+id).value;
	if(text==""){
		alert("回复不能为空");
		return false;
	}
	createXMLHttpRequest();
	http_request.onreadystatechange=groupCommentReplyAddDone;
	http_request.open("POST","groupCommentDoAJAX.php",true);
	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	http_request.send("text="+text+"&id="+id+"&act=saveReply&uid="+uid+"&groupID="+groupID);
}
function groupCommentReplyAddDone(){
	if (http_request.readyState==4)
	{
		if (http_request.status==200)
		{	
			rt_r=http_request.responseText;
			if(rt_r!="E"){
				document.getElementById("commentReply"+commentID).innerHTML=rt_r;
				document.getElementById("commentText"+commentID).value='';
			}else{
				msgBox.ShowInfo("提示","意外原因发布失败！请重试！",function C(){;});
			}
		}
	}
}
function groupCommentReplyDel(reID,uid,id,groupID){
	commentID=id;
	createXMLHttpRequest();
	http_request.onreadystatechange=groupCommentReplyDelDone;
	http_request.open("POST","groupCommentDoAJAX.php",true);
	http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	http_request.send("id="+id+"&act=delReply&uid="+uid+"&reid="+reID+"&groupID="+groupID);
	
}
function groupCommentReplyDelDone(){
	if (http_request.readyState==4)
	{
		if (http_request.status==200)
		{	
			rt_r=http_request.responseText;
			if(rt_r!="E"){
				document.getElementById("commentReply"+commentID).innerHTML=rt_r;
				document.getElementById("commentText"+commentID).value='';
			}else{
				msgBox.ShowInfo("提示","意外原因发布失败！请重试！",function C(){;});
			}
		}
	}
}
