<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.database.SzPageInfo" %>
<%@ page import="net.sz600.system.SzProperties" %>
<%@ page import="net.sz600.system.SzPageHelp" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ include file="sessionInfo2.jsp"%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
</head>
<%
    String moduleName = SzConvert.strWriteData(request.getParameter("moduleName"));
    String formName = SzConvert.strWriteData(request.getParameter("formName"));
    BdFormControl formControl = new BdFormControl();
	boolean isFormEngine = true;
%>
<%@ include file="/xml/formEngine2/title.jsp"%>
<table width="100%">
  <form name="formBar" method="post">
  <tr>
    <td align="left">
      <input type="button" value="保存" class="btnClass" OnClick="javascript:FormSave(formList, 'formControl.jsp');">
      <input type="button" value="删除序号为-1的字段" class="btnClassLong" OnClick="javascript:Delete(formList, 'formControl.jsp');">            
      <input type="button" value="返回" class="btnClass" onClick="document.location.href='formIndex.jsp?module=<%=moduleName%>'">
    </td>
  </tr>
  </form>
</table>
<!-----信息列表----->
<%
		BdFormHelp bdFormHelp = new BdFormHelp();
    BdForm bdForm = new BdForm();
    BdFormInfo bdFormInfo = null;
    bdFormInfo = (BdFormInfo)bdForm.getFormInfo(moduleName, formName);
    if (bdFormInfo == null) {
      bdFormInfo = new BdFormInfo();
    }

    BdFormTableInfo bdFormTableInfo = null;
    Collection collFormTable = null;
    collFormTable = bdForm.getTableList(moduleName, formName);
    Iterator iterFormTable = null;
    if (collFormTable != null) {
      iterFormTable = collFormTable.iterator();
    }


    BdFormFieldInfo bdFormFieldInfo = null;
    Collection collFormField = null;
    Iterator iterFormField = null;
    collFormField = bdForm.getFieldList(moduleName, formName);
    if (collFormField != null) {
      iterFormField = collFormField.iterator();
    }
%>
<table width="100%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formList" method="post">
  <input type="hidden" name="OPERATOR" value="">
  <input type="hidden" name="moduleName" value="<%=moduleName%>">
  <input type="hidden" name="formName" value="<%=formName%>">
  <div id="divHidden" style="display:none">
  表格数量：<input type="text" name="tableCount" value="<%=bdFormInfo.getTableCount()%>">
  行数量：<input type="text" name="rowCount" value="<%=bdFormInfo.getRowCount()%>">
  列数量：<input type="text" name="cellCount" value="<%=bdFormInfo.getCellCount()%>">
  控件数量：<input type="text" name="objectCount" value="<%=bdFormInfo.getObjectCount()%>">
  </div>
  <tr class="trClassTitle2">
    <td rowspan="2">序号</td>
    <td rowspan="2">控件ID</td>
    <td rowspan="2">字段名</td>
    <td rowspan="2">字段说明</td>
    <td rowspan="2">字段类型</td>
    <td rowspan="2">长度</td>
    <td rowspan="2">可否空</td>
    
    <td colspan="5">列表显示属性</td>
    

    <td  rowspan="2" title="单击全部选中"><a href="#" OnClick="javascript:CheckAll('ZDCX', true);">查询</a></td>
    <td  rowspan="2" title="单击全部选中"><a href="#" OnClick="javascript:CheckAll('ZDDC', true);">导出</a></td>
    <td  rowspan="2" title="单击全部选中"><a href="#" OnClick="javascript:CheckAll('ZDDR', true);">导入</a></td>
    <td rowspan="2" >初始值</td>
    <td  rowspan="2" align="left" <% if (!isFormEngine) { out.println("style='display:none;'"); }%>>&nbsp;JS函数 (双击文本框可选择函数)</td>
    <td rowspan="2">字段状态</td>
    <td rowspan="2">所用控件</td>
    
    <td rowspan="2">字段说明</td>
    <td rowspan="2">序号</td>
  </tr>
  <tr class="trClassTitle2">
	<td>宽度</td>
  	<td>对齐</td>
    <td>加粗</td>
    <td>颜色</td>
    <td>字数</td>
  </tr>  
<%
    int j = 0;
    int i = 1;
    String tableName = "";
    String tableId = "";
    String objectStr = "";
    String tableType = "";
    while (iterFormTable != null && iterFormTable.hasNext()) {
        bdFormTableInfo = (BdFormTableInfo)iterFormTable.next();
        if (bdFormTableInfo.getGLID().equals("") || bdFormTableInfo.getGLBM().equals("")) {
            continue;
        }
        tableName = bdFormTableInfo.getGLBM();
        tableId = bdFormTableInfo.getGLID();
        if (bdFormTableInfo.getGLLX().equals("0")) {
            tableType = "普通表单";
%>
  <tr class="trClassTitle2">
    <td colspan="21" align="left"><%=tableType%>&nbsp;<%=bdFormTableInfo.getGLBM()%></td>
  </tr>
<%            
        } else {
            tableType = "明细表单";
%>
  <tr class="trClassTitle2">
    <td colspan="6" align="left"><%=tableType%>&nbsp;<%=bdFormTableInfo.getGLBM()%></td>
    <td title="查看明细详情时合计，只有数字类型的才可以合计">合计</td>
    <td colspan="10">JS函数 (双击文本框可选择函数)</td>
    <td>字段状态</td>    
    <td>所用控件</td>
    <td>字段说明</td>
    <td>序号</td>  
  </tr>
<%              
        }
        //读取字段
        objectStr = "";
%>
<%
        iterFormField = collFormField.iterator();
        while ((iterFormField != null && iterFormField.hasNext())) {
            bdFormFieldInfo = null;
            if (iterFormField != null && iterFormField.hasNext()) {
                bdFormFieldInfo = (BdFormFieldInfo)iterFormField.next();
            }
            if (!tableId.equals(bdFormFieldInfo.getTableId())) {
                continue;
            }

            if (bdFormFieldInfo == null) {
                bdFormFieldInfo = new BdFormFieldInfo();
                bdFormFieldInfo.setZDZT(1); // 默认是普通字段
                bdFormFieldInfo.setZDLX("nvarchar");
                bdFormFieldInfo.setZDCD("100");
            }
            objectStr += "," + bdFormFieldInfo.getZDID();
%>
  <tr>
    <td>
      <input type="text" name="order<%=i%>" value="<%=i%>" class="txtClass30" size="3" <%if (i==1) {out.println("disabled");}%>  OnBlur="CheckOrder(<%=i%>);" OnDblClick="javascript:this.value=-1;" >
    </td>
    <td align="center" title="双击设置公式：<%="\n"%><%=bdFormFieldInfo.getZDBY()%><%="\n"%><%=bdFormFieldInfo.getZDKZ()%>" OnMouseOver="style.cursor='hand'" OnDblClick="javascript:document.location.href='formFormula.jsp?moduleName=<%=moduleName%>&formName=<%=formName%>&fieldName=<%=bdFormFieldInfo.getZDMC()%>&fieldState=<%=bdFormFieldInfo.getZDZT()%>'">
    <% if (bdFormFieldInfo.getZDBY().equals("") 
    	&& bdFormFieldInfo.getZDKZ().equals("")
    	&& bdFormFieldInfo.getZDBQ().equals("")
    	&& bdFormFieldInfo.getZDGLMC().equals("")
    	) { %>
     <input type="text" class="txtClass50" OnMouseOver="style.cursor='hand'" name="objectId<%=i%>" value="<%=bdFormFieldInfo.getZDID()%>" readonly style="background:#D4D0C8;">
    <% } else { %>
     <input type="text" class="txtClass50" OnMouseOver="style.cursor='hand'" name="objectId<%=i%>" value="<%=bdFormFieldInfo.getZDID()%>" readonly style="background:#F29EEB;">    
    <% } %>
    </td>
    <td align="center"><input type="text" class="txtClass80" name="field<%=i%>" value="<%=bdFormFieldInfo.getZDMC()%>" OnBlur="CheckField(<%=i%>);"></td>
    <td align="center"><input type="text" class="txtClass100" name="name<%=i%>" value="<%=bdFormFieldInfo.getZDSM()%>"></td>
    <td align="center">
      <select  name="ZDLX<%=i%>" style="width:80;" onChange="javascript:ChangeZDLX(<%=i%>);">
        <option value="">==请选择==</option>
        <option value="int" <%if (bdFormFieldInfo.getZDLX().equals("int")) {%>selected<%}%>>int</option>
        <option value="nvarchar" <%if (bdFormFieldInfo.getZDLX().equals("nvarchar")) {%>selected<%}%>>nvarchar</option>
        <option value="numeric" <%if (bdFormFieldInfo.getZDLX().equals("numeric")) {%>selected<%}%>>numeric</option>
        <option value="ntext" <%if (bdFormFieldInfo.getZDLX().equals("ntext")) {%>selected<%}%>>ntext</option>
      </select>
    </td>
    <td align="center">
      <input type="text" class="txtClass50" name="ZDCD<%=i%>" value="<%=bdFormFieldInfo.getZDCD()%>">
    </td>
    <% if (bdFormTableInfo.getGLLX().equals("0")) {%>
    <td align="center">
      <select  name="ZDKK<%=i%>" style="width:60;">
        <option value="0" <%if(bdFormFieldInfo.getZDKK() == 0) {%>selected<%}%>>可以</option>
        <option value="1" <%if(bdFormFieldInfo.getZDKK() == 1) {%>selected<%}%>>不可以</option>
        <option value="2" <%if(bdFormFieldInfo.getZDKK() == 2) {%>selected<%}%>>不可重复</option>
      </select>
    </td>
    <td align="center">
      <input type="text" class="txtClassPage" name="ZDLB<%=i%>" value="<%=bdFormFieldInfo.getZDLB()%>">
    </td>
    <!-- 2011-06-07增加，列表属性 -->
    <td align="center">
      <select  name="Align<%=i%>" style="width:50;">
        <option value="">===</option>
        <option value="left" <%if(bdFormFieldInfo.getAlign().equals("left")) {%>selected<%}%>>居左</option>
        <option value="center" <%if(bdFormFieldInfo.getAlign().equals("center")) {%>selected<%}%>>居中</option>
        <option value="right" <%if(bdFormFieldInfo.getAlign().equals("right")) {%>selected<%}%>>居右</option>
      </select>      
    </td>
    <td align="center">
      <select  name="Bold<%=i%>" style="width:50;">
        <option value="">===</option>
        <option value="bold" <%if(bdFormFieldInfo.getBold().equals("bold")) {%>selected<%}%>>粗体</option>
      </select>        
    </td>
    <td align="center">
      <select  name="Color<%=i%>" style="width:50;">
        <option value="">===</option>
        <option value="#211C1A" <%if(bdFormFieldInfo.getColor().equals("#211C1A")) {%>selected<%}%>>黑色</option>
        <option value="#FFFFFF" <%if(bdFormFieldInfo.getColor().equals("##FFFFFF")) {%>selected<%}%>>白色</option>
        <option value="#EEEAEA" <%if(bdFormFieldInfo.getColor().equals("##EEEAEA")) {%>selected<%}%>>灰色</option>
        <option value="blue" <%if(bdFormFieldInfo.getColor().equals("blue")) {%>selected<%}%>>蓝色</option>
        <option value="red" <%if(bdFormFieldInfo.getColor().equals("red")) {%>selected<%}%>>红色</option>
      </select>         
    </td>
    <td align="center">
      <input type="text" class="txtClassPage" name="Maxlen<%=i%>" value="<%=bdFormFieldInfo.getMaxlen()%>">
    </td>            
    <td align="center">
      <%=SzPageHelp.checkbox("ZDCX" + i, bdFormFieldInfo.getZDCX()) %>      
    </td>
    <td align="center">
      <%=SzPageHelp.checkbox("ZDDC" + i, bdFormFieldInfo.getZDDC()) %>      
    </td>     
    <td align="center">
      <%=SzPageHelp.checkbox("ZDDR" + i, bdFormFieldInfo.getZDDR()) %>      
    </td>
    <td align="center">
      <input type="text" class="txtClass50" name="ZDCSZ<%=i%>" value="<%=bdFormFieldInfo.getZDCSZ()%>">
    </td> 
    <td align="center"  <% if (!isFormEngine) { out.println("style='display:none;'"); }%>>
      <input type="text" class="txtClass2" name="ZDHS<%=i%>" value="<%=bdFormFieldInfo.getZDHS()%>" OnDblClick="javascript:JsSelect('<%=i%>');">
    </td>      
    <td align="center">
      <select  name="ZDZT<%=i%>" style="width:60;" onChange="javascript:ChangeZDZT(<%=i%>);">
        <option value="">==请选择==</option>
        <option value="0" <%if(bdFormFieldInfo.getZDZT() == 0) {%>selected<%}%>>不使用</option>
        <option value="1" <%if(bdFormFieldInfo.getZDZT() == 1) {%>selected<%}%>>普通字段</option>
        <option value="2" <%if(bdFormFieldInfo.getZDZT() == 2) {%>selected<%}%>>关键ID</option>
        <option value="4" <%if(bdFormFieldInfo.getZDZT() == 4) {%>selected<%}%>>外键ID</option>
        <option value="3" <%if(bdFormFieldInfo.getZDZT() == 3) {%>selected<%}%>>标题字段</option>
      </select>
    </td>    
    <td align="center">
      <input type="hidden" name="ZDBJ<%=i%>" value="<%=bdFormFieldInfo.getZDBJ() %>">
      <input type="text" class="txtClass80" disabled value="<%=bdFormHelp.getZDBJname(bdFormFieldInfo.getZDBJ()) %>">
    </td>      
    <% } else { %>
    	<input type="hidden" class="txtClassPage" name="ZDKK<%=i%>" value="<%=bdFormFieldInfo.getZDKK()%>"  >
    	<input type="hidden" class="txtClassPage" name="ZDLB<%=i%>" value="<%=bdFormFieldInfo.getZDLB()%>">
    	<input type="hidden" class="txtClassPage" name="Align<%=i%>" value="<%=bdFormFieldInfo.getAlign()%>">
    	<input type="hidden" class="txtClassPage" name="Bold<%=i%>" value="<%=bdFormFieldInfo.getBold()%>">
    	<input type="hidden" class="txtClassPage" name="Color<%=i%>" value="<%=bdFormFieldInfo.getColor()%>">
    	<input type="hidden" class="txtClassPage" name="Maxlen<%=i%>" value="<%=bdFormFieldInfo.getMaxlen()%>">
    	<input type="hidden" class="txtClassPage" name="ZDDC<%=i%>" value="<%=bdFormFieldInfo.getZDDC()%>">
    	<input type="hidden" class="txtClassPage" name="ZDDR<%=i%>" value="<%=bdFormFieldInfo.getZDDR()%>">
    	<input type="hidden" class="txtClassPage" name="ZDCSZ<%=i%>" value="<%=bdFormFieldInfo.getZDCSZ()%>">
    <td align="center">
      <%=SzPageHelp.checkbox("ZDCX" + i, bdFormFieldInfo.getZDCX()) %>      
    </td>    	
    <td colspan="10">
    	<input type="text"  class="txtClass2" style="width:780;" name="ZDHS<%=i%>" value="<%=bdFormFieldInfo.getZDHS()%>"  OnDblClick="javascript:JsSelect('<%=i%>');">
    </td>
    <td align="center">
    	<input type="hidden" class="txtClassPage" name="ZDZT<%=i%>" value="<%=bdFormFieldInfo.getZDZT()%>">
    	<input type="text" class="txtClass60" disabled value="<%=bdFormHelp.getZDZTname(bdFormFieldInfo.getZDZT()) %>">
    </td>    
    <td align="center">
      <input type="hidden" name="ZDBJ<%=i%>" value="<%=bdFormFieldInfo.getZDBJ() %>">
      <input type="text" class="txtClass80" disabled value="<%=bdFormHelp.getZDBJname(bdFormFieldInfo.getZDBJ()) %>">
    </td>         
    <% } %> 
    <td align="center"><input type="text" class="txtClass100" value="<%=bdFormFieldInfo.getZDSM()%>" readonly></td>
    <td>
			<input type="text" class="txtClass50" readonly value="<%=bdFormFieldInfo.getZDID()%>" readonly style="background:#D4D0C8;">      
    </td>
  
    <input type="hidden" name="ZDBY<%=i%>" value="<%=bdFormFieldInfo.getZDBY()%>" >
    <input type="hidden" name="ZDKZ<%=i%>" value="<%=bdFormFieldInfo.getZDKZ()%>" >
    <input type="hidden" name="ZDBQ<%=i%>" value="<%=bdFormFieldInfo.getZDBQ()%>" >
    <input type="hidden" name="ZDGLMC<%=i%>" value="<%=bdFormFieldInfo.getZDGLMC()%>" >
    <input type="hidden" name="ZDGLID<%=i%>" value="<%=bdFormFieldInfo.getZDGLID()%>" >
    <input type="hidden" name="ZDGLBM<%=i%>" value="<%=bdFormFieldInfo.getZDGLBM()%>" >            
  </tr>
<%
            i ++;
       }
%>
  <div  style="display:none">
    <input type="text" name="tableId<%=j%>" value="<%=bdFormTableInfo.getGLID()%>">
    <input type="text" name="table<%=j%>" value="<%=bdFormTableInfo.getGLBM()%>">
    <input type="text" name="tableClass<%=j%>" value="<%=bdFormTableInfo.getGLLM()%>">
    <input type="text" name="object<%=j%>" value="<%=objectStr%>">
    <input type="text" name="tableType<%=j%>" value="<%=bdFormTableInfo.getGLLX()%>">
    <input type="text" name="tableMain<%=j%>" value="<%=bdFormTableInfo.getGLZB()%>">    
  </div>
<%
        j++;
   }
    
   if (i == 1 && j == 0) {
	   out.println("<tr><td colspan='21' height='100' align='center'>不存在数据表和字段，请进入“编辑界面”-“增加表格”。请注意浏览器是否拦截了“编辑界面”窗口</td></tr>");
   }
%>
  <tr class="trClassTitle2">
    <td rowspan="2">序号</td>
    <td rowspan="2">控件ID</td>
    <td rowspan="2">字段名</td>
    <td rowspan="2">字段说明</td>
    <td rowspan="2">字段类型</td>
    <td rowspan="2">长度</td>
    <td rowspan="2">可否空</td>

    <td colspan="5">列表显示属性</td>
    

    <td  rowspan="2" title="单击全部不选"><a href="#" OnClick="javascript:CheckAll('ZDCX', false);">查询</a></td>
    <td  rowspan="2" title="单击全部不选"><a href="#" OnClick="javascript:CheckAll('ZDDC', false);">导出</a></td>
    <td  rowspan="2" title="单击全部不选"><a href="#" OnClick="javascript:CheckAll('ZDDR', false);">导入</a></td>
    <td rowspan="2" >初始值</td>
    <td  rowspan="2" align="left" <% if (!isFormEngine) { out.println("style='display:none;'"); }%>>&nbsp;JS函数  (双击文本框可选择函数)</td>
    <td rowspan="2">状态</td>
    <td rowspan="2">所用控件</td>
    <td rowspan="2">字段说明</td>
    <td rowspan="2">序号</td>    
  </tr>
  <tr class="trClassTitle2">
	<td>宽度</td>
  	<td>对齐</td>
    <td>加粗</td>
    <td>颜色</td>
    <td>字数</td>
  </tr> 
  </form>
</table>

<!-----下面的工具栏------>
<table width="100%">
  <form name="formPage" method="post">
  <tr>
    <td align="left">
      <font color="red">
宽度：0表示不显示；1表示显示，不限制宽度；其他值为显示的宽度<br>
字数：空表示不限制，输入具体数字自动截取显示<br>
点击上面的“查询”为全选；点击下面的“查询”为全部不选中<br>
双击“控件ID”可以设置公式、指定关联的外部方法<br>
序号：修改序号保存后改变字段顺序<br>
删除字段：将序号设置为-1，保存后删除字段<br>

      </font>
    </td>
  </tr>
  </form>
</table>
<br>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
</form>
<script language="javascript" src="../../share/js/commonTool.js"></script>
<script language="javascript">
  function FormSave(formName, url) {

    var objectCount = parseInt(formName.objectCount.value);
    var oObject = null;
    var v = "";
    for (var i=0; i<=objectCount; i++) {
      oObject = eval("formName.field" + i);
      if (oObject != null) {
        v = oObject.value;
        if (!isLetterOrNumOrLine(v)) {
          alert("字段名只能是字母、数字、下划线");
          oObject.focus();
          //window.status = v;
          return;
        }
      }
    }
		if (confirm("确定要保存？")) {
    	//字段名只能是字母、数字
    	//字段名不能重复
    	formName.OPERATOR.value = "XMLFIELD";
    	formName.action = url;
    	formName.submit();
    }

  }

  function Delete(formName, url) {

    var objectCount = parseInt(formName.objectCount.value);
    var oObject = null;
    var v = "";
    var vCount = 0;
    for (var i=0; i<=objectCount; i++) {
      oObject = eval("formName.order" + i);
      if (oObject != null) {
        v = oObject.value;
        if (v == "-1") {
        	vCount++;
        }
      }
    }
    
		if (vCount > 0 && confirm("总共删除" + vCount + "个字段，是否继续？")) {
    	//字段名只能是字母、数字
    	//字段名不能重复
    	formName.OPERATOR.value = "DeleteFieldBat";
    	formName.action = url;
    	formName.submit();
    }

  }    
  //当改变一个字段的名字时，检查是否有重复的
  function CheckField(iIndex) {
    var oObject = null;
    oObject = eval("formList.field" + iIndex);
    var vObject = oObject.value;

    if (!isLetterOrNumOrLine(vObject)) {
      alert("字段名只能是字母、数字、下划线");
      oObject.focus();
      //window.status = v;
      return;
    }

    var objectCount = parseInt(formList.objectCount.value);
    var v = "";
    for (var i=0; i<=objectCount; i++) {
      if (iIndex == i) {
        continue;
      }
      oObject = eval("formList.field" + i);

      if (oObject != null && oObject.value == vObject) {
        alert("字段名称已经存在");
        oObject.focus();
        break;
      }
    }
  }
  
  //当改变一个字段的名字时，检查是否有重复的
  function CheckOrder(iIndex) {
    var oObject = null;
    oObject = eval("formList.order" + iIndex);
    var vObject = oObject.value;

    if (!isPrice(vObject)) {
      alert("序号只能是大于1的数字");
      oObject.focus();
      return;
    }
    if (vObject != "-1" && parseInt(vObject) <=1) {
      alert("序号只能是大于1的数字");
      oObject.focus();
      return;
    }    
  }  

  //改变字段的类型
  function ChangeZDLX(i) {
    //var oZDLX = eval("formList.type" + i);
    var oZDLX = eval("formList.ZDLX" + i);
    var oZDCD = eval("formList.ZDCD" + i);
    var vZDLX = oZDLX.value;
    if (vZDLX == "int") {
      oZDCD.value = "4";
    } else if (vZDLX == "nvarchar") {
      oZDCD.value = "100";
    } else if (vZDLX == "numeric") {
      oZDCD.value = "8,2";
    }
  }

  function ChangeZDZT(i) {
    var oZDZT = eval("formList.ZDZT" + i);
    var oZDBJ = eval("formList.ZDBJ" + i);
    var oZDKK = eval("formList.ZDKK" + i);
    var oZDLB = eval("formList.ZDLB" + i);
    var vZDZT = oZDZT.value;
    if (vZDZT == "2" || vZDZT == "4") { //关键ID、外健ID
      oZDBJ.value = "1";
      oZDKK[1].selected = true;
    } else if (vZDZT == "3") {
      oZDKK[1].selected = true;
      oZDLB.checked = true;
    } else {
      oZDKK[0].selected = true;
      oZDLB.checked = false;
    }
  }
  
  function CheckAll(vChkId, flag) {
    var objectCount = parseInt(formList.objectCount.value);
    var e;
    for (var i=1; i<=objectCount; i++) {
      e = eval("formList." + vChkId + i);
      e.checked = flag;
    }
  }
  
  function JsSelect(i) {
    //var url = "jsFunc/jsSelect.jsp?Object=" + obj;
    var obj = "formList.ZDHS" + i; 
    var url = "jsFunc/jsSelect.jsp?Object=" + obj;    
    window.showModalDialog(url,window,"status=no;dialogWidth=730px;dialogHeight=460px");       
  }

  //window.status = "1".charCodeAt(0);   //得到码值
  //String.fromCharCode(65);   //还原字符
</script>
