function showad()
{
	document.write('<table width="100%"  border="0" cellspacing="5" cellpadding="0"  align="center">');
	document.write('<tr>');
	document.write('<td width=150></td>');
	document.write('<td><a href="http://www.myoic.com/project/" target="_blank"><span class="sss1">实实在在的生意,点此索取资料!</span></a></td>');
	document.write('<td><a href="http://www.myoic.com/project/" target="_blank"><span class="sss1">小本创业项目,资料免费发放中</span></a></td>');
	document.write('</tr>');
	document.write('</table>');
}

function checkfind()
{
	if (isEmpty(search.findtitle) && isEmpty(search.findauthor))
	{
		alert('请输入搜索条件!');
		return false;
	}
}
function uf_checkform()
{
	if (isEmpty(authorform.Subject.value))
	{
		alert("请输入贴子主题！")
		authorform.Subject.focus()
		return  false;
	 }
}

function isEmpty(inputStr) 
{
	if (inputStr == "" || inputStr == null) {
		return true
	}
	return false
}

var FirstTimes = true;
var gForumPath = '/cForum/';

function ShowMasterFunction(iThreadID,sBoardID,iPage)
{
	if (iPage==null) iPage=-1;
	var isMaster = Get_Cookie('isMaster') ; //格式：001002001,001002003,
	if(isMaster == null) return true;
	if (isMaster.indexOf(sBoardID + ',') != -1)
	{
		document.write('<a href=\'#\' onclick="window.open(\''+gForumPath+'Del.asp?ThreadID='+iThreadID+'&isParent=' + FirstTimes + '&PageNo=' + iPage + '\',\'delwindow\',\'width=500,height=300,top=150,left=200,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no\');return false;"><img src=\''+gForumPath+'Images/del.gif\' width=\'23\' height=\'22\' border=\'0\' align=\'absmiddle\'>删除</a>&nbsp;&nbsp;');
		document.write('<a href=\''+gForumPath+'toBest.asp?ThreadID='+iThreadID+'&BoardID='+sBoardID+'&OPT=ADDTOBEST&isParent=' + FirstTimes + '&PageNo=' + iPage + '\'><img src=\''+gForumPath+'Images/toBest.gif\' width=\'13\' height=\'16\' border=\'0\'>放入/取消精华</a>&nbsp;&nbsp;');
		document.write('<a href=\'#\' onclick="window.open(\''+gForumPath+'toMarket.asp?BoardID='+sBoardID+'&ThreadID='+iThreadID+'&isParent=' + FirstTimes + '&PageNo=' + iPage + '\',\'tomarketwindow\',\'width=500,height=300,top=150,left=200,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no\');return false;"><img src=\''+gForumPath+'Images/money.gif\' width=\'15\' height=\'15\' border=\'0\' align=\'absmiddle\'>加入点子超市</a>&nbsp;&nbsp;');
		if (FirstTimes) 
		{
			document.write('<a href=\'#\' onclick="window.open(\''+gForumPath+'Jump.asp?ThreadID='+iThreadID+'&BoardID='+sBoardID + '&PageNo=' + iPage+'\',\'jumpwindow\',\'width=400,height=180,top=150,left=200,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no\');return false;"><img src=\''+gForumPath+'Images/Jump.gif\' width=\'14\' height=\'12\' border=\'0\' align=\'absmiddle\'>转移</a>&nbsp;&nbsp;');
			document.write('<a href=\''+gForumPath+'toTop.asp?ThreadID='+iThreadID+'&BoardID='+sBoardID + '&PageNo=' + iPage+'&OPT=REMOVEFROMTOP\'><img src=\''+gForumPath+'Images/Shift.gif\' width=\'15\' height=\'13\' border=\'0\'>固顶/取消固顶</a>&nbsp;&nbsp;');
			document.write('<a href=\''+gForumPath+'ChangeTitle.asp?BoardID='+sBoardID+'\' target=\'_blank\'><img src=\''+gForumPath+'Images/dot.gif\' width=\'15\' height=\'13\' border=\'0\'>修改本版信息</a>');
		}
		FirstTimes = false;
	}
}

function ShowMyFunction(iThreadID,isParent,UserID,iPage)
{
	if (iPage==null) iPage=-1;
	var MyID = Get_Cookie('UserID');
	if (UserID == MyID)
	{
		document.write('<tr bgcolor=\'#FFFFFF\'>');
		document.write('<td width=\'38%\' align=\'right\'><a href=\''+gForumPath+'DelSelf.asp?ThreadID=' + iThreadID + '&isParent=' + isParent + '&PageNo=' + iPage +  '&OPT=DELSELF\'  onclick=""return confirm(\'确认删除您发布的此贴吗？\')""><img src=\''+gForumPath+'Images/del.gif\' width=\'23\' height=\'22\' border=\'0\'></a></td>');
		document.write('<td width=\'62%\'><a href=\''+gForumPath+'DelSelf.asp?ThreadID=' + iThreadID + '&isParent=' + isParent + '&PageNo=' + iPage +  '&OPT=DELSELF\'   onclick=""return confirm(\'确认删除您发布的此贴吗？\')"">删除自己贴子</a></td>');
		document.write('</tr>');
		document.write('<tr bgcolor=\'#FFFFFF\'> ');
		document.write('<td width=\'38%\' align=\'right\'><a href=\''+gForumPath+'Edit.asp?ThreadID=' + iThreadID + '&isParent=' + isParent + '&PageNo=' + iPage +  '\'><img src=\''+gForumPath+'Images/edit.gif\' width=\'15\' height=\'15\' border=\'0\'></a></td>');
		document.write('<td width=\'62%\'><a href=\''+gForumPath+'Edit.asp?ThreadID=' + iThreadID + '&isParent=' + isParent + '&PageNo=' + iPage +  '\'>编辑贴子</a></td>');
		document.write('</tr>');
		if (isParent=='True')
		{
			document.write('<tr bgcolor=\'#FFFFFF\'> ');
			document.write('<td width=\'38%\' align=\'right\'><a href=\''+gForumPath+'TopSelf.asp?ThreadID=' + iThreadID + '&isParent=' + isParent + '&PageNo=' + iPage +  '\'><img src=\''+gForumPath+'Images/shift.gif\' width=\'15\' height=\'13\' border=\'0\'></a></td>');
			document.write('<td width=\'62%\'><a href=\''+gForumPath+'TopSelf.asp?ThreadID=' + iThreadID + '&isParent=' + isParent + '&PageNo=' + iPage +  '\'>固顶贴子</a></td>');
			document.write('</tr>');
		}
	}
}
