<html>
<head>
<script language="JavaScript">
<!--- hide script from old browsers
function dele()
{
	var i = 0, j;
	for (j=0; j<1; j++)

	if (i==0)
		document.groupform.Group_List.value = "";

	document.groupform.tolist.options[0].selected = true;
}
function setto(sel)
{
	var option;
	var i;
	for (i=0; i<sel.options.length; i++) {
		if (sel.options[i].selected==true) {
			if (document.groupform.Group_List.value != "")
				document.groupform.Group_List.value = document.groupform.Group_List.value + "\n" ;

			document.groupform.Group_List.value = document.groupform.Group_List.value + sel.options[i].value ;
		}
	}
	if (sel.options[0].selected==true) {
		dele();
	}
}
function addgr()
{
	var Build_String = "";
	var last = 0;
	var index = -1;


	if (document.groupform.grnm.value.length > 0) {

		if (document.groupform.Group_List.value.length > 2) {
			index = document.groupform.Group_List.value.indexOf("\n",0);
			while (index >= 0) {
				Build_String += document.groupform.Group_List.value.substr(last,index-last-1) + ",";

				last = index + 1;
				index = document.groupform.Group_List.value.indexOf("\n",last);
			}

			Build_String += document.groupform.Group_List.value.substr(last, document.groupform.Group_List.value.length );

			if (opener.pickform.dist_list.value == "") {
				opener.pickform.dist_list.value = document.groupform.grnm.value + "=" + Build_String;
			}
			else if (opener.pickform.dist_list.value != "") {
				opener.pickform.dist_list.value = opener.pickform.dist_list.value + "\n" + document.groupform.grnm.value + "=" + Build_String;
			}

			dele();
			document.groupform.grnm.value = "";
			opener.pickform.cmd.value = "pick_save";
			opener.pickform.submit();
		}
		else
			alert("No Group Address Listed");
	}
	else
		alert("No Group Name");
}
// end hiding from old browsers -->
</script>

<title>Create new Group </title>
</head>

||ifdef||background||
<body background="||nwimg||/||background||" onLoad="focus()">
||else||
<body onLoad="focus()">
||endif||


||ifdef||error||
	<center>
	<table border="1">
		<tr>	<td><img src="||nwimg||/attention.gif">
			<td bgcolor="ffffff">||error||</td>
		</tr>
	</table>
	</center>
||endif||

<center>
<form name="groupform" method="POST" action="Javascript:addgr()">

<table border="0" cellspacing="0" cellpadding="0">
<tr><td><table>
	<tr><td><b>Group Address List</b></td></tr>
	<tr><td><textarea rows="5" name="Group_List" cols="31"></textarea></td></tr>
	<tr><td><b>Group Name</b></td></tr>
	<tr><td><input name="grnm" size="30" value></td></tr>
	</table>
</td>
<td>	<table>
	<tr><td><img border="0" src="||nwimg||/clear.gif" name="Clear" usemap="#lmap">
		<map name="lmap"><area shape="RECT" coords="0, 0, 75, 45" href="javascript:dele()"></map>
		</td></tr>
	<tr><td><select name="tolist" size="8" onChange="setto(this)">
			<option>||picklist||</option>
		</select>
	</td></tr>

	</table>
</td>
</tr>
<tr><td colspan="3"><input type="button" value="Add" value="Add Group" onClick="addgr()">
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	Note: group names may not contain spaces</td></tr>
</table>
</form>
</center>

</body>
</html>