function adminOperate(obj,url)
{
	var action = obj.options[obj.selectedIndex].value;
	if (action == '')
	{
		obj.options[0].selected = true;
		return;
	}
	var f = document.forms['admin'];
	var idList = '';
	for (i=f.elements.length; i>0; i--)
	{
		if (f.elements[i-1].type.toLowerCase() == "checkbox")
		{
			if (f.elements[i-1].checked)
			{
				idList += f.elements[i-1].value.toString() + ",";
			}
		}
	}
	if (action == 'check')
	{
		location.href = url + 'accesstopic.aspx';
		return ;
	} 
	if (idList == '')
	{
		alert('没有选择任何记录行');
		obj.options[0].selected = true;
		return;
	}
	idList = idList.substring(0, idList.length - 1);
	if (action == 'signed')
	{
		location.href = url + 'topic_signed.aspx?topicid=' + idList;
	}else if (action == 'move')
	{
		location.href = url + 'topic_move.aspx?topicid=' + idList;
	}
	else if (action == 'delete')
	{
		location.href = url + 'topic_delete.aspx?topicid=' + idList;
	}
	else if (action == 'top')
	{
		location.href = url + 'topic_SetTopTime.aspx?action=top&topicid=' + idList;
	}
	else if (action =='topall')
	{
		location.href = url + 'topic_SetTopTime.aspx?action=topall&topicid=' + idList;
	}
	else
	{
		f.event.value = action;
		f.action = location.href;
		f.submit();	
	}
}
///URL操作页面（含参数),Target:操作结果显示区域.
function AddItem(URL,Target)
{	
	var dvajax = new DvAjax();
	try
	{
		var resultobj  = dvajax.Request('get',URL,'',null,true);
		var resultdata = resultobj.responseText;
		//alert(resultdata + "\n\n" + MsgMatch(resultdata)); $("s").innerHTML=resultdata;
		if(resultdata.indexOf('Success1')!=-1)
		{
			DisResult('您的收藏项目数量已经达到系统允许最大数!',Target);
			setTimeout("UnDis('"+Target+"')",2000);
		}
		else if(resultdata.indexOf('Success2')!=-1)
		{
			DisResult("您已经收藏该项了",Target);
			setTimeout("UnDis('"+Target+"')",2000);
		}
		else if(resultdata.indexOf('Success3')!=-1)
		{
			DisResult('成功收藏该项到您的收藏夹',Target);
            setTimeout("UnDis('"+Target+"')",2000);
		}
		else
		{
			DisResult('收藏失败，请检查您是否登录？',Target);
			setTimeout("UnDis('"+Target+"')",2000);
		}
	}
	finally
	{
		if(dvajax!=null)
		{
			dvajax.Dispose();
			dvajax = null;
		}
	}
}
///区域显示
function DisResult(message,Target)
{
  $(Target).style.display='';
  $(Target).innerHTML=message;
}
///隐藏显示
function UnDis(Target)
{
  $(Target).innerHTML='';
  $(Target).style.display='none';
}

function switchTopicOpenMode(box)
{
	var isPopNew   = box.checked;
	var anchorTags = document.getElementsByTagName('a');
	for (var i=0; i<anchorTags.length; i++)
	{
		if (anchorTags[i].getAttribute('name') != 'topiclink') continue;
		anchorTags[i].target = isPopNew ? '_blank' : '_self';
	}
}