<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="selStratMenu.aspx.cs" Inherits="ZYDN.Web.system.myWeb.selStratMenu" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>开始菜单中选择</title>
    <link rel="stylesheet" type="text/css" href="../skins/css/main.css" />
    <link rel="stylesheet" type="text/css" href="../skins/css/sys.css" />
    <script type="text/javascript" language="javascript" src="../js/JFramework.js"></script>

    <script language="jscript" type="text/javascript">
    var selName=null;
    var selID=null;
function loadPage()
{
    var lObjs=document.getElementsByName("layer");
    var sMenu=document.getElementsByName("menuName");
    var v;
    for (var i=0;i<lObjs.length;i++){
        v=lObjs[i].innerText;
        v=v.split("|");
        lObjs[i].style.width=(parseInt(v[0])-1)*50
        lObjs[i].innerHTML="";
        sMenu[i].title=v[2];
        sMenu[i].mid=v[1];
        
        sMenu[i].onclick=function(){
            selName=this.title;
            selID=this.mid;
            $("vName").value=this.title;
        }
    }
}


function ok(){
    if (selName==null){
        alert("请选择一个项目");
    }
    window.returnValue=selName+","+selID;
    window.close();
}
    </script>
</head>
<body onload="loadPage()">
    <div style="width:250px; height:100%; overflow:scroll; float:left;">
        <asp:Repeater ID="startMenu" runat="server">
            <ItemTemplate>
                <div style="width: 400px; padding: 1px 2px 1px 6px; cursor:hand;" id="menuName" name="menuName">
                    <div id="layer" name="layer" style="width: 30px; float: left;">
                        <%# DataBinder.Eval(Container, "DataItem.layer")%>
                        |<%# DataBinder.Eval(Container, "DataItem.mid")%>|<%# DataBinder.Eval(Container,"DataItem.mname")%></div>
                    <div style="width: 180px; float: left;">
                        <%# DataBinder.Eval(Container,"DataItem.mname")%>
                    </div>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </div>
    <div  style="width:150px; height:300px; text-align:center;">
    项目名
    <input type="text"  style ="width:120px;" id="vName" name="vName"/>
    <input type="button" value="确定" onclick="ok();"/>
    </div>
</body>
</html>
