function nfDeleteArticle(id){
	window.focus();
	if ('Yes' != GetInput('确定要删除此贴吗？"Yes"为确认','Yes确认')) return;
	window.open('?ct=ntdel&id='+id,'_self');
}

function nfDeleteReply(id){
	window.focus();
	if ('Yes' != GetInput('确定要删除此回复吗？"Yes"为确认','Yes确认')) return;
	window.open('?ct=nrdel&id='+id,'_self');
}

function nfEditArticle(id){
	wo('?ct=ntedit&nr=nt&id='+id);
}

function nfEditReply(id){
	wo('?ct=ntedit&nr=ry&id='+id);
}

function nfResumeArticle(id){
	window.focus();
	if ('Yes' != GetInput('确定要恢复此贴吗？"Yes"为确认','Yes确认')) return;
	window.open('?ct=ntresume&id='+id,'_self');
}

function nfResumeReply(id){
	window.focus();
	if ('Yes' != GetInput('确定要恢复此回复吗？"Yes"为确认','Yes确认')) return;
	window.open('?ct=nrresume&id='+id,'_self');
}

function nfLockArticle(id,lk){
	var n = (lk & 0x30000) / 0x10000;
	window.focus();
	var m = GetInput('0－无、1－修改、2－回复、3－所有，当前为：',n);
	if (m == '') return;
	if (n == m) return;
	window.open('?ct=ntlock&id='+id+'&lock='+m,'_self');
}

function nfLockArticleM(id,lk){
	var n = (lk & 0x30000) / 0x10000;
	window.focus();
	var m = GetInput('0－无、1－修改、2－回复、3－所有，当前为：',n);
	if (m == '') return;
	if (n == m) return;
	window.open('?ct=ntlock&id='+id+'&lock='+m,'_self');
}

function nfLockReply(id,lk){
	var n = (lk & 0x10000) / 0x10000;
	window.focus();
	var m = GetInput('0－无、1－修改，当前为：',n);
	if (m == '') return;
	if (n == m) return;
	window.open('?ct=nrlock&id='+id+'&lock='+m,'_self');
}

function nfTopArticle(id){
	var m = GetInput('0－取消置顶、1－版面置顶、2－总置顶','');
	if (m == '') return;
	window.open('?ct=nttop&id='+id+'&top='+m,'_self');
}

function nfStarArticle(id,ct){
	var n = (ct & 0xf000000) / 0x1000000;
	window.focus();
	var m = GetInput('最高15颗星，当前为：',n);
	if (m == '') return;
	if (n == m) return;
	window.open('?ct=ntstar&id='+id+'&star='+m,'_self');
}

function nfMarkArticle(id){
	wos('?ct=ntMark&id='+id);
}

function ntStar(id,s0,s1,s2,s3,s4,s5,ss){
	var i,n;
	dw('<table width="400" border="1" cellspacing="0" cellpadding="2" bordercolorlight="#4A4D4A" bordercolordark="#ffffff">'
		,'<form method="post" action="?ct=ArticleStar">'
		,'<input type="hidden" name="id" value="',id,'">'
		,'<tr class="ArticleViewTitle"><td align="center" colspan="3">评星</td></tr>'
		);
	for (i=1;i<6;i++)
	{
		dw('<tr class="Line" onmouseover="TrOver(this)" onmouseout="TrOut(this)">'
			,'<td width="20" align="center"><input type="radio" name="star" value="',i,'"></td>'
			,'<td width="90" align="center"><img src="',gsPathImages,'star/star',i,'.gif"></td>');
		if (s0 == 0)
			dw('<td width="290"><img src="',gsPathImages,'star/stars.gif" height="10" width="0"> 0(0%)</td>');
		else{
			n = Math.round((arguments[i+1] * 100) / s0);
			dw('<td width="290"><img src="',gsPathImages,'star/stars.gif" height="10" width="',n*2,'"> ',arguments[i+1],'(',n,'%)</td>');
		}
		dw('</tr>');
	}
	dw('<tr><td align="center" colspan="3"><input type="submit" class="CmdL" value="提 交">'
		,'&nbsp;&nbsp;<input type="reset" class="CmdL" value="重 选"></td></tr>');
	dw('</form></table>');
}

function ShowArticlePost(clbList,art_Time,art_Title,art_Author,art_From,art_URL,art_Data){
	dw('<center><table width="100%" border="0" cellspacing="0" cellpadding="3" bordercolorlight="#4A4D4A" bordercolordark="#ffffff">'
		, '<tr align="center"><td width="50">类别：</td><td width="*" align="left">'
		, '<select name="clbID">'
		, clbList
		, '</select>'
		, ' 延时显示：<input type="text" name="artTime" size="20" maxlength="19" value="',art_Time,'">  '
		, '<input type="checkbox" name="artModify" value="1">添加修改标志'
		, '</td></tr>'
		, '<tr align="center" height="40"><td width="50">标题：</td><td><input type="text" class="Underline" style="width:98%" maxlength="255" name="artTitle" value="',art_Title.replace(/\"/gi,'&quot;'),'"></td></tr>'
		, '<tr align="center" height="40"><td width="50">作者：</td><td><input type="text" class="Underline" style="width:98%" maxlength="255" name="artAuthor" value="',art_Author.replace(/\"/gi,'&quot;'),'"></td></tr>'
		, '<tr align="center" height="40"><td width="50">转自：</td><td><input type="text" class="Underline" style="width:98%" maxlength="255" name="artFrom" value="',art_From.replace(/\"/gi,'&quot;'),'"></td></tr>'
		, '<tr align="center" height="40"><td width="50">链接：</td><td><input type="text" class="Underline" style="width:98%" maxlength="255" name="artURL" value="',art_URL.replace(/\"/gi,'&quot;'),'"></td></tr>'
		, '<tr align="center"><td width="50">内容：</td><td height="200">'
		, '<textarea name="artData" rows="16" cols="77" class="Edit">'
		, art_Data.replace(/<br>/gi,'\n').replace(/</gi,'&lt;').replace(/>/gi,'&gt;')
		, '</textarea>'
		, '</td></tr>'
		, '<tr align="center"><td width="50">：</td><td>'
		, '<Input type="submit" value=" 确 定 " class="Normal">'
		, '&nbsp;|&nbsp;'
		, '<input type="reset"  value=" 重 写 " class="Normal">'
		, '&nbsp;|&nbsp;'
		, '<input type="button" value=" 预 览 " class="Normal" onclick="ShowPreview();">'
		, '&nbsp;|&nbsp;'
		, '<input type="button" value="刷新预览" class="Normal" onclick="ArticlePreview();">'
		, '</td></tr>'
		, '<tr id="trPreview1" style="display:none;"><td width="50">&nbsp;</td><td id="divPreview">'
		, '<b>当前无预览内容</b>'
		, '</td></tr></table></center>'
	);
}

function ArticlePreview()
{
	divPreview.innerHTML = UBBcode(document.forms[document.forms.length-1].ntData.value.replace(/\r\n/ig,'<br>'));
	if (divPreview.innerHTML == '') divPreview.innerHTML = '<b>当前无预览内容</b>'
	window.focus();
	trPreview1.style.display = 'block';
}

function ShowPreview()
{
	window.focus();

	if (trPreview1.style.display == 'block')
	{
		trPreview1.style.display = 'none';
	}
	else
		ArticlePreview();
}

