<html>
<head>
<title>Admin_Group</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--base href="$$BASE_URL$$"-->
<link href="css/trend-style-new.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="javascripts/localization.js"></script>
<script language="JavaScript" src="javascripts/trend-ui-new.js"></script>
<script language="JavaScript" src="javascripts/OLH_Mapping.js"></script>
<script language="JavaScript" type="text/JavaScript">

<!--
var oUI	= "";
var oEld1;			// the target table list of the contacts
var oEld2;			// the target table list of the contacts
var oSearch = "Search";
var oTipMark = "<br>";
// for Account String join
var lenLength = 6;
var lenType = 2;
var currentUser = "";
var UserBelongGroup = "";
function jsGotoMaintainerPermissionDelegation()
{
	var uriPermissionDelegation = "cgiDispatcher.exe?Page=administration/Admin_Management.htm&Locale=&CurPage=";
	document.location.href = uriPermissionDelegation;
}
function jsGotoAccessControlPage()
{
	var uriAccessControlPage = "cgiDispatcher.exe?Page=administration/AccessControl.htm&Locale=&CurPage=";
	document.location.href = uriAccessControlPage;
}
function jsClearList(oTarget) {
	// Clear List
	for (var i=oTarget.length;i>0;i--) {
		oTarget.remove(i-1);
	}
}

function insertTableRowByIndex(oTable,sText,sValue,nIndex) {
//alert("insertTableRowByIndex"+oTable+sText+sValue+nIndex);
	if (oTable == null || sText == "" || nIndex < 0) { return; }
	
	var oRow = oTable.insertRow(nIndex);
	var oCell = oRow.insertCell(0);
	oCell.className = "listNormal";
	oCell.innerHTML = sText;
	oCell.title = sValue;
}

function jsInitPage(){
   //   setOption2Selected(document.getElementById("lstContactIni"));
	//setUIMoveItem(document.getElementById("lstContactIni"),document.getElementById("lstContactList"),false);
	//jsSyncContactTable(document.getElementById("lstContactList"),document.getElementById("tabContact"))
	lstContactIni = document.getElementById("lstContactIni");
	for (var i = 0; i <lstContactIni.options.length; i++)
	{
	  //alert(lstContactIni.options[i].value);
		jsAddContactItem(document.getElementById("lstContactList"), document.getElementById("tabContact"), lstContactIni.options[i].value);
	}
	setListboxUI(document.getElementById("lstSearch"),document.getElementById("divSearchList"),document.getElementById("divSearch"));
    setListboxUI(document.getElementById("lstContactList"),document.getElementById("divContactList"),document.getElementById("divContact"));
	parent.document.getElementById("ifmAdmin_Group").height=document.body.scrollHeight;

}
function jsSubmit() {
	// add some checking

	//document.fmMain.btnSave.disabled = true;
	document.fmMain.FormAction.value="Save";
	jsAddCSRFToken(document.fmMain);
    document.fmMain.submit();
	
}
function jsReset() {
	
	// Reset to default
	if(confirm(STR_ALR_RESET_SETTING)){
		//document.fmMain.btnReset.disabled = true;
		document.fmMain.FormAction.value="Reset";
		jsAddCSRFToken(document.fmMain);
        document.fmMain.submit();
		jsGotoAccessControlPage();
	}
}
function jsGotoMaintainerGroup()
{
	var uriPermissionDelegation = "cgiDispatcher.exe?Page=administration/Maintainer_Group.htm&Locale=&CurPage=";
	document.location.href = uriPermissionDelegation;

}
/* Contact =================================================================== */
function jsInitContactUI(oSearchText,oSearchList,oSearchTable,oSearchInnerDiv,oSearchOuterDiv,oContactList,oContactTable,oInitList) {
	oSearchText.value = "";
	jsClearList(oSearchList);
	for (var i=oSearchTable.rows.length;i>0;i--) {
		oSearchTable.deleteRow(i-1);
	}
	jsContactListUI(oSearchList,oSearchInnerDiv,oSearchOuterDiv);
	
	jsClearList(oContactList);
	setOption2Selected(oInitList);
	setUIMoveItem(oInitList,oContactList,false);
	jsSyncContactTable(oContactList,oContactTable);
}
function jsContactListUI(oList,oOuterDiv,oInnerDiv) {
	oInnerDiv.style.width  = 0;
	oInnerDiv.style.height = 0;
	oList.style.display	= "";
	if (oList.options.length==0) {oList.style.display="none"; return false;}
	
	var nRatio = (vBrowser == "IE")?3:2;
	oList.size = oList.options.length+1;
	
	oList.style.top = -1*nRatio;
	oList.style.left = -1*nRatio;
	/*if (oList.offsetWidth < (oOuterDiv.offsetWidth+(oList.offsetWidth-oList.scrollWidth)-20)+2*nRatio) {
		if (oList.offsetHeight > oOuterDiv.offsetHeight+2*nRatio) {
			oList.style.width = (oOuterDiv.offsetWidth+(oList.offsetWidth-oList.scrollWidth)-20)-2*nRatio;
		} else {
			oList.style.width = (oOuterDiv.offsetWidth+(oList.offsetWidth-oList.scrollWidth)-20)+2*nRatio;
		}
	}
	*/
	var nWidth  = oList.offsetWidth-2*nRatio-(oList.offsetWidth-oList.scrollWidth);
	var nHeight = oList.offsetHeight-2*nRatio;
	oInnerDiv.style.height = (nHeight<0)?0:nHeight;
	oInnerDiv.style.width  = (nWidth<0)?0:nWidth;
}


function jsAddContactItem(oList, oTable, ItemValue) {

	for (var i = 0; i < oList.options.length; i++)
	{
		var vItem1 = oList.options[i].value.split(String.fromCharCode(9));
		var vGUID1 = vItem1[1];
		var vItem2 = ItemValue.split(String.fromCharCode(9));
		var vGUID2 = vItem2[1];
		if (vGUID1 == vGUID2)
		{
			return;
		}
	} 

	// Add Add Item, Item is string like [NAME][GUID][TYPE][P1][P2][P3]
	var vItem;
	var vTemp = ItemValue;
	var vIndex;
	var sDetail="";
	
	vItem = vTemp.split(String.fromCharCode(9));
	var vName =  vItem[0];
	vIndex = setUIAddItemWithValue(vName,vTemp,oList);
	//sDetail = (vItem.length>3 && vItem[3].length>0)?vItem[3].replace(",",", "):"";
	//sDetail = (vItem.length>4 && vItem[4].length>0)?sDetail+oTipMark+vItem[4]:sDetail+"";
	//sDetail = (vItem.length>5 && vItem[5].length>0)?sDetail+oTipMark+vItem[5]:sDetail+"";
	sDetail = setHTMLString(sDetail);
	switch(vItem[2])                                       //Account type:ad user,ad group,special group,smtp address
	{
		  case "ADUser":
		     vTemp= "<img src='images/ad_user.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
		     break;
		  case "ADGroup":
		     vTemp = "<img src='images/ad_group.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
		     break;
		  case "SPUser": //case "2":case "4":
		     vTemp= "<img src='images/SP_user.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
             break;
          case "SPGroup":
		     vTemp= "<img src='images/sp_group.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
		     break;
	}
		
	var oRow = oTable.insertRow(vIndex);
	var oCell = oRow.insertCell(0);
	oCell.className = "listNormal";
	oCell.innerHTML = vTemp;
	oCell.title = sDetail;
	
	setListboxUI(document.getElementById("lstContactList"),document.getElementById("divContactList"),document.getElementById("divContact"));
}

function jsAddSelectedAccount() {
    var oSourceList = document.getElementById("lstSearch");
    var oList = document.getElementById("lstContactList");
    var oTable = document.getElementById("tabContact");

	var nCount = 0;
	for (var i=0;i<oSourceList.options.length;i++) {
		if (oSourceList.options[i].selected) 
		{
		    nCount++;
		    for(var j=0;j<oList.options.length;j++)
		    {
		       var LItem = oList.options[j].value.split(String.fromCharCode(9));
		       var SItem = oSourceList.options[i].value.split(String.fromCharCode(9));
		       var Lguid=LItem[1];
		       var Sguid=SItem[1];
		       if(Lguid==Sguid)
		       {   
		           oSourceList.options[i].selected=false;
		       }
		    }
		}
	}
	if (nCount==0) return;
	
	for (i=0;i<oSourceList.options.length;i++) {
		if (oSourceList.options[i].selected) 
		{
		   jsAddItemOnce(oList,oTable,oSourceList.options[i].value);
		}
	}
    setListboxUI(document.getElementById("lstSearch"),document.getElementById("divSearchList"),document.getElementById("divSearch"));
    setListboxUI(document.getElementById("lstContactList"),document.getElementById("divContactList"),document.getElementById("divContact"));

}
function jsAddItemOnce(oList, oTable, ItemValue)
{
    var vItem;
    var vTemp;
    var vIndex;
    var sDetail="";
    
    vTemp = ItemValue;
    vItem = vTemp.split(String.fromCharCode(9));
    var vName = vItem[0];
    var vType = vItem[2];
    vIndex = setUIAddItemWithValue(vName,ItemValue,oList);
   
    sDetail = setHTMLString(sDetail);
    switch(vItem[2])                                       //Account type:ad user,ad group,special group,smtp address
	{
	    case "ADUser":
	       vTemp = "<img src='images/ad_user.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>"; // \"Detail\",\""+sDetail+"\");'> ";
	       break;
	    case "ADGroup":
	       vTemp = "<img src='images/ad_group.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>"; // \"Detail\",\""+sDetail+"\");'> ";
	       break;
	    case "SPUser": //case "2":case "4":
		       vTemp= "<img src='images/SP_user.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
               break;
        case "SPGroup":
		       vTemp= "<img src='images/sp_group.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
		       break;
	} 
    insertTableRowByIndex(oTable,vTemp,"",vIndex); 

}
function jsRemoveSelectedAccount()
{
   jsRemove();
   setListboxUI(document.getElementById("lstContactList"),document.getElementById("divContactList"),document.getElementById("divContact"));
}
function jsRemove()
{
    var oList = document.getElementById("lstContactList");
    var oTable = document.getElementById("tabContact");

    for (var i=0;i<oList.options.length;i++) 
	{
		if (oList.options[i].selected)
		{
			var strdeleteUserOrGroup = oList.options[i].text;
			strdeleteUserOrGroup = strdeleteUserOrGroup.toLowerCase();
			var tempValue = oList.options[i].value;
			var vItem = tempValue.split(String.fromCharCode(9));
			var type = vItem[2];
			if(type=="ADGroup")
			{	   
			   if(UserBelongGroup.toLowerCase().indexOf(strdeleteUserOrGroup)!=-1)
			   {  
				   oList.options[i].selected = false;
				   alert(STR_GROUP+strdeleteUserOrGroup+STR_DELETE_GROUP_WARN);
			   }
			   else
			   {
			     oList.remove(i);
			     oTable.deleteRow(i);
			   }
			}
			else if(type=="ADUser")
			{
			   if(strdeleteUserOrGroup==currentUser.toLowerCase())
			   {
			      oList.options[i].selected = false;
				  alert(STR_USER+currentUser+STR_DELETE_USER_WARN);  
			   }
			   else
			   {
			     oList.remove(i);
			     oTable.deleteRow(i);
			   }
			}

            jsRemove();
		}
	}
   
}
function jsAddContactText(oSourceText,oList,oTable) {
	oSourceText.value = setTrim(oSourceText.value);
	if (oSourceText.value=="") {
		setFocus(oSourceText);
		return;
	}
	if (!checkEmailPatternFormat(oSourceText.value,STR_WARN_SIP_ADDR,true)) {
		setFocus(oSourceText);
		return;
	}
	if (!checkSipLengthFormat(oSourceText.value, STR_WARN_SIP_ADDR, true)) {
		setFocus(oSourceText);
		return;
	}
	if (!checkNumberRange(oList.options.length+1,INT_NMAX_RULE_CONTACT,0,STR_WARN_RULE_CONTACT,true)) {
		setFocus(oSourceText);
		return;
	}
	// Enter Contact Text
	var sTemp = oSourceText.value.substr(0,4).toLowerCase();
	if (sTemp=="sip:") oSourceText.value = oSourceText.value.slice(4);
	setUIAddItemWithValue("sip:"+oSourceText.value,"sip:"+oSourceText.value+String.fromCharCode(9,9)+"sip"+String.fromCharCode(9,9,9),oList);
	oSourceText.value = "";
	jsSyncContactTable(oList,oTable);
}
function jsSyncContactTable(oList,oTable) {
	for (var i=oTable.rows.length;i>0;i--) {
		oTable.deleteRow(i-1);
	}
	var vItem;
	var oRow;
	var oCell0,oCell1;
	var sDetail="";
	var bTemp = true;
	for (var i=0;i<oList.options.length;i++) {
		vItem = oList.options[i].value.split(String.fromCharCode(9));
		oRow = oTable.insertRow(oTable.rows.length);
		oCell0= oRow.insertCell(0);
		oCell1= oRow.insertCell(1);
		sTemp = (bTemp==true)?"1":"2";
		oCell0.width = "100%";
		oCell0.height = "16";
		oCell0.noWrap = "true";
		oCell0.className = "data1";
		//sDetail = (vItem.length>3 && vItem[3].length>0)?vItem[3].replace(",",", "):"";
		//sDetail = (vItem.length>4 && vItem[4].length>0)?sDetail+oTipMark+vItem[4]:sDetail+"";
		//sDetail = (vItem.length>5 && vItem[5].length>0)?sDetail+oTipMark+vItem[5]:sDetail+"";
		sDetail = setHTMLString(sDetail);
		vItem[0] = setHTMLString(vItem[0]);
		oCell0.innerHTML = "<font size = 2 style='listNormal'><img src='images/ad_"+vItem[2]+".gif' style='cursor:pointer' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\""+sDetail+"\");'> "+vItem[0]+"</font>";
		oCell1.className = "data1";
		oCell1.innerHTML = "<img src=\"images/icon_delete.gif\" onclick=\"jsDelContact("+i+",document.getElementById('"+oList.id+"'),document.getElementById('"+oTable.id+"'));\">";
		bTemp = (!bTemp);
	}
}
function jsSearchAccount(txtKeyword) {
    var strKeyword = document.getElementById(txtKeyword).value;	
	document.getElementById("btnSearch").disabled = true;
    var bUser = document.getElementById("chkUser").checked;
    var bGroup = document.getElementById("chkGroup").checked;
    if (!bUser &&  !bGroup) 
    {
        alert(STR_ALERT_SEARCHACCOUNT_NO_TYPE);
       	document.getElementById("btnSearch").disabled = false;
        return;
    }
    ifmAccount.jsSetRBACheckBox();
    ifmAccount.jsGetAccount(strKeyword, bUser, bGroup);
	parent.jsChangeSearchADUserState();	
 
}
function jsAddSearch() {
        //alert("jsAddSearch");
	if (window.ifmAccount.document.fmMain.txtResultCount.value > INT_NMAX_SEARCH_RESULT) {
		alert(STR_WARN_SEARCH_RESULT_OVER);
		window.ifmAccount.document.fmMain.lstResult.options.length = INT_NMAX_SEARCH_RESULT;
	}
	//document.getElementById("btnSearch").disabled = false;
	//alert(window.ifmContact.document.fmMain.txtResultCount.value);
	// empty the list box
	jsClearList(document.getElementById("lst"+oSearch));
	for (var i=document.getElementById("tab"+oSearch+"List").rows.length;i>0;i--) {
		document.getElementById("tab"+oSearch+"List").deleteRow(i-1);
	}
	document.getElementById("lst"+oSearch).style.width = "";
	document.getElementById("lst"+oSearch).style.height= "";
	document.getElementById("btn"+oSearch).disabled = false;
	
	// Add Search List, [NAME][GUID][TYPE][DN][SAMAccount]
	var vItem;
	var vTemp;
	var vIndex;
	var sDetail="";
	//alert("perepare insert:"+window.ifmContact.document.fmMain.lstResult.options.length);
	for (var i=0;i<window.ifmAccount.document.fmMain.lstResult.options.length;i++) {
		vTemp = window.ifmAccount.document.fmMain.lstResult.options[i].value;
		vItem = vTemp.split(String.fromCharCode(9));
		var vName = vItem[0];
		vIndex = setUIAddItemWithValue(vName,vTemp,document.getElementById("lst"+oSearch));
		sDetail = setHTMLString(sDetail);
		switch(vItem[2])                                       //Account type:ad user,ad group,special group,smtp address
		{
		     case "ADUser":
		       vTemp= "<img src='images/ad_user.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
		       break;
		    case "ADGroup":
		       vTemp = "<img src='images/ad_group.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
		       break;
		    case "SPUser":  //case "2":case "4":
		       vTemp= "<img src='images/SP_user.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
               break;
            case "SPGroup":
		       vTemp= "<img src='images/sp_group.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
		       break;
		}
		insertTableRowByIndex(document.getElementById("tab"+oSearch+"List"),vTemp,"",vIndex);
	}
	setListboxUI(document.getElementById("lstSearch"),document.getElementById("divSearchList"),document.getElementById("divSearch"));
	parent.jsChangeSearchADUserState();	
}
function jsSetCurrentUserOrGroup(user,group)
{
  currentUser = user;
  UserBelongGroup = group;
}
function jsContactSave() {
	
			// setUIMoveItem(document.getElementById("lstContactList"),document.getElementById("lstException"),false);
		        setOption2Selected(document.getElementById("lstContactList"));
		        //alert(document.getElementById("lstContactList").options.length);
		        //alert(document.getElementById("lstContactList").value);
		        //alert(document.getElementById("lstException").options.length);
		
			document.fmContact.FormAction.value="Save";
			jsAddCSRFToken(document.fmContact);
			document.fmContact.submit();
			
}
function jsContactClose(){

		document.fmContact.FormAction.value="Reset";
		jsAddCSRFToken(document.fmContact);
		document.fmContact.submit();
	
}



//-->

</script>
</head>

<body onLoad="jsInitPage();" style="margin-left: 0px;">

<!--CONTACT-->
<div id="divContact" name="divContact">
<form id="fmContact" name="fmContact" action="$$FORM_ACTION$$" method="POST">
<!--Hidden Field-->
<input type="hidden" name="FormAction">
<select style="display:none" id="lstException" name="lstException" multiple="true">$$CONTACT_EXCLUDE_LIST$$</select>
<select style="display:none" id="lstContactIni" name="lstContactIni" multiple="true">$$CONTACT_INI$$</select>
<!--/Hidden Field-->

<!--
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr><td class="content-title">Access Control</td>
	<td align="right" valign="bottom">
		<a href="javascript:jsMapOnlineHelp('administration\SSORBA_Settings.htm');" class="moretestblue">
		<img src="images/question.gif" class="vAlignMid"> Help</a></td></tr>
<tr><td colspan="2" height="4"></td></tr>
<tr><td colspan="2" height="1" background="images/dot.gif"></td></tr>
<tr><td colspan="2" height="10"></td></tr>
    <tr>
      <td colspan="2" class="data1"><a href="javascript:jsGotoSSOSetting();">Account </a> &gt;Administrator</td>
    </tr>
<tr><td colspan="2" height="10"></td></tr>
</table>
-->

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--
		<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr><td background="images/tab_background_cui.gif">
			<table border="0" cellpadding="0" cellspacing="0">
			
			
			
				<tr><td><img id="Tag1_imgS" src="images/tab_active1_left_cui.gif" style="vertical-align:top"></td>
				<td valign="top" nowrap id="Tag1" style="background-image:url(images/tab_active_background_cui.gif)" class="tabactive">Authentication</td>
				<td><img id="Tag1_imgE" src="images/tab_active_right_cui.gif" style="vertical-align:top"></td>
				<td><img id="Tag2_imgS" src="images/tab_inactive2_left_cui.gif" style="vertical-align:top"></td>
				<td valign="top" nowrap id="Tag2" style="background-image:url(images/tab_inactive_background_cui.gif)" class="tabinactive"><a class="subnavselect" href="javascript:jsGotoMaintainerPermissionDelegation();">Permissions</a></td>
				<td><img id="Tag2_imgE" src="images/tab_inactive_right_cui.gif" style="vertical-align:top"></td>
				</tr>
			</table></td>      
			<td align="right" background="images/tab_background_cui.gif"><img src="images/tab_right_corner_cui.gif" style="vertical-align:top"></td></tr>
		</table></td></tr>
-->

         <tr><td colspan="2" class="border"><table width="100%" border="0" cellpadding="0" cellspacing="0">

         
	 <tr> 
            <td class="tableheadergreyS">Description</td>
         </tr>
         <tr> 
	      <td style="padding-left: 5px; padding-top: 5px; padding-bottom: 5px; padding-right: 5px;"> 
	        <table width="100%" border="0" cellspacing="0" cellpadding="0">
	        <tr>
	
	          <td height="5" class="data1" valign="top" style="width:80px" nowrap>
	            Administrator: </td><td align="left">
	               <textarea id="textDiscrip"name="textDiscrip" cols="50" class="button">$$DISCRIP$$</textarea></td>
	        </tr>
	        </table>
	      
	      </td>
    	</tr>
    	</table></td></tr>
    	<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="border-NoTop">
		<tr><td class="tableheadergreyS" colspan="2">Select Accounts from AD</td></tr>
		<tr><td height="5" colspan="2"></td></tr>
		<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr><td width="100%">
						<table width="100%" border="0" cellpadding="0" cellspacing="0">
						<tr><td class="data1" width="100%">Search for users or groups:</td>
							<td class="data1"><input type=button class="text" style="width:50;visibility:hidden"></td></tr>
						</table></td>
					</tr>
				<tr><td height="250" valign="top">
					    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" id="tabSearch">
						        <tr><td class="data1" width="30%">
								        <table width="100%" border="0" cellpadding="0" cellspacing="0">
								        <tr><td width="100%"><input type=text class="text" id="txtSearch" name="txtSearch" style="width:230" onKeyDown="javascript:if(event.keyCode==13) {document.getElementById('btnSearch').focus();document.getElementById('btnSearch').click();}"></td>
									        <td><input type=button class="text" value="Search" id="btnSearch" name="btnSearch" onClick="jsSearchAccount('txtSearch');"></td></tr>
								        <tr><td colspan="2">Search in:&nbsp;</td><td></td></tr>
								        <tr><td colspan="2"><table><tr>
									       <td> <input type=checkbox id="chkUser" name="chkUser" CHECKED></td><td> Users</td>
									        <td><input type=checkbox id="chkGroup" name="chkGroup" CHECKED></td><td> Groups</td></tr></table></td>
											<td></td></tr>
								        </table></td>
							        <td></td>
							        <td>
							        <table width="280" border="0" cellpadding="0" cellspacing="0" >
							        <tr><td>							        
							       	 	Note: Default Administrators of PortalProtect (Local Administrators, Domain Admins and AD group you selected when install PortalProtect) will not be displayed here.
							        </td></tr></table>
							        </td></tr>
						        <tr><td class="data1" height="100%">
								        <table border="0" cellpadding="0" cellspacing="0" width="280" height="240" class="border">
									        <tr><td class="grey-end" height="22">Available Account(s)</td></tr>
									        <tr><td><div id="divSearch" style="overflow:auto;width:280;height:240" >
											        <table border="0" cellpadding="0" cellspacing="0">
											        <tr><td style="padding-top:1;padding-left:1" valign="top"><table id="tabSearchList" border="0" cellpadding="0" cellspacing="0"></table></td>
												        <td style="padding-top:1;padding-left:1" valign="top" width="100%"><div id="divSearchList" style="position:relative;overflow:hidden;width:100%">
													        <select id="lstSearch" name="lstSearch" multiple style="position:relative;top:-3;left:-3;font-size:13px;">
													        </select></div></td></tr>
											        </table></div></td></tr>
								        </table>
							        </td>
							        <td valign="middle" style="padding-right:5">
							                 <input type=button class="text" value="Add &gt;&gt;" id="add_btn_12" style="width:90" onClick="jsAddSelectedAccount();"></br>
								             <input type=button class="text" value="&lt;&lt; Remove" id="Remove_btn_12" style="width:90" onClick="jsRemoveSelectedAccount();">
								    </td>
							        <td width="100%" class="data1">
						                    <table width="280" height="240" border="0" cellpadding="0" cellspacing="0" class="border">
						                            <tr><td class="grey-end" height="22">Selected Account(s)</td></tr>
						                            <tr><td><div id="divContact" style="overflow:auto;width:280;height:240" >
							                                    <table border="0" cellpadding="0" cellspacing="0">
			                                                            <tr><td style="padding-top:1;padding-left:1" valign="top"><table id="tabContact" width="100%" border="0" cellpadding="0" cellspacing="0" valign="top"></table></td>
			                                                                <td style="padding-top:1;padding-left:1" valign="top" width="100%">
			                                                                    <div id="divContactList" style="position:relative;overflow:hidden;width:100%">
			                                                                         <select class="text" id="lstContactList" name="lstContactList"  style="display:none;position:relative;top:-3;left:-3;font-size:13px;" multiple ></select>
			                                                                    </div></td></tr>
								                                </table></div></td></tr>
						                    </table>			
							        </td>
					            </tr>
						</table>
						</td></tr>
				<tr><td height="10" colspan="2"></td></tr>
				<tr><td height="1" colspan="2" background="images/dot.gif"></td></tr>
				<tr><td colspan="2" ><table><tr>
				                                <td nowrap><img src="images/ad_user.gif" alt="AD Users" align="absmiddle"></td>
                                                <td nowrap class="data1"><span>-AD Users</span></td>
                                                <td width="22" align="right" nowrap><img src="images/ad_group.gif" alt="AD Groups" align="absmiddle"></td>
                                                <td nowrap class="data1"><span>-AD Groups</span></td>
                                              <!--  <td width="22" align="right" nowrap><img src="images/SP_user.gif" alt="SharePoint User" align="absmiddle"></td>
                                                <td nowrap class="data1"><span>-SharePoint User</span></td>
                                                <td width="22" align="right" nowrap><img src="images/sp_group.gif" alt="SharePoint Group" align="absmiddle"></td>
                                                <td nowrap class="data1"><span>-SharePoint Group</span></td>-->
										   </tr>	
                                    </table></td></tr>  
				</table></td></tr>
		</table></td></tr>
  
</table>
<!--
<table width="100%" border="0" cellspacing="0" cellpadding="0" display="none">
<tr><td height="10"></td></tr>
<tr><td><input type=button class="text" value="Save" onclick="jsContactSave();">
		<input type=button class="text" value="Reset" onclick="jsContactClose();"></td></tr>
</table>
-->

</form>
</div>


<div id="divNotification_Recipient" name="divNotification_Recipient" style="display:none;">
<iframe id="ifmAccount" name="ifmAccount" src="$$ACCOUNT_SEARCH_CGI_URL$$" frameBorder="0" width="0" height="0" style="display:none"/>
<iframe id="ifmToolTip" name="ifmToolTip" src="html/ToolTip.htm" frameborder="0" style="z-index:10000;position:absolute;width:0;height:0;overflow:hidden"/>
</div>
</body>
</html>