        function getHtmlBySql(id) {
            var resultValue = null;
            var _name = null;
            var sqlTxt = "exec eOA_Sys_Select 'eOA_cmbDataSource','SQLContent,Name','AND ID=" + id + "'";
            var obj = DBReader.selectSql(sqlTxt);
            if (obj == null || obj == undefined) {
                resultValue = null;
            }
            else {
                var rowCount = parseInt(obj.RecordCount);
                if (rowCount == 0 || rowCount == NaN) {
                    resultValue = null;
                }
                else if (typeof (obj) == "object" && rowCount > 0) {
                obj.MoveFirst();
                resultValue = obj.Fields("SQLContent").Value;
                    _name = obj.Fields('Name').Value;
                    var _sql = document.getElementById('txtSql');
                    _sql.value = unescape(resultValue);
                    var txtName = document.getElementById('txtSqlDataSource');
                    txtName.value = _name;
                    _sql = null;
                    txtName = null;
                    CollectGarbage();
                }
                else {
                    resultValue = null;
                }
            }
            DBReader.Dispose(obj);
        }
        /*选择格式*/
        function changeFormat(_val) {
            var control = document.getElementById('divSRC');
            control.style.display = "none";
            document.getElementById("SpanEndTime").style.display = "none";
            document.getElementById("isEndTime").style.display = "none";
            document.getElementById("timePara").style.display = "none";
            switch (_val) {
                case "0":
                    {
                        var _dom = document.getElementById("liDataText");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTime");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataNumeric");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataAttachment");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTable");
                        _dom.style.display = "none";
                        _dom = null;
                    }
                    break;
                case "1":
                    {
                        var _dom = document.getElementById("liDataText");
                        var dataText = document.getElementById('dataText');
                        if (dataText.value == "select" || dataText.value == "radio" || dataText.value == "checkbox") {
                            control.style.display = "";
                        }
                        _dom.style.display = "inline";
                        _dom = null;
                        _dom = document.getElementById("liDataTime");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataNumeric");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataAttachment");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTable");
                        _dom.style.display = "none";
                        _dom = null;
                    } break;
                case "2":
                    {
                        var _dom = document.getElementById("liDataText");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTime");
                        _dom.style.display = "inline";
                        document.getElementById("SpanEndTime").style.display = "";
                        document.getElementById("isEndTime").style.display = "";
                        _dom = null;
                        _dom = document.getElementById("liDataNumeric");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataAttachment");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTable");
                        _dom.style.display = "none";
                        _dom = null;
                    }
                    break;
                case "3":
                    {
                        var _dom = document.getElementById("liDataText");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTime");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataNumeric");
                        _dom.style.display = "inline";
                        _dom = null;
                        _dom = document.getElementById("liDataAttachment");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTable");
                        _dom.style.display = "none";
                        _dom = null;
                    }
                    break;
                case "4":
                    {
                        var _dom = document.getElementById("liDataText");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTime");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataNumeric");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataAttachment");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTable");
                        _dom.style.display = "none";
                        _dom = null;
                    }
                    break;
                case "5":
                    {
                        var _dom = document.getElementById("liDataText");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTime");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataNumeric");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataAttachment");
                        _dom.style.display = "none";
                        _dom = null;
                        _dom = document.getElementById("liDataTable");
                        _dom.style.display = "none";
                        _dom = null;
                    }
                    break;

            }
            CollectGarbage();
        }
        
        /*关闭窗口*/
        function windowClose() {
            ShowWindow.close();
        }
        
        /*当选择下拉框、单选、复选时显示修改模块*/
        function showEditModule(obj){
            var _val = obj.value;
            var divSRC = document.getElementById('divSRC');
            if (_val == "select" || _val == "radio" || _val == "checkbox") {
                divSRC.style.display = "block";
                var contorlFont = document.getElementById("showControl");
                contorlFont.innerText = obj[obj.selectedIndex].text;
                contorlFont = null;
                jseOA_EditInputOrModifyControl.showControlModule("1");
            } else {
                divSRC.style.display = "none";
            }
            obj = null;
            divSRC = null;
            CollectGarbage();
        }