<?
$nature=$_REQUEST['nature'];
?>
<script>
 window.resizeTo(400,500);
 window.moveTo(100,10);
var abc=opener.document.f1.ungrp.value;
function fun()
{
opener.document.f1.ungrp.value=abc;
window.close();
}
</script>
<body bgcolor=lightsteelblue>
<center>
<h3>SELECT GROUP</H3>
<?
include("opendb.php");
$result=mysqli_query($db,"select distinct headgroup from acgroups where nature='$nature' and gname='-' order by ghlevel")or die(mysqli_error());
print "<select name=grp multiple=true rows=10 onClick=opener.document.f1.ungrp.value=this.value;>";
while($row=mysqli_fetch_row($result))
{
 print "\n<option>$row[0]</option>";
}
?>
</select><br><BR>
<input type=button value='OK' onClick=window.close()>
<input type=button value='Cancel' onClick=fun()>
