<%@ page contentType="text/html; charset=GBK" %>
<%@ page import = "zr.zrpower.common.util.SysPreperty"%>
<%@ page import = "zr.zrpower.collectionengine.service.CollectionService" %>

<%@ page import = "zr.zrpower.entity.sys.SessionUser"%>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
CollectionService cs = new CollectionService();

String strDictTable = request.getParameter("DictTable");
String strSelectId = request.getParameter("SelectId");

String strList = cs.GetDictList(strDictTable);

%>
<html>
<head>
<title>字典录入</title>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=GBK">
<link REL="stylesheet" type="text/css" href="../zrsysmanage/css/<%=user.getUserCSS()%>">
</head>
<body onkeyup="ok()" class="BodyMain" background="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/dictback.jpg">
<form action="" method="post" name="form1">
<table border="0" width="378" id="table1" cellspacing="0" cellpadding="0" height="297">
	<tr>
		<td height="40">　</td>
	</tr>
	<tr>
		<td height="20">&nbsp;<Font class="WriteSign">拼音代码快速查询:</Font>&nbsp;<input class="text" type="text" name="query" size="38" value=""></td>
	</tr>
	<tr>
	<td height="201" align="center" valign="top">
            <select name='scrlist'  ondblclick="returnvalue();" style='width:99%' size=13 multiple>;
               <%=strList%>
            <select>
        </td>
	</tr>
	<tr>
		<td height="36">　</td>
	</tr>
</table>
<div  id="menu_show"  style="width:'1';height:'1';overflow:'hidden';display:'none'">
<select name='scrlist1' multiple>;
        <%=strList%>
<select>
</div>
</form>
</body>
<script type="text/javascript" language="javascript">
function ok(){
    var py = form1.query.value;
    var code="";
    var name="";
    var len=0;
    var mObject= document.all["scrlist"];
    var mObject1= document.all["scrlist1"];
    mObject.options.length = 0;//清空
    for (i = 0; i < mObject1.options.length; i++)
    {
      name = mObject1.options[i].text;
      code = mObject1.options[i].value;
       if (code.match("/"+py) || code.match("#"+py))
       {
         mObject.options[len] = new Option(name,code);
         len=len+1;
       }
    }
}

function returnvalue()
{
    var code="";
    var name="";
    var mObject= document.all["scrlist"];
    for (i = 0; i < mObject.options.length;i++)
    {
         if (mObject.options[i].selected)
         {
           name = mObject.options[i].text;
           name=name.substr(name.indexOf(" ")+1);
           code = mObject.options[i].value;
           var arrTmp = code.split("/");
           window.returnValue = arrTmp[0]+"/"+name;
           window.close();

           break;
         }
    }

}

</script>
</html>
<%
//清空相关对象
user = null;
cs = null;
%>