function SelectModelType(){var TypeCount=document.getElementsByName("Type");for(var i=1;i<TypeCount.length;i++){var DivType=eval("Div"+TypeCount[i].value);if(TypeCount[i].checked){DivType.style.display=""}else{DivType.style.display="none"}}}function SelModelType(){var TypeCount=document.getElementsByName("ModelSort");for(var i=1;i<TypeCount.length;i++){if(TypeCount[i].checked){if(TypeCount[i].value=="1"){$("txtSysTabelName").value="Qianbo_U_"}else{if(TypeCount[i].value=="2"){$("txtSysTabelName").value="Qianbo_S_"}else{if(TypeCount[i].value=="3"){$("txtSysTabelName").value="Qianbo_G_"}}}}}}function AutoSelectModelType(){var TypeCount=document.getElementsByName("Type");for(var i=1;i<TypeCount.length;i++){if(TypeCount[i].checked){return TypeCount[i].value}}}function isok(){var txt=$("Name").value;var patt1=/^[0-9]+$/;if(txt.trim().length==0){alert("字段名称不能为空！");$("Name").focus();return false}var patt=/^[a-zA-Z0-9_]+$/;if(!patt.test(txt)){alert("字段名称必须为字母或数字字符！");$("Name").focus();return false}if($("Alias").value==""){alert("字段别名不能为空！");$("Alias").focus();return false}if(AutoSelectModelType()=="TextType"){txt=$("TitleSize").value;if($("TitleSize").value==""){alert("文本框长度不能为空！");$("TitleSize").focus();return false}if(!patt1.test(txt)){alert("文本框长度必须为数字字符！");$("TitleSize").focus();return false}}if(AutoSelectModelType()=="MultipleTextType"){txt=$("MultipleTextType_Width").value;if($("MultipleTextType_Width").value==""){alert("显示宽度不能为空！");$("MultipleTextType_Width").focus();return false}if(!patt1.test(txt)){alert("显示宽度必须为数字字符！");$("MultipleTextType_Width").focus();return false}txt=$("MultipleTextType_Height").value;if($("MultipleTextType_Height").value==""){alert("显示高度不能为空！");$("MultipleTextType_Height").focus();return false}if(!patt1.test(txt)){alert("显示高度必须为数字字符！");$("MultipleTextType_Height").focus();return false}}if(AutoSelectModelType()=="MultipleHtmlType"){txt=$("MultipleHtmlType_Width").value;if($("MultipleHtmlType_Width").value==""){alert("显示宽度不能为空！");$("MultipleHtmlType_Width").focus();return false}if(!patt1.test(txt)){alert("显示宽度必须为数字字符！");$("MultipleHtmlType_Width").focus();return false}txt=$("MultipleHtmlType_Height").value;if($("MultipleHtmlType_Height").value==""){alert("显示高度不能为空！");$("MultipleHtmlType_Height").focus();return false}if(!patt1.test(txt)){alert("显示高度必须为数字字符！");$("MultipleHtmlType_Height").focus();return false}}if(AutoSelectModelType()=="RadioType"){if($("RadioType_Content").value==""){alert("分行键入每个选项不能为空！");$("RadioType_Content").focus();return false}}if(AutoSelectModelType()=="ListBoxType"){if($("ListBoxType_Content").value==""){alert("分行键入每个选项不能为空！");$("ListBoxType_Content").focus();return false}}return true}function SelectDictionary(val,typeid){WinOpenDialog("../InfoModel/SelectDictionary.aspx?ControlId="+val+"&TypeId="+typeid+"","550","400")}function SelectProperty(val,typeid){WinOpenDialog("../InfoModel/SelectProperty.aspx?ControlId="+val+"&TypeId="+typeid+"","550","400")};