  <br>
  <table border=1 cellspacing=1 cellpadding=2 width=760 style="border: 1px inset;">
  <form action="controllers/inputController.php" method="post" name="userform" id="userform">
  <input name="group_pkey" id="group_pkey" type="hidden" value="<?=$usergroup_data['group_pkey'];?>">
  <input name="group_level" id="group_level" type="hidden" value="1">
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Group Name</td>
  <td valign=top width=610 class=formvalue>
  <input name="group_name" id="group_name" type="text" value="<?=$usergroup_data['group_name'];?>" style="width: 580px;">
  </td>
  </tr>
  <tr valign=top>
  <td valign=top width=150 class=formlabel>Description</td>
  <td valign=top width=610 class=formvalue>
  <input name="group_description" id="group_description" type="text" value="<?=$usergroup_data['group_description'];?>" style="width: 580px;">&nbsp;
  </td>
  </tr>
  </table>

  <hr size=1><br>

  <?
  // Tab -----------------------------------------
  $tab_quantity=5;
  $tab_style=1;	// (single-row)
  $tab_name=array("&nbsp;&nbsp;<b>Projects</b>&nbsp;&nbsp;","&nbsp;&nbsp;<b>Purchasing</b>&nbsp;&nbsp;","&nbsp;<b>Reports</b>&nbsp;","&nbsp;&nbsp;<b>Master Data</b>&nbsp;&nbsp;","&nbsp;<b>System</b>&nbsp;");
  include_once('tab.php');
  //----------------------------------------------
  ?>
  <table width="99%" border="0" cellspacing="0" cellpadding="0">
  <tr valign=top>
  <td valign=top>

  <div id='tab-body:0' class='tab-body' style='border: none; display: block;'>

  <table border=1 cellspacing=1 cellpadding=2 width=760 style="border: 1px inset;">
  <tr valign=top>
  <td valign=top width=30 class=listheader>No</td>
  <td valign=top width=400 class=listheader>Function</td>
  <td valign=top width=330 class=listheader>Options</td>
  </tr>

  <? $optcount=0; ?>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>Projects</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Add/Edit Project</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_project_edit" value="1" <? if ($usergroup_data['access_project_edit']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_project_edit" value="0" <? if ($usergroup_data['access_project_edit']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Delete Project</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_project_delete" value="1" <? if ($usergroup_data['access_project_delete']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_project_delete" value="0" <? if ($usergroup_data['access_project_delete']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  </table>

  </div>

  <div id='tab-body:1' class='tab-body' style='border: none; display: none;'>

  <table border=1 cellspacing=1 cellpadding=2 width=760 style="border: 1px inset;">
  <tr valign=top>
  <td valign=top width=30 class=listheader>No</td>
  <td valign=top width=400 class=listheader>Function</td>
  <td valign=top width=330 class=listheader>Options</td>
  </tr>

  <? $optcount=0; ?>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>MBL</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>View MBL</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_mbl_view" id="access_mbl_view1" value="1" <? if ($usergroup_data['access_mbl_view']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_mbl_view" id="access_mbl_view0" value="0" <? if ($usergroup_data['access_mbl_view']==0) echo "checked"; ?> onClick="toggleEditMBL(0)";>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Edit MBL</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_mbl_edit" id="access_mbl_edit1" value="1" <? if ($usergroup_data['access_mbl_edit']==1) echo "checked"; ?> onClick="toggleViewMBL(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_mbl_edit" id="access_mbl_edit0" value="0" <? if ($usergroup_data['access_mbl_edit']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Approve MBL</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_mbl_approve" id="access_mbl_approve1" value="1" <? if ($usergroup_data['access_mbl_approve']==1) echo "checked"; ?> onClick="toggleViewMBL(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_mbl_approve" id="access_mbl_approve0" value="0" <? if ($usergroup_data['access_mbl_approve']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>MRO</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>View MRO</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_mro_view" id="access_mro_view1" value="1" <? if ($usergroup_data['access_mro_view']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_mro_view" id="access_mro_view0" value="0" <? if ($usergroup_data['access_mro_view']==0) echo "checked"; ?> onClick="toggleEditMRO(0)";>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Create/Edit MRO</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_mro_edit" id="access_mro_edit1" value="1" <? if ($usergroup_data['access_mro_edit']==1) echo "checked"; ?> onClick="toggleViewMRO(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_mro_edit" id="access_mro_edit0" value="0" <? if ($usergroup_data['access_mro_edit']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Approve/Reject Normal MRO</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_mro_approvenormal" id="access_mro_approvenormal1" value="1" <? if ($usergroup_data['access_mro_approvenormal']==1) echo "checked"; ?> onClick="toggleViewMRO(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_mro_approvenormal" id="access_mro_approvenormal0" value="0" <? if ($usergroup_data['access_mro_approvenormal']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Recommend/Reject Variance MRO</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_mro_recommendvariance" id="access_mro_recommendvariance1" value="1" <? if ($usergroup_data['access_mro_recommendvariance']==1) echo "checked"; ?> onClick="toggleViewMRO(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_mro_recommendvariance" id="access_mro_recommendvariance0" value="0" <? if ($usergroup_data['access_mro_recommendvariance']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Approve/Reject Variance MRO</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_mro_approvevariance" id="access_mro_approvevariance1" value="1" <? if ($usergroup_data['access_mro_approvevariance']==1) echo "checked"; ?> onClick="toggleViewMRO(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_mro_approvevariance" id="access_mro_approvevariance0" value="0" <? if ($usergroup_data['access_mro_approvevariance']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <!--
  <? // $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Cancel MRO</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_mro_cancel" id="access_mro_cancel1" value="1" <? if ($usergroup_data['access_mro_cancel']==1) echo "checked"; ?> onClick="toggleViewMRO(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_mro_cancel" id="access_mro_cancel0" value="0" <? if ($usergroup_data['access_mro_cancel']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  -->

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>ITQ / Quotation Evaluation</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>View ITQ</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_view" id="access_itq_view1" value="1" <? if ($usergroup_data['access_itq_view']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_view" id="access_itq_view0" value="0" <? if ($usergroup_data['access_itq_view']==0) echo "checked"; ?> onClick="toggleEditITQ(0)";>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Create ITQ & Invite Suppliers</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_edit" id="access_itq_edit1" value="1" <? if ($usergroup_data['access_itq_edit']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_edit" id="access_itq_edit0" value="0" <? if ($usergroup_data['access_itq_edit']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  
  
  <!-- add 27-12-2011 -->
  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Edit ITQ (New)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="itq_edit_new" id="itq_edit_new" value="1" <? if ($usergroup_data['itq_edit_new']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="itq_edit_new" id="itq_edit_new" value="0" <? if ($usergroup_data['itq_edit_new']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  
  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Edit ITQ (Recommend)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="itq_edit_recommend" id="itq_edit_recommend" value="1" <? if ($usergroup_data['itq_edit_recommend']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="itq_edit_recommend" id="itq_edit_recommend" value="0" <? if ($usergroup_data['itq_edit_recommend']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  
  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Edit ITQ < 100k(Approved)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="itq_edit_approved" id="itq_edit_approved" value="1" <? if ($usergroup_data['itq_edit_approved']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="itq_edit_approved" id="itq_edit_approved" value="0" <? if ($usergroup_data['itq_edit_approved']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  
   <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Edit ITQ > 100k(Approved)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="itq_edit_approved100k" id="itq_edit_approved100k" value="1" <? if ($usergroup_data['itq_edit_approved100k']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="itq_edit_approved100k" id="itq_edit_approved100k" value="0" <? if ($usergroup_data['itq_edit_approved100k']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  <!-- add 27-12-2011 -->
  <!--
  <? // $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Invite Suppliers</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_invite" id="access_itq_invite1" value="1" <? if ($usergroup_data['access_itq_invite']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_invite" id="access_itq_invite0" value="0" <? if ($usergroup_data['access_itq_invite']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  -->

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Tabulate/Evaluate Quotation (NEW ITQ)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_evaluate" id="access_itq_evaluate1" value="1" <? if ($usergroup_data['access_itq_evaluate']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_evaluate" id="access_itq_evaluate0" value="0" <? if ($usergroup_data['access_itq_evaluate']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Review/Reject Quotation (>100k) <span style="color:green;">Recommend</span></td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_review" id="access_itq_review1" value="1" <? if ($usergroup_data['access_itq_review']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_review" id="access_itq_review0" value="0" <? if ($usergroup_data['access_itq_review']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <!-- yus tambahan -->
  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Approve/Reject Quotation (>100k) <span style="color:green;">Approved</span></td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_review_approved" id="access_itq_review_approved" value="1" <? if ($usergroup_data['access_itq_review_approved']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_review_approved" id="access_itq_review_approved" value="0" <? if ($usergroup_data['access_itq_review_approved']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  <!-- tambahan end -->
  
  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Approve/Reject Quotation (<50k)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_approve50k" id="access_itq_approve50k1" value="1" <? if ($usergroup_data['access_itq_approve50k']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_approve50k" id="access_itq_approve50k0" value="0" <? if ($usergroup_data['access_itq_approve50k']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent><!--Approve/Reject Quotation (<100k)-->Approve Quotation (<100k)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_approve100k" id="access_itq_approve100k1" value="1" <? if ($usergroup_data['access_itq_approve100k']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_approve100k" id="access_itq_approve100k0" value="0" <? if ($usergroup_data['access_itq_approve100k']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

   <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent><!--Approve/Reject Quotation (<100k)-->Reject Quotation (<100k)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_reject_approve100k" id="access_itq_reject_approve100k" value="1" <? if ($usergroup_data['access_itq_reject_approve100k']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_reject_approve100k" id="access_itq_reject_approve100k" value="0" <? if ($usergroup_data['access_itq_reject_approve100k']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  
  

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Approve/Reject Quotation (<1 million)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_approve1m" id="access_itq_approve1m1" value="1" <? if ($usergroup_data['access_itq_approve1m']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_approve1m" id="access_itq_approve1m0" value="0" <? if ($usergroup_data['access_itq_approve1m']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Approve/Reject Quotation (>1 million)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_approveall" id="access_itq_approveall1" value="1" <? if ($usergroup_data['access_itq_approveall']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_approveall" id="access_itq_approveall0" value="0" <? if ($usergroup_data['access_itq_approveall']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  
  <?  $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Cancel ITQ</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_itq_cancel" id="access_itq_cancel1" value="1" <? if ($usergroup_data['access_itq_cancel']==1) echo "checked"; ?> onClick="toggleViewITQ(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_itq_cancel" id="access_itq_cancel0" value="0" <? if ($usergroup_data['access_itq_cancel']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>
  

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>PO</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>View PO</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_po_view" id="access_po_view1" value="1" <? if ($usergroup_data['access_po_view']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_po_view" id="access_po_view0" value="0" <? if ($usergroup_data['access_po_view']==0) echo "checked"; ?> onClick="toggleEditPO(0)";>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Close PO (Manual)</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_po_close" id="access_po_close1" value="1" <? if ($usergroup_data['access_po_close']==1) echo "checked"; ?> onClick="toggleViewPO(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_po_close" id="access_po_close0" value="0" <? if ($usergroup_data['access_po_close']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Cancel PO</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_po_cancel" id="access_po_cancel1" value="1" <? if ($usergroup_data['access_po_cancel']==1) echo "checked"; ?> onClick="toggleViewPO(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_po_cancel" id="access_po_cancel0" value="0" <? if ($usergroup_data['access_po_cancel']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>DO</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>View DO</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_do_view" id="access_do_view1" value="1" <? if ($usergroup_data['access_do_view']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_do_view" id="access_do_view0" value="0" <? if ($usergroup_data['access_do_view']==0) echo "checked"; ?> onClick="toggleEditDO(0)";>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Create/Edit DO</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_do_edit" id="access_do_edit1" value="1" <? if ($usergroup_data['access_do_edit']==1) echo "checked"; ?> onClick="toggleViewDO(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_do_edit" id="access_do_edit0" value="0" <? if ($usergroup_data['access_do_edit']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>Invoice</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>View Invoice</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_invoice_view" id="access_invoice_view1" value="1" <? if ($usergroup_data['access_invoice_view']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_invoice_view" id="access_invoice_view0" value="0" <? if ($usergroup_data['access_invoice_view']==0) echo "checked"; ?> onClick="toggleEditInvoice(0)";>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Create/Edit Invoice</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_invoice_edit" id="access_invoice_edit1" value="1" <? if ($usergroup_data['access_invoice_edit']==1) echo "checked"; ?> onClick="toggleViewInvoice(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_invoice_edit" id="access_invoice_edit0" value="0" <? if ($usergroup_data['access_invoice_edit']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  </table>

  </div>

  <div id='tab-body:2' class='tab-body' style='border: none; display: none;'>

  <table border=1 cellspacing=1 cellpadding=2 width=760 style="border: 1px inset;">
  <tr valign=top>
  <td valign=top width=30 class=listheader>No</td>
  <td valign=top width=400 class=listheader>Function</td>
  <td valign=top width=330 class=listheader>Options</td>
  </tr>

  <? $optcount=0; ?>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>Reports</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Generate All Reports</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_reports_all" name="access_reports_all1" value="1" <? if ($usergroup_data['access_reports_all']==1) echo "checked"; ?> onClick="toggleViewReports(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_reports_all" name="access_reports_all0" value="0" <? if ($usergroup_data['access_reports_all']==0) echo "checked"; ?> onClick="toggleViewReports(0)";>Deny&nbsp;</input>
  </td>
  </tr>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>Individual Reports</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Material Budget List Report</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_reports_mbl" id="access_reports_mbl1" value="1" <? if ($usergroup_data['access_reports_mbl']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_reports_mbl" id="access_reports_mbl0" value="0" <? if ($usergroup_data['access_reports_mbl']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Quantity Variance Report</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_reports_qv" id="access_reports_qv1" value="1" <? if ($usergroup_data['access_reports_qv']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_reports_qv" id="access_reports_qv0" value="0" <? if ($usergroup_data['access_reports_qv']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Purchase Order Report</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_reports_po" id="access_reports_po1" value="1" <? if ($usergroup_data['access_reports_po']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_reports_po" id="access_reports_po0" value="0" <? if ($usergroup_data['access_reports_po']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Supplier Performance Report</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_reports_sp" id="access_reports_sp1" value="1" <? if ($usergroup_data['access_reports_sp']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_reports_sp" id="access_reports_sp0" value="0" <? if ($usergroup_data['access_reports_sp']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Budget Monitoring Report</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_reports_bm" id="access_reports_bm1" value="1" <? if ($usergroup_data['access_reports_bm']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_reports_bm" id="access_reports_bm0" value="0" <? if ($usergroup_data['access_reports_bm']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Project Material Cost Report</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_reports_pmc" id="access_reports_pmc1" value="1" <? if ($usergroup_data['access_reports_pmc']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_reports_pmc" id="access_reports_pmc0" value="0" <? if ($usergroup_data['access_reports_pmc']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Sub-con Material Report</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_reports_scm" id="access_reports_scm1" value="1" <? if ($usergroup_data['access_reports_scm']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_reports_scm" id="access_reports_scm0" value="0" <? if ($usergroup_data['access_reports_scm']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>IQA Report</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_reports_iqa" id="access_reports_iqa1" value="1" <? if ($usergroup_data['access_reports_iqa']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_reports_iqa" id="access_reports_iqa0" value="0" <? if ($usergroup_data['access_reports_iqa']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  </table>

  </div>

  <div id='tab-body:3' class='tab-body' style='border: none; display: none;'>

  <table border=1 cellspacing=1 cellpadding=2 width=760 style="border: 1px inset;">
  <tr valign=top>
  <td valign=top width=30 class=listheader>No</td>
  <td valign=top width=400 class=listheader>Function</td>
  <td valign=top width=330 class=listheader>Options</td>
  </tr>

  <? $optcount=0; ?>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>Supplier Information</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>View Suppliers</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_supplier_view" id="access_supplier_view1" value="1" <? if ($usergroup_data['access_supplier_view']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_supplier_view" id="access_supplier_view0" value="0" <? if ($usergroup_data['access_supplier_view']==0) echo "checked"; ?> onClick="toggleEditSuppliers(0)";>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Create/Edit Supplier</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_supplier_edit" id="access_supplier_edit1" value="1" <? if ($usergroup_data['access_supplier_edit']==1) echo "checked"; ?> onClick="toggleViewSuppliers(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_supplier_edit" id="access_supplier_edit0" value="0" <? if ($usergroup_data['access_supplier_edit']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Recommend/Reject Supplier</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_supplier_recommend" id="access_supplier_recommend1" value="1" <? if ($usergroup_data['access_supplier_recommend']==1) echo "checked"; ?> onClick="toggleViewSuppliers(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_supplier_recommend" id="access_supplier_recommend0" value="0" <? if ($usergroup_data['access_supplier_recommend']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Approve/Reject Supplier</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_supplier_approve" id="access_supplier_approve1" value="1" <? if ($usergroup_data['access_supplier_approve']==1) echo "checked"; ?> onClick="toggleViewSuppliers(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_supplier_approve" id="access_supplier_approve0" value="0" <? if ($usergroup_data['access_supplier_approve']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Blacklist/Unblacklist Supplier</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_supplier_activate" id="access_supplier_activate1" value="1" <? if ($usergroup_data['access_supplier_activate']==1) echo "checked"; ?> onClick="toggleViewSuppliers(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_supplier_activate" id="access_supplier_activate0" value="0" <? if ($usergroup_data['access_supplier_activate']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>Trade Categories</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Create/Edit Trade Categories</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_trade_edit" id="access_trade_edit1" value="1" <? if ($usergroup_data['access_trade_edit']==1) echo "checked"; ?> onClick="toggleViewSuppliers(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_trade_edit" id="access_trade_edit0" value="0" <? if ($usergroup_data['access_trade_edit']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>Clients</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>View Clients</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_client_view" id="access_client_view1" value="1" <? if ($usergroup_data['access_client_view']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_client_view" id="access_client_view0" value="0" <? if ($usergroup_data['access_client_view']==0) echo "checked"; ?> onClick="toggleEditClient(0)";>Deny&nbsp;</input>
  </td>
  </tr>

  <? // $optcount++; ?>
  <tr valign=top style="display: none;">
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Create/Edit Clients</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_client_edit" id="access_client_edit1" value="1" <? if ($usergroup_data['access_client_edit']==1) echo "checked"; ?> onClick="toggleViewClient(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_client_edit" id="access_client_edit0" value="0" <? if ($usergroup_data['access_client_edit']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>Sub-contractors</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>View Sub-contractors</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_subcon_view" id="access_subcon_view1" value="1" <? if ($usergroup_data['access_subcon_view']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_subcon_view" id="access_subcon_view0" value="0" <? if ($usergroup_data['access_subcon_view']==0) echo "checked"; ?> onClick="toggleEditSubcon(0)";>Deny&nbsp;</input>
  </td>
  </tr>

  <?  $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Create/Edit Sub-contractors</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_subcon_edit" id="access_subcon_edit1" value="1" <? if ($usergroup_data['access_subcon_edit']==1) echo "checked"; ?> onClick="toggleViewSubcon(1)";>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_subcon_edit" id="access_subcon_edit0" value="0" <? if ($usergroup_data['access_subcon_edit']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  </table>

  </div>

  <div id='tab-body:4' class='tab-body' style='border: none; display: none;'>

  <table border=1 cellspacing=1 cellpadding=2 width=760 style="border: 1px inset;">
  <tr valign=top>
  <td valign=top width=30 class=listheader>No</td>
  <td valign=top width=400 class=listheader>Function</td>
  <td valign=top width=330 class=listheader>Options</td>
  </tr>

  <? $optcount=0; ?>

  <tr valign=top>
  <td valign=top width=760 colspan=3 class=listcontent><b>System Management</b></td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Manage Bulletin</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_system_managenews" value="1" <? if ($usergroup_data['access_system_managenews']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_system_managenews" value="0" <? if ($usergroup_data['access_system_managenews']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Manage User profiles</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_system_manageusers" value="1" <? if ($usergroup_data['access_system_manageusers']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_system_manageusers" value="0" <? if ($usergroup_data['access_system_manageusers']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  <? $optcount++; ?>
  <tr valign=top>
  <td valign=top width=30 class=listnumber><?=$optcount;?></td>
  <td valign=top width=400 class=listcontent>Manage User Access Groups</td>
  <td valign=top width=330 class=listcontent style="text-align: left;">&nbsp;
  <input type="radio" name="access_system_manageaccess" value="1" <? if ($usergroup_data['access_system_manageaccess']==1) echo "checked"; ?>>Allow&nbsp;&nbsp;&nbsp;&nbsp;</input>
  <input type="radio" name="access_system_manageaccess" value="0" <? if ($usergroup_data['access_system_manageaccess']==0) echo "checked"; ?>>Deny&nbsp;</input>
  </td>
  </tr>

  </table>

  </div>

  </td>
  </tr>
  <input name="job" id="job" type="hidden" value="">
  </form>
  </table>

  <script type="text/javascript">

  function toggleViewMBL(opt) {
    var objoption1 = document.getElementById('access_mbl_view'+opt);
    objoption1.checked = "true";
  }

  function toggleEditMBL(opt) {
    var objoption1 = document.getElementById('access_mbl_edit'+opt);
    var objoption2 = document.getElementById('access_mbl_approve'+opt);
    objoption1.checked = "true";
    objoption2.checked = "true";
  }

  function toggleViewMRO(opt) {
    var objoption1 = document.getElementById('access_mro_view'+opt);
    objoption1.checked = "true";
  }

  function toggleEditMRO(opt) {
    var objoption1 = document.getElementById('access_mro_edit'+opt);
    var objoption2 = document.getElementById('access_mro_approvenormal'+opt);
    var objoption3 = document.getElementById('access_mro_recommendvariance'+opt);
    var objoption4 = document.getElementById('access_mro_approvevariance'+opt);
    objoption1.checked = "true";
    objoption2.checked = "true";
    objoption3.checked = "true";
    objoption4.checked = "true";
  }

  function toggleViewITQ(opt) {
    var objoption1 = document.getElementById('access_itq_view'+opt);
    objoption1.checked = "true";
  }

  function toggleEditITQ(opt) {
    var objoption1 = document.getElementById('access_itq_edit'+opt);
    var objoption2 = document.getElementById('access_itq_evaluate'+opt);
    var objoption3 = document.getElementById('access_itq_review'+opt);
    var objoption4 = document.getElementById('access_itq_approve50k'+opt);
    var objoption5 = document.getElementById('access_itq_approve100k'+opt);
    var objoption6 = document.getElementById('access_itq_approve1m'+opt);
    var objoption7 = document.getElementById('access_itq_approveall'+opt);
    objoption1.checked = "true";
    objoption2.checked = "true";
    objoption3.checked = "true";
    objoption4.checked = "true";
    objoption5.checked = "true";
    objoption6.checked = "true";
    objoption7.checked = "true";
  }

  function toggleViewPO(opt) {
    var objoption1 = document.getElementById('access_po_view'+opt);
    objoption1.checked = "true";
  }

  function toggleEditPO(opt) {
    var objoption1 = document.getElementById('access_po_close'+opt);
    var objoption2 = document.getElementById('access_po_cancel'+opt);
    objoption1.checked = "true";
    objoption2.checked = "true";
  }

  function toggleViewDO(opt) {
    var objoption1 = document.getElementById('access_do_view'+opt);
    objoption1.checked = "true";
  }

  function toggleEditDO(opt) {
    var objoption1 = document.getElementById('access_do_edit'+opt);
    objoption1.checked = "true";
  }

  function toggleViewInvoice(opt) {
    var objoption1 = document.getElementById('access_invoice_view'+opt);
    objoption1.checked = "true";
  }

  function toggleEditInvoice(opt) {
    var objoption1 = document.getElementById('access_invoice_edit'+opt);
    objoption1.checked = "true";
  }

  function toggleViewReports(opt) {
    var objoption1 = document.getElementById('access_reports_mbl'+opt);
    var objoption2 = document.getElementById('access_reports_qv'+opt);
    var objoption3 = document.getElementById('access_reports_po'+opt);
    var objoption4 = document.getElementById('access_reports_sp'+opt);
    var objoption5 = document.getElementById('access_reports_bm'+opt);
    var objoption6 = document.getElementById('access_reports_pmc'+opt);
    var objoption7 = document.getElementById('access_reports_scm'+opt);
    var objoption8 = document.getElementById('access_reports_iqa'+opt);
    objoption1.checked = "true";
    objoption2.checked = "true";
    objoption3.checked = "true";
    objoption4.checked = "true";
    objoption5.checked = "true";
    objoption6.checked = "true";
    objoption7.checked = "true";
    objoption8.checked = "true";
  }

  function toggleViewSuppliers(opt) {
    var objoption1 = document.getElementById('access_supplier_view'+opt);
    objoption1.checked = "true";
  }

  function toggleEditSuppliers(opt) {
    var objoption1 = document.getElementById('access_supplier_edit'+opt);
    var objoption2 = document.getElementById('access_supplier_recommend'+opt);
    var objoption3 = document.getElementById('access_supplier_approve'+opt);
    var objoption4 = document.getElementById('access_supplier_activate'+opt);
    objoption1.checked = "true";
    objoption2.checked = "true";
    objoption3.checked = "true";
    objoption4.checked = "true";
  }

  function toggleViewClient(opt) {
    var objoption1 = document.getElementById('access_client_view'+opt);
    objoption1.checked = "true";
  }

  function toggleEditClient(opt) {
    var objoption1 = document.getElementById('access_client_edit'+opt);
    objoption1.checked = "true";
  }

  function toggleViewSubcon(opt) {
    var objoption1 = document.getElementById('access_subcon_view'+opt);
    objoption1.checked = "true";
  }

  function toggleEditSubcon(opt) {
    var objoption1 = document.getElementById('access_subcon_edit'+opt);
    objoption1.checked = "true";
  }

  function validateForm() {

    var isvalid=true;
    var errmsg="";
    var groupname=document.getElementById('group_name');

    if (groupname.value=="") {
      errmsg='Group Name must be specified!\n';
      isvalid=false;
    }
    if (isvalid==false) alert('Error:\n'+errmsg);
    return isvalid;

  }

  </script>
