<%@Page Language="C#" Inherits="IWMS.Admin.SelPoll" MasterPageFile="admin_pop.master"%>
<asp:Content ContentPlaceHolderId="cphHead" runat="server">
	<script type="text/javascript">
	<!--
	function setPoll()
	{
		var o = document.getElementById("<%=lb1.ClientID%>");
		var s = "";
		for(var i=0; i<o.options.length; i++){
			if (s.length>0){
				s+=",";
			}
			s += o.options[i].value;
		}
		parent.SetPoll(s);
	}
	
	function moveOption(e1, e2){
		for(var i=0;i<e1.options.length;i++){
			if(e1.options[i].selected){
				var e = e1.options[i];
				e2.options.add(new Option(e.text, e.value));
				e1.remove(i);
				i=i-1
			}
		}
		
		setPoll();
	}
	-->
	</script>
</asp:Content>

<asp:Content ContentPlaceHolderId="cphMain" runat="server">

	<asp:Label id="myLabel" style="display:block;text-align:center;padding:5px" runat="server"/>

	<div class="mframe">
	<div class="tl"></div>
	<div class="rt"></div>
	<div class="tm">
		<span class="tt">选择调查</span> (左侧为选中)
	</div>
	<div class="wrapper">
	<div class="ml"></div>
	<div class="mr"></div>
	<div class="mm">
	<form id="myForm" runat="server">
		<table width="100%">
			<tr>
				<td>
					<asp:ListBox id="lb1"
						DataTextField="title"
						DataValueField="id"
						SelectionMode="multiple"
						Rows="15"
						Style="width:180px"
						runat="server"/>
				</td>
				<td width="50" align="center">
					<input type="button" value="<<" onclick="moveOption(document.getElementById('<%=lb2.ClientID%>'), document.getElementById('<%=lb1.ClientID%>'))" style="width:30px;text-align:center"/><br/><br/>
					<input type="button" value=">>" onclick="moveOption(document.getElementById('<%=lb1.ClientID%>'), document.getElementById('<%=lb2.ClientID%>'))" style="width:30px;text-align:center"/>
				</td>
				<td>
					<asp:ListBox id="lb2"
						DataTextField="title"
						DataValueField="id"
						SelectionMode="multiple"
						Rows="15"
						Style="width:180px"
						runat="server"/>
				</td>
			</tr>
		</table>
	</form>
	</div>
	</div>
	<div class="bl"></div>
	<div class="br"></div>
	<div class="bm"></div>
	</div>
</asp:Content>