function editorMenuClass(){
		this.fValue="";
		this.delField="";
		this.tabList=null;
		this.fList=null;
		this.sysField=null;
		this.selectRow=null; 	
	}
	
editorMenuClass.prototype.loadSysField=function(){ //取出所有系统字段
		var out=objAjax.getText("post","../../system/myWeb/mywebServer.aspx?type=readSysField",null,null);
		this.sysField=out.split(c1);
	}
	
editorMenuClass.prototype.loadTablist=function(){//加载已设置好配置的表
		var out=objAjax.getText("post","../../system/myWeb/mywebServer.aspx?type=readTab",null,null);
		//tabName,tabAsName,isSys,ContentPage,EditPage,DisplayType
		//0           1         2     3         4       5
		var tList=comminute(out,c1,c2);
		this.tabList=tList;
		var l=form1.selectTable.options.length;
		for (var i=0;i<l;i++){
			form1.selectTable.options[0].removeNode(true);
		}
		for (i=0;i<tList.length-1;i++){
			var opt=document.createElement("option");
			opt.text=tList[i][1];
			opt.value=tList[i][0];
			opt.isSys=tList[i][2];
			form1.selectTable.options.add(opt);
		}
		form1.selectTable.onchange=function(){
			f.loadOldData(this.value);
		}
     }
	 
editorMenuClass.prototype.loadOldData=function(table){ //装入指定表的配置
		var objResponse=new JHttpResponse();
		objResponse.write("table",table);
		var out=objAjax.getText("post","../../system/myWeb/mywebServer.aspx?type=readTabField",objResponse,null);		
		var fList=comminute(out,c1,c2);
		this.fList=fList;
		var tList=this.tabList;
		form1.tabName.readOnly=true;		
		for (var i=0;tList.length-1;i++){
			if (tList[i][0]==table){				
				form1.tabAsName.value=tList[i][1];
				form1.tabName.value=table;	
				form1.selectTable.value=table;
				form1.DisplayType.value=tList[i][5];
				form1.ContentPage.value=tList[i][3];
				form1.EditPage.value=tList[i][4];
				form1.tabAsName.value=tList[i][1];
				form1.tabName.readOnly=true
				form1.ContentPage.readOnly=true
				form1.EditPage.readOnly=true;
				form1.tabAsName.readOnly=true;
				break;
			}
		}
	}
	
function readMenuidPar(menuid,outType){//读取栏目配置信息
		var objResponse=new JHttpResponse();
		objResponse.write("menuid",menuid);	
		var out=objAjax.getText("post","../../system/myWeb/mywebServer.aspx?type=readMenuData",objResponse,null);
		if (out=="noPop"){
			return out;
		}
		out=comminute(out,c1,c2);
		if (out.length<2){
			if (out.toString()!=""){
				alert(erStr(out.toString()));
			}
			return null;
		}
	//MID,MName,IndexNum,Type,Intro,AsTab,TitleImg,menuText,Affiche,menuKey,UpListID,isNavigation, isMenu, isHidden, isReview, isHTML, PageUrl, templet,userInt, pageSize, isListFile,isHomePage,isTop,MenuIsFind
	//0,  1          2    3       4  5       6       7         8     9          10         11          12     13        14        15      16       17     18       19        20           21       22      23	 
		out=out[0];
		if (outType!=null){
			return out;
		}
		form1.menuName.value=out[1];
		form1.menuIndex.value=out[2];
		form1.menuText.value=out[7];
		form1.menuAffiche.value=out[8];
		form1.menuKey.value=out[9];
		form1.menuIntro.value=out[4];
		form1.TitleImg.value=out[6];
		form1.isTop.value=out[22];
		$("pageSize").value=out[19];
		form1.pageUrl.value=out[16];
		findCheckbox("isNavigation",out[11]);
		findCheckbox("isMenu",out[12]);
		findCheckbox("isHidden",out[13]);
		findCheckbox("isReview",out[14]);
		findCheckbox("isListFile",out[20]);
		findCheckbox("isHomePage",out[21]);
		findCheckbox("MenuIsFind",out[23]);
		findRadio("menuType",out[3])
		return out;
	}
	
editorMenuClass.prototype.readMenuPower=function(){//读取权限
	    var objResponse=new JHttpResponse();
		objResponse.write("menuid",menuid);
		objResponse.write("power","UsePower");
		var out=objAjax.getText("post","../../child/manger/mangerRun.aspx?type=readFileData",objResponse,null);
		try{
			if(parseInt(out)<1){
				out=null;
			}
		}catch(e){
		   alert(out);
		   out=null;
		}
		return out;
	}
	
editorMenuClass.prototype.readMenuInt=function(){//读取积分
	    var objResponse=new JHttpResponse();
		objResponse.write("menuid",menuid);
		objResponse.write("power","UseInt");
		var out=objAjax.getText("post","../../child/manger/mangerRun.aspx?type=readFileData",objResponse,null);
		try{
			if(parseInt(out)<1){
				out=null;
			}
		}catch(e){
		   alert(out);
		   out=null;
		}
		return out;
	}
	
editorMenuClass.prototype.saveMenu=function (){
		var v=new validate();
		v.form=document.getElementById("form1");
		if (!v.start()){  //验证必填项
		   return ;
		}else{
			var p=this.readMenuPower();//保存权限		
			if (p==null){
				return false;
			}
			var uint=this.readMenuInt("");  //保存积分规则
			if (uint==null){
				return false;
			}
			var objResponse=new JHttpResponse();
			objResponse.write("menuid",menuid);
			objResponse.write("powerid",p);
			objResponse.write("userInt",uint);
			objResponse.write("asTab",form1.selectTable.value);
			if (pType!="modi"){
				form1.action="../../system/myWeb/mywebServer.aspx?type=add";
				var out=objAjax.submit(form1,"post",true,objResponse);
			}else{
				form1.action="../../system/myWeb/mywebServer.aspx?type=modiMenu";
				var out=objAjax.submit(form1,"post",true,objResponse);
			}
			
			if (out.search("OK")>=0){
				if (pType!="modi"){
					out=comminute(out,"|",",");
					alert("操作成功，"+out[1][0]+"个栏目已成功创建");
					form1.menuName.value="";
					if (isClear.checked){
						for (var i=0;i<form1.elements.length;i++){
							var e = form1.elements[i];
							if (e.type!="button"){
								e.value="";
							}
						}
						var url=location.href;
						location.href=url;
					}
				}else{
					alert("操作成功, 栏目已修改");
				}				
			}else{
				alert(out);
				return null;
			}
		}
	}
	
editorMenuClass.prototype.upfile=function(obj){//设置题图
		  var arr=showModalDialog("../../system/sysSetup/filesManage.htm?mode=u&type=9&t="+create_id(), window, "dialogWidth:800px; dialogHeight:560px; toolbar=no;location=no;directories=no;status=no;menubar=no;scroll=auto;resizable=0;help=0");
		  if(typeof arr=="undefined"){
			  return false;
		  }else{
			  var url=arr;
			  var textobj=obj.previousSibling;
			  url=url.replace("../../","/");
			  url=url.replace(c1,"");
			  textobj.value=url;
		  }
	}
editorMenuClass.prototype.displayUpFile=function(obj){//打开图片
		return
	}
editorMenuClass.prototype.saveTitleImg=function(obj){//设置题图应用到子项
		if ( menuid==null | menuid=="" ){
			 return;
		}		
	    var objResponse=new JHttpResponse();
	    objResponse.write("menuid",menuid);	
		var TImg=$("TitleImg").value;
	    objResponse.write("TImg",TImg);	
    	var out=objAjax.getText("post","../../system/myWeb/mywebServer.aspx?type=saveTitleImg",objResponse,null);
		try{
			if(out==1){
				alert(obj.value+"成功");
			}
		}
		catch(e){
			alert(obj.value+"失败");
		}
	}
	
editorMenuClass.prototype.edit=function(obj){//编辑文本	
		var textobj=obj.previousSibling;
				var arr=showModalDialog("../../system/Editor/Edit.htm?id="+textobj.id+"&t="+create_id(), window, "dialogWidth:620px; dialogHeight:535px; toolbar=no;location=no;directories=no;status=no;menubar=no;scroll=auto;resizable=0;help=0");		
		if (arr!=null&&typeof arr!="undefined"){
			var textobj=obj.previousSibling;
			textobj.value=arr;
		}
	}
editorMenuClass.prototype.readIsPop=function(obj){
		var objResponse=new JHttpResponse();
		objResponse.write("menuid",obj);
		var out=objAjax.getText("post","mangerRun.aspx?type=readChild",objResponse,null);
 		if(out=="noPop"){
			return false
		}
		if(out.indexOf(c1)==-1){
			return false
		}
		return true
	}