var c_strPluginsPath="/Plugins/";
var c_nPluginColName=0;
var c_nPluginColInterFace=1;
//var strPluginLang=2
var c_arrRegPluginsInfos=new Array(new Array(),new Array());
c_arrRegPluginsInfos[0][c_nPluginColName]="投票";//注册名
c_arrRegPluginsInfos[0][c_nPluginColInterFace]="vote";//注册接口 注意接口有vote.js和votemisc.do否则注册失败
//c_arrRegPluginsInfos[0][strPluginLang]="zh-cn";//
c_arrRegPluginsInfos[1][c_nPluginColName]="活动";
c_arrRegPluginsInfos[1][c_nPluginColInterFace]="active";
//c_arrRegPluginsInfos[1][strPluginLang]="zh-cn";


//构造插件路径0为js路径1为misc路径
function GetPluginName(nPlugType) {
	if (nPlugType==-1) {
		return cmLang.Art;
	} else {nPlugType>=0} {
		return c_arrRegPluginsInfos[nPlugType][c_nPluginColName];
	}
}
function PlugPath(nPlugType,nPlugPathType) {
	var strPlugPath=c_strPluginsPath+c_arrRegPluginsInfos[nPlugType][1]+"/"+c_arrRegPluginsInfos[nPlugType][1];
	if (nPlugPathType==0) {
		return strPlugPath+".js"
	} else if (nPlugPathType==1) {
		return strPlugPath+"misc.do"
	}
}
function PluginInterFace(nPlugType) {
	return c_arrRegPluginsInfos[nPlugType][c_nPluginColInterFace];
}
//构建删除路径
function PluginDelAobj(strObjIDs) {
	for (i=0;i<=c_arrRegPluginsInfos.length-1;i++) {
		eval(c_arrRegPluginsInfos[i][c_nPluginColInterFace]+"PlugDelOp('"+strObjIDs+"')");
	}
}
function PluginSwichDiv(strHtmlIDPrefix,nPlugType) {
	if (nPlugType<0) {
		nPlugType=$(strHtmlIDPrefix+"_Plugin_Type_select").value;
	}
	if (nPlugType>-1) {
		var nObjID=$(strHtmlIDPrefix+"_ObjInfo_hidden").value;
		var strReqForm = "objID="+nObjID;
		function responseProcess(strResponseHtml){
			$("plugin_EditContent_div").innerHTML = strResponseHtml;
		}

		if (PlugPath(nPlugType,1)!=null && PlugPath(nPlugType,1).length!=0) {
				genXMLHttpReq(1,PlugPath(nPlugType,1)+"?action=GetEditHtml",strReqForm,responseProcess);
		}
	} else {
		$("plugin_EditContent_div").innerHTML = "";
	}
}
function PluginAObjViewExpand(strHtmlIDPrefix,nPlugType,nObjID) {
	if (nPlugType==null || nPlugType=='') {
		nPlugType=$(strHtmlIDPrefix+"_Plugin_Type_input").value;
	}
	var strReqForm = "objID="+nObjID;
	if (nPlugType>-1) {
		function responseProcess(strResponseHtml){
			$("plugin_ViewContent_div").innerHTML = strResponseHtml;
		}
		if (nPlugType!=-1) {
			if (PlugPath(nPlugType,1)!=null && PlugPath(nPlugType,1).length!=0) {
				genXMLHttpReq(1,PlugPath(nPlugType,1)+"?action=GetHtml",strReqForm,responseProcess);
			}
		}
	}
}