<%@ page contentType="text/html; charset=GBK" %>
<%@ page import = "zr.zrpower.entity.sys.SessionUser" %>
<%@ page import = "zr.zrpower.common.util.SysPreperty" %>

<%@ page import = "zr.zrpower.ejb.sys.UIService"%>

<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
String strtype = request.getParameter("type");//1单选 2多选

String strID = request.getParameter("id");
if (strID==null){strID="";}
String strNAME = request.getParameter("name");
if (strNAME==null){strNAME="";}
%>
<HTML>
<HEAD>
<TITLE><%=SysPreperty.getProperty().SystemName%><%=SysPreperty.getProperty().Versoin%></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link REL="stylesheet" type="text/css" href="../../zrsysmanage/css/<%=user.getUserCSS()%>">
<script type="text/javascript">
     function setvalue(id,name){
        var cid="<%=strID%>";
        var cname="<%=strNAME%>";

        if (cname=="zrengine_tscl")
        {
             var s = window.opener.document.getElementById(cid);
             var ops = s.options;
             for(var i=0;i<ops.length; i++){
                 var tempValue = ops[i].value;
                 if(tempValue == id)//这里是你要选的值
                 {
                   ops[i].selected = true;
                   break;
                 }
             }

        }else
        {
        <%if("html5.css".equals(user.getUserCSS())){%>
           parent.$('#<%=strID%>').val(id);
	       parent.$('#<%=strNAME%>').val(name);
	       //当表单含有"."时候用下面的
	       <%if(strID.indexOf(".")>-1){%>
	          parent.document.all("<%=strID%>").value=id;
	       <%}if(strNAME.indexOf(".")>-1){%>
	          parent.document.all("<%=strNAME%>").value=name;
	       <%}%>
	       parent.layer.closeAll();
	      
           <%}else{%>
           window.opener.document.getElementById(cid).value = id;
           window.opener.document.getElementById(cname).value = name;
           <%}%>
           
        }
        window.close();
     }
</script>
</HEAD>
<BODY class="BodyMain">
    <%=userUI.ShowHeadHtml("人员选择",user.getUserImage())%>
    <%=userUI.ShowBodyStartHtml()%>

  <table width="100%" height="92%" border="0" cellpadding="0" cellspacing="0" >
    <tr>
      <td><iframe id="PsnManage" name="PsnManage" src="PsnManage.jsp?type=<%=strtype%>" width="100%" height="100%" marginwidth="1" marginheight="1" frameborder="0"></iframe></td>
    </tr>
  </table>

<%=userUI.ShowFootHtml()%>
</body>
</html>
<%
//清空相关对象
user = null;
userUI = null;
%>
