﻿function addReReArticle(id, rerandom ,tid, aid ){
	document.getElementById('Replay_'+id).style.display='';
	var ReCommentDiv=document.getElementById('Replay_'+id);
	ReCommentDiv.innerHTML='<form method="post" action="" onsubmit="return check_rereArticle(this);" ><textarea name="recontent" cols="58" rows="5" class="ReplyFont"></textarea><br><div style="widht:180px; height:24px; float:left;font-size:13px;">發文驗證碼：<INPUT TYPE="text" NAME="checkno" value="" size="6" maxlength="6"> </div> <div style="padding-left:10px;float:left;"><img src="/function/checknopic.asp?str='+rerandom+'"></div><br style="clear:both;"><input value="送出" type="submit" id="btn'+id+'" class="SubmitButton" /> <input value="取消" type="button" class="SubmitButton" onclick="closeDiv(\'Replay_'+id+'\')" /><input name="re_re_id" value="'+id+'" type="hidden"><input name="aid" value="'+aid+'" type="hidden"><input name="tid" value="'+tid+'" type="hidden"><input type="hidden" name="xaction" value="addre_reply"><input name="reno" value="'+rerandom+'" type="hidden"></form>';

}

function check_rereArticle(thisform){
with(thisform){

	Str = "";
	if (recontent.value=="")  {Str=Str+"內容\n";  }
	if (checkno.value=="")  { Str=Str+"發文驗證碼\n"; }
	if (checkno.value!="" && (checkno.value!=reno.value)) { Str=Str+"發文驗證碼錯誤";  }

	if (Str!=""){
		Str = "請填寫：\n" + Str;
		alert(Str);
		recontent.focus();
		return false;
	}
	document.getElementById('btn'+re_re_id.value).disabled = true;
	document.getElementById('btn'+re_re_id.value).value='處理中..';
	

}

}


function addReArticle(nowrandom, tid, aid , pageurl ){
	document.getElementById('ArticleReplyArea').style.display='';
	var ReCommentDiv=document.getElementById('ArticleReplyArea');
	ReCommentDiv.innerHTML='<form method="post" action="" onsubmit="return check_reArticle(this)"><textarea name="recontent" cols="70" rows="5" class="ReplyFont" ></textarea><br><div style="float:left; width:180px;margin-left:10px;">發文驗證碼：<INPUT TYPE="text" NAME="checkno" value="" size="6" maxlength="6" > </div><div style="float:left;"><img src="/function/checknopic.asp?str='+nowrandom+'"></div><br style="clear:both;"><input value="送出" type="submit" id="btn1" class="SubmitButton" /><input value="取消" type="button" class="SubmitButton" onclick="document.getElementById(\'ArticleReplyArea\').style.display=\'none\';" /><input name="aid" value="'+aid+'" type="hidden">	<input name="tid" value="'+tid+'" type="hidden"><input type="hidden" name="xaction" value="addreply"><input name="reno" value="'+nowrandom+'" type="hidden"></form>'
}


function check_reArticle(thisform){
with(thisform){

	Str = "";
	if (recontent.value=="")  {Str=Str+"內容\n";  }
	if (checkno.value=="")  { Str=Str+"發文驗證碼\n"; }

	if (checkno.value!="" && (checkno.value!=reno.value)) { Str=Str+"發文驗證碼錯誤";  }

	if (Str!=""){
		Str = "請填寫：\n" + Str;
		alert(Str);
		recontent.focus();
		return false;
	}
	document.getElementById('btn1').disabled = true;
	document.getElementById('btn1').value='處理中..';

}

}

