<html>
<head>
<title>Quarantine_Query</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" src="javascripts/TmCube_Common.js"></script>
<script language="JavaScript" src="javascripts/TmCube_Tree.js"></script>
<script language="JavaScript" src="cgiDispatcher.exe?Page=administration/SystemDateTime.htm">
<!-- //src="cgiDispatcher.exe?Page=administration/SystemDateTime.htm" return 4 values: vSvrDate, vSvrDateFormat, vSvrTime, vSvrTimeFormat, vSvrTwoDigitYearMax. //-->
</script>
<script language="JavaScript" type="text/JavaScript">
<!--
var STR_QUARANTINE_SORT_INTERNAL = "DeleteDate,LeafName,LastModifiedUser";

var bAddResult = false; //when call jsAddSearch() function, disable specify users link
var vReasons     = "";
var vSort        = 0;
var vSortType    = 0;
var vNumPerPage  = 15;
var vTargetPage  = 0;
var vViolator    = 0;
var vRecCount    = 0;
var vPageCount   = 0;
var vCurrentPage = 0;

var bFirst = false;
//strDateString type S_DATETIME_SPEC_YYYYMMDDHHMMSS  _T("%4s-%2s-%2s %2s:%2s:%2s")
function newDate(strDateString)
{
    var vDateTime = strDateString.split(" ");
    var vDate = vDateTime[0].split("-");
    var vTime = vDateTime[1].split(":");
    // The js Date month range is 0--11, so need vDate[1]-1
    return new Date(vDate[0],vDate[1]-1,vDate[2],vTime[0],vTime[1],vTime[2]);
}
    
var strbeginTime  = "$$QUERY_BEGIN_TIME$$";
var strEndTime = "$$QUERY_END_TIME$$";
var vDateFrom = newDate(strbeginTime);
var vDateTo = newDate(strEndTime);


function jsInitPage() {
	// Init Page
	window.document.onclick = jsCloseCalendar;
	var ModifiedFormat = DecorateDateFormat(vSvrDateFormat);
	document.getElementById("FromDateString").innerHTML = ModifiedFormat;
	document.getElementById("ToDateString").innerHTML = ModifiedFormat;
	
	setOptionValue(document.fmMain.optHourFrom,STR_TIME_HOUR,false);
	setOptionValue(document.fmMain.optMinuteFrom,STR_TIME_MIN,false);
	setOptionValue(document.fmMain.optHourTo,STR_TIME_HOUR,false);
	setOptionValue(document.fmMain.optMinuteTo,STR_TIME_MIN,false);
	setOptionValueEx(document.fmMain.optSort,STR_QUARANTINE_SORT,STR_QUARANTINE_SORT_INTERNAL);
	if($$ID_PR_DLP_FILTER_DISABLE$$)
		setOptionValueEx(document.fmMain.optReasons,STR_QUARANTINE_REASON,STR_QUARANTINE_REASON_INTERNAL);
	else
		setOptionValueEx(document.fmMain.optReasons,STR_QUARANTINE_REASON_DLP,STR_QUARANTINE_REASON_DLP_INTERNAL);
	// prepare global variables
    
	// prepare datetime field
	document.fmMain.txtDateFrom.value = setDateTimeFormat(vDateFrom).substr(0,10);
	document.fmMain.txtDateFrom_display.value = setDateTimeFormatToServerSetting(setDateTimeFormat(vDateFrom).substr(0,10),vSvrDateFormat);
	document.fmMain.optHourFrom.selectedIndex = vDateFrom.getHours();
	document.fmMain.optMinuteFrom.selectedIndex = vDateFrom.getMinutes();
	document.fmMain.txtDateTo.value = setDateTimeFormat(vDateTo).substr(0,10);
	document.fmMain.txtDateTo_display.value = setDateTimeFormatToServerSetting(setDateTimeFormat(vDateTo).substr(0,10),vSvrDateFormat);
	document.fmMain.optHourTo.selectedIndex	= vDateTo.getHours();
	document.fmMain.optMinuteTo.selectedIndex = vDateTo.getMinutes();
	
    setListboxUI(document.getElementById("lstAvailableAccount"),document.getElementById("divAvailableAccountInner"),document.getElementById("divAvailableAccountOuter"));
    setListboxUI(document.getElementById("lstSelectedAccount"),document.getElementById("divSelectedAccountInner"),document.getElementById("divSelectedAccountOuter"));

  	document.fmMain.btnSearch.disabled = false;
    TmCube_Tree.onload();
}

function SetCwinHeight(obj)
{
  var cwin=obj;
  {
    if (cwin)
    {
      if (cwin.contentDocument && cwin.contentDocument.body.offsetHeight)  //for FF
       { 
	     if(cwin.contentDocument.body.offsetHeight>cwin.contentDocument.body.clientHeight||cwin.contentDocument.body.scrollWidth>cwin.contentDocument.body.clientWidth)
		   cwin.height = cwin.contentDocument.body.offsetHeight+20; 
	     else
		   cwin.height = cwin.contentDocument.body.offsetHeight; 
	   }
      else if(cwin.contentWindow.document && cwin.contentWindow.document.body)   //for IE
       {
		  if(cwin.contentWindow.document.body.scrollHeight>cwin.contentWindow.document.body.clientHeight||cwin.contentWindow.document.body.offsetHeight>cwin.contentWindow.document.body.clientHeight)
		   { 
		      if(cwin.contentWindow.document.body.clientWidth<cwin.contentWindow.document.body.scrollWidth)
			  {
			   cwin.height = cwin.contentWindow.document.body.scrollHeight+20;
			  }
			  else
               cwin.height = cwin.contentWindow.document.body.scrollHeight;	
		   }   
		  else
            cwin.height = cwin.contentWindow.document.body.scrollHeight;        		  
	   }
    }
  }
}

function jsSubmit() {
	// add some checking
    if (document.getElementById("btnSearch").disabled)return;
	vDateFrom = setDateTimeFormatToProgramStandard(document.fmMain.txtDateFrom_display.value,vSvrDateFormat,vSvrTwoDigitYearMax);
	if (!checkDateTimeFormat(vDateFrom,STR_WARN_DATE,vSvrDateFormat)) {
		jsFocus(document.fmMain.txtDateFrom_display);
		return;
	}
	vDateTo = setDateTimeFormatToProgramStandard(document.fmMain.txtDateTo_display.value,vSvrDateFormat,vSvrTwoDigitYearMax);
	if (!checkDateTimeFormat(vDateTo,STR_WARN_DATE,vSvrDateFormat)) {
		jsFocus(document.fmMain.txtDateTo_display);
		return;
	}
	if (!checkNumberRange(document.fmMain.txtNumPerPage.value,INT_NMAX_LOG_PAGENUM,1,STR_ERR_INVALID_LOG_REC_PER_PAGE, false)) {
		document.fmMain.txtNumPerPage.focus();
		document.fmMain.txtNumPerPage.select();
		return;
	}
	
	document.fmMain.txtDateFrom.value = vDateFrom;
	document.fmMain.txtDateTo.value = vDateTo;
	jsCombineDateTime();
	if (new Date(document.fmMain.txtDateFrom.value) > new Date(document.fmMain.txtDateTo.value)) {
		alert(STR_ERR_DATETIME_PERIOD);
		document.fmMain.txtDateFrom.value = document.fmMain.txtDateFrom.value.substr(0,10);
		document.fmMain.txtDateTo.value = document.fmMain.txtDateTo.value.substr(0,10);
		document.fmMain.txtDateFrom_display.focus();
		document.fmMain.txtDateFrom_display.select();
		return;
	}

    var strDateFrom = document.fmMain.txtDateFrom.value;
    var strDateTo = document.fmMain.txtDateTo.value;
    
    var strAccount = getAccount();
    var strSite = getSite();
    if (strAccount == "")
    {
        alert(STR_ALERT_NO_ACCOUNT);
        return;
    }
    if (strSite == "")
    {
        alert(STR_ALERT_NO_SITE);
        return;
    }
    var objReasons = document.getElementById("optReasons");
    var objSortBy = document.getElementById("optSort");

    var strReason = objReasons.options[objReasons.selectedIndex].value;
    var strSortBy = objSortBy.options[objSortBy.selectedIndex].value;

    var strSortOrder = document.getElementsByName("optSortType")[0].checked? "0": "1";
    var strNumPerPage = document.getElementById("txtNumPerPage").value;

    var strFileName = document.getElementById("txtFileName").value;
    //validate the file Name
    // not include " \ / ? : * < > |
    if (-1 != strFileName.indexOf("\\") ||
        -1 != strFileName.indexOf("\"") ||
        -1 != strFileName.indexOf("?") ||
        -1 != strFileName.indexOf(":") ||
        -1 != strFileName.indexOf("*") ||
        -1 != strFileName.indexOf("<") ||
        -1 != strFileName.indexOf(">") ||
        -1 != strFileName.indexOf("|")) 
    {
        alert(STR_ALERT_FILENAME_UNVALIDATE);
        return;
    }
	if(strFileName.indexOf("'")!=-1)
	  {
		   strFileName = strFileName.replace(/'/g,"''");
	  }
   if(strFileName.indexOf("[")!=-1)
	 {
		   strFileName = strFileName.replace(/\[/g,"[[]");
	 }		
    // disabled the active button
	document.fmMain.btnSearch.disabled = true;
    var ifr_window =document.getElementById("ifmResult");//window.frames["ifmResult"];
    ifr_window.contentWindow.setOption(strDateFrom, strDateTo, strReason, strSortBy, strSortOrder, strNumPerPage, strAccount, strSite, strFileName);
    ifr_window.contentWindow.jsQuery(); 
      	
	//document.fmMain.btnSearch.disabled = false;    

    if (!bFirst)
    {
        bFirst = true;
        document.getElementById("divResult").style.display = ""; 
    }
            
}
function getAccount()
{
    var isAllAccount = document.getElementById("optViolator").checked ? 1:0;
    if (isAllAccount)
    {
         return "ANYONE";
    }
    var ret = "";
    var vecAccount=new Array();
    for (i=0;i<document.getElementById("lstSelectedAccount").options.length;i++)
    {
        vecAccount[i]=document.getElementById("lstSelectedAccount").options[i].value;
    }
    ret = jsJoinStringWithLen(vecAccount)
    return ret;
}
function getSite()
{
    var resultArray = new Array;
    var isAllSite = document.getElementById("optSite").checked ? 1: 0;
    if (isAllSite)
    {
       TmCube_Tree_getAllSiteResult(resultArray);
    }
    else
    {   
        TmCube_Tree_getTreeResult(resultArray);
    }
    var resultString ="";
    for (var i=0; i<resultArray.length; i++)
    {
        if (resultArray[i].charAt(resultArray[i].length-1) == "P")continue;
        resultString += resultArray[i];
        resultString += ",";        
    }
    if (resultString.length >= 1)return resultString.substring(0, resultString.length-1);
    return resultString;
}

function jsCombineDateTime() {
	if (document.fmMain.txtDateFrom.value != "") {
		document.fmMain.txtDateFrom.value = setDateTimeFormat(document.fmMain.txtDateFrom.value).substr(0,10)
			+ " " + document.fmMain.optHourFrom.value
			+ ":" + document.fmMain.optMinuteFrom.value;
	}
	if (document.fmMain.txtDateTo.value !="") {
		document.fmMain.txtDateTo.value = setDateTimeFormat(document.fmMain.txtDateTo.value).substr(0,10)
			+ " " + document.fmMain.optHourTo.value
			+ ":" + document.fmMain.optMinuteTo.value;
	}
}

function jsCloseCalendar() {
	document.getElementById("divCalendar").style.width = 0;
	document.getElementById("divCalendar").style.height = 0;
	jsResetCalendarPos();
}

function jsGetCalendarFrom()
{
	document.getElementById("ifmCalendar").style.width = 245;
	document.getElementById("ifmCalendar").style.height = 200;
	getCalendar(window.ifmCalendar,document.fmMain.txtDateFrom_display,vSvrDateFormat,vSvrTwoDigitYearMax);
}
function jsGetCalendarTo()
{
	document.getElementById("ifmCalendar").style.width = 245;
	document.getElementById("ifmCalendar").style.height = 200;
	getCalendar(window.ifmCalendar,document.fmMain.txtDateTo_display,vSvrDateFormat,vSvrTwoDigitYearMax);
}
	
function jsResetCalendarPos()
{
	document.getElementById("ifmCalendar").style.width = 0;
	document.getElementById("ifmCalendar").style.height = 0;
}

function jsSearchSite(inputId)
{
    var str=document.getElementById(inputId).value;
    TmCube_Tree_UrlSearch(str);
}

function jsHideDiv(tarId,iniIcon,actIcon)
{
    if (document.getElementById(tarId) == null) return;
		
	if (iniIcon != null && actIcon != null && document.getElementById(tarId + "_icon") != null) 
	{
	    var bFlag = (document.getElementById(tarId + "_icon").src.indexOf(iniIcon) < 0)?false:true;
	    var iconSrc = (bFlag)?document.getElementById(tarId + "_icon").src:document.getElementById(tarId + "_icon").src.replace(actIcon,iniIcon);
	    document.getElementById(tarId + "_icon").src = iconSrc;
	}
	
	if(document.getElementById(tarId + "_settings") != null)
	{
	    document.getElementById(tarId + "_settings").style.display = "none";
	}
}

function jsShowDiv(tarId,iniIcon,actIcon,selectAllId)
{
     if(bAddResult) return;
    if (document.getElementById(selectAllId).checked)return;
    jsDisplayMoreUI(tarId,iniIcon,actIcon);
}
// For account search
function jsAddSelectedAccount() {
    var oSourceList = document.getElementById("lstAvailableAccount");
    var oList = document.getElementById("lstSelectedAccount");
    var oTable = document.getElementById("tabSelectedAccountList");

	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("lstAvailableAccount"),document.getElementById("divAvailableAccountInner"),document.getElementById("divAvailableAccountOuter"));
    setListboxUI(document.getElementById("lstSelectedAccount"),document.getElementById("divSelectedAccountInner"),document.getElementById("divSelectedAccountOuter"));

}

function jsRemoveSelectedAccount()
{
   jsRemove();
   setListboxUI(document.getElementById("lstSelectedAccount"),document.getElementById("divSelectedAccountInner"),document.getElementById("divSelectedAccountOuter"));
}
function jsRemove()
{
    var oList = document.getElementById("lstSelectedAccount");
    var oTable = document.getElementById("tabSelectedAccountList");

    for (var i=0;i<oList.options.length;i++) 
	{
		if (oList.options[i].selected)
		{
			oList.remove(i);
			oTable.deleteRow(i);
		 //   setListboxUI(document.getElementById("lstSelectedAccount"),document.getElementById("divSelectedAccountInner"),document.getElementById("divSelectedAccountOuter"));

            jsRemove();
		}
	}
   
}

function jsSearchAccount(txtKeyword) {
    var strKeyword = document.getElementById(txtKeyword).value;	
	document.getElementById("btnSearchAccount").disabled = true;
	document.getElementById("optViolator").disabled = true;
	ifmAccount.jsGetAccount(strKeyword);
	jsChangeAddSearchState()
}
function jsChangeAddSearchState()
{
     if(bAddResult)
	     bAddResult=false;
	else 
         bAddResult = true;	
}
function jsAddSearch() {
//	bAddResult = true;
	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;
	}
	//alert(window.ifmAccount.document.fmMain.txtResultCount.value);
	// empty the list box
	document.getElementById("btnSearchAccount").disabled = false;
	document.getElementById("optViolator").disabled = false;
	jsClearList(document.getElementById("lstAvailableAccount"));
	
    for (var i=document.getElementById("tabAvailableAccountList").rows.length;i>0;i--) {
		    document.getElementById("tabAvailableAccountList").deleteRow(i-1);
	}
	document.getElementById("lstAvailableAccount").style.width = "";
	document.getElementById("lstAvailableAccount").style.height= "";
    	
	// Add Search List, [NAME][GUID][TYPE]
	var vItem;
	var vTemp;
	var vIndex;
    var sDetail="";

	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("lstAvailableAccount"));
		sDetail = setHTMLString(sDetail);
		switch(vItem[2])                                       //Account type:ad user,ad group,special group,smtp address
		{
		     case "0":
		       vTemp= "<img src='images/ad_user.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
		       break;
		    case "1":
		       vTemp = "<img src='images/ad_group.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
		       break;
		    case "2":
		       vTemp= "<img src='images/Special_group.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>";//\"Detail\",\""+sDetail+"\");'> ";
		       break;
		}
		insertTableRowByIndex(document.getElementById("tabAvailableAccountList"),vTemp,"",vIndex);
	}
	//jsContactListUI(document.getElementById("lst"+oSearchlocal),document.getElementById("div"+oSearchlocal),document.getElementById("div"+oSearchlocal+"List"));
    setListboxUI(document.getElementById("lstAvailableAccount"),document.getElementById("divAvailableAccountInner"),document.getElementById("divAvailableAccountOuter"));
    jsChangeAddSearchState();
}
function 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 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 vValue = vName;
    vIndex = setUIAddItemWithValue(vName,vValue,oList);
   
    sDetail = setHTMLString(sDetail);
    switch(vItem[2])                                       //Account type:ad user,ad group,special group,smtp address
	{
	    case "0":
	       vTemp = "<img src='images/ad_user.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>"; // \"Detail\",\""+sDetail+"\");'> ";
	       break;
	    case "1":
	       vTemp = "<img src='images/ad_group.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>"; // \"Detail\",\""+sDetail+"\");'> ";
	       break;
	    case "2":
	       vTemp = "<img src='images/Special_group.gif' onmouseout='hideToolTip(\"ifmToolTip\");' onmouseover='showToolTip1(event,\"ifmToolTip\",300,100,\"Detail\",\"\");'>"; // \"Detail\",\""+sDetail+"\");'> ";
	       break;
	} 
    insertTableRowByIndex(oTable,vTemp,"",vIndex); 

}
function jsClearList(oTarget) {
	// Clear List
	for (var i=oTarget.length;i>0;i--) {
		oTarget.remove(i-1);
	}
}
//-->
</script>
<style id="CompCSS" type="text/css">

.tabbedPane
{
 position : relative;
 padding : 10px;
 border : 1px solid #666666;
}
/* Compnent : Tree */
div.lineIE
{
	margin-top:-3px;
	height : 18px;
	FONT-SIZE: 10px;
	FONT-FAMILY: "Verdana", "Arial", "Helvetica", "sans-serif";
	word-wrap: normal;
	white-space : nowrap;
}
div.lineNS
{
	height : 18px;
	FONT-SIZE: 10px;
	FONT-FAMILY: "Verdana", "Arial", "Helvetica", "sans-serif";
	word-wrap: normal;
	white-space : nowrap;
}
div.subitems
{
    padding-left: 16px;
    FONT-SIZE: 10px;
    FONT-FAMILY: "Verdana", "Arial", "Helvetica", "sans-serif";
	background-image:url(./images/tree_line2.gif);
    background-repeat:repeat-y;
}
div.bottomsubitems
{
    padding-left: 16px;
    FONT-SIZE: 10px;
	FONT-FAMILY: "Verdana", "Arial", "Helvetica", "sans-serif";
}

div.root
{
	overflow : auto;
	border : 1px solid;
	padding:2px;
}
.iconbutton
{
	cursor : hand;
}
</style>
<body topmargin="0" onLoad="jsInitPage();">

<form id="fmMain" name="fmMain" action="$$FORM_ACTION$$" method="POST">
<!--Hidden Field-->
<input type="hidden" id="txtDateFrom" name="txtDateFrom">
<input type="hidden" id="txtDateTo" name="txtDateTo">
<!--/Hidden Field-->
<!--Page Title-->
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr><td class="content-title">Quarantine Query</td>
	<td align="right" valign="bottom">
		<a href="javascript:jsMapOnlineHelp('quarantine\query.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>
</table>
<!--/Page Title-->
<table width="98%" border="0" cellspacing="0" cellpadding="0" class="border">
<!--Page Description--><!--/Page Description-->
<!--Page Content-->
<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0" >
		<!--||Criteria||-->
		<tr><td class="tableheadergreyS">Criteria</td></tr>
		<tr><td><table width="96%" border="0" cellpadding="0" cellspacing="0">
				<tr><td class="data1" width="56" valign="top">Dates: </td>
					<td width="884" class="data1"><table border="0" cellpadding="0" cellspacing="0">
						<tr><td nowrap><table border="0" cellpadding="0" cellspacing="0"><tr>
                                       <td><input type=text class="text" id="txtDateFrom_display" name="txtDateFrom_display" style="width:75"></td>
                                       <td>&nbsp;<a href="javascript:jsGetCalendarFrom()"><img 
								id="txtDateFrom_display_img" src="images/icon_calendar.gif" style="position:relative;vertical-align:top" class="vAlignMid"></a></td></tr></table></td>
							<td><select class="text" id="optHourFrom" name="optHourFrom"></select></td>
							<td><select class="text" id="optMinuteFrom" name="optMinuteFrom"></select></td>
							<td>&nbsp;to&nbsp;</td>
							<td><table border="0" cellpadding="0" cellspacing="0"><tr><td><input type=text class="text" id="txtDateTo_display" name="txtDateTo_display" style="width:75"></td>
                            <td>&nbsp;<a href="javascript:jsGetCalendarTo();"><img 
								id="txtDateTo_display_img" src="images/icon_calendar.gif" style="position:relative;vertical-align:top" class="vAlignMid"></a></td></tr></table></td>
							<td><select class="text" id="optHourTo" name="optHourTo"></select></td>
							<td><select class="text" id="optMinuteTo" name="optMinuteTo"></select></td>
                            <td nowrap>&nbsp;<strong>Time Zone:GMT$$TIME_ZONE$$</strong></tr>
						<tr valign="top"><td><span id="FromDateString">mm/dd/yyyy</span></td><td>hh</td><td>mm</td><td></td><td><span id="ToDateString">mm/dd/yyyy</span></td><td>hh</td><td>mm</td><td></td></tr>
						</table></td></tr>
                <tr><td colspan="2" height="4"></td></tr>
                <tr><td class="data1" valign="top">Violator: </td>
                    <td class="data1">
                    <table border="0" cellpadding="0" cellspacing="0">
                    <tr><td><table border="0" cellpadding="0" cellspacing="0"><tr>

                        <td><input type="radio" id="optViolator" name="optViolator" checked="checked" value="0"
                        onclick="jsHideDiv('SearchCriteria','arrow_down.gif','arrow_up.gif');"></td><td>All</td></tr></table>

                    </td></tr>
                    <tr><td><table border="0" cellpadding="0" cellspacing="0"><tr>
                        
                        <td><input type="radio" name="optViolator" value="1" /></td>
                           <td><a href="javascript:jsShowDiv('SearchCriteria','arrow_down.gif','arrow_up.gif','optViolator');" id="SearchCriteria">Specify user(s)
                        <img src="images/arrow_down.gif" border="0" id="SearchCriteria_icon" /></a></td></tr></table>
                    </td></tr>
                    <tr><td align="left" valign="top">
                        <table id="SearchCriteria_settings" style="display:none" border="0" cellspacing="0" >
                        <tr><td width="20">&nbsp;</td>
                            <td height="30" colspan="5">
                            <span class="data1">Search for AD users:
                            <input type="text" class="button" size="25" name="txtSearch" id="txtSearch" />
                            <input id="btnSearchAccount" name="btnSearchAccount" type="button" class="button" onClick="jsSearchAccount('txtSearch')" value="Search" style="width:50px" /> 
                            </span></td></tr>
                        <tr>
                            <td width="20" >&nbsp;</td>
                            <td width="200">
                            <table  border="0" cellspacing="0" class="border" width="200" >
                                <tr> <td align="left" valign="bottom" class="grey2" cellspacing="10">Available accounts</td></tr>
                                <tr><td><div id="divAvailableAccountOuter" style="overflow:auto;width:200;height:200">
											            <table  border="0" cellpadding="0" cellspacing="0">
											            <tr><td valign="top"><table id="tabAvailableAccountList" border="0" cellpadding="0" cellspacing="0"></table></td>
												            <td valign="top" width="100%"><div id="divAvailableAccountInner" style="position:relative;overflow:hidden;width:100%">
													            <select id="lstAvailableAccount" name="lstAvailableAccount" multiple style="position:relative;top:-3;left:-3;font-size:13px;">
													            </select></div></td></tr>
											            </table></div></td></tr>
                            </table>
                            </td>
                            <td width="10"></td>
                            <td width="80">
                            <table>
                            <tr>
                                <td><input id="btnAddAccount" type="button" class="button" value="Add &gt;&gt;" onClick="jsAddSelectedAccount();" style="width:80"/></td>
                            </tr>
                            <tr>
                                <td><input id="btnRemoveAccount" type="button" class="button" value="&lt;&lt; Remove" onClick="jsRemoveSelectedAccount();" style="width:80"/></td>
                            </tr>
                            </table></td>
                            <td width="10"></td>
                            <td width="200">
                            <table  border="0" cellspacing="0" class="border" width="200" >
                                <tr> <td align="left" valign="bottom" class="grey2" cellspacing="10">Selected accounts</td></tr>
                                <tr><td><div id="divSelectedAccountOuter" style="overflow:auto;width:200;height:200">
											            <table  border="0" cellpadding="0" cellspacing="0">
											            <tr><td valign="top"><table id="tabSelectedAccountList" border="0" cellpadding="0" cellspacing="0"></table></td>
												            <td valign="top" width="100%"><div id="divSelectedAccountInner" style="position:relative;overflow:hidden;width:100%">
													            <select id="lstSelectedAccount" name="lstSelectedAccount" multiple style="position:relative;top:-3;left:-3;font-size:13px;">
													            </select></div></td></tr>
											            </table></div></td></tr>
                            </table>
                            </td>
                        </tr>
                        </table>                                        
                    </td></tr>
                    </table>
                    </td></tr>
   		        <tr><td colspan="2" height="4" ></td></tr>
                <tr><td class="data1" valign="top">Site:</td>
                    <td class="data1">
                    <table border="0" cellpadding="0" cellspacing="0">
                    <tr><td><table border="0" cellpadding="0" cellspacing="0"><tr>
                     <td><input type=radio id="optSite" name="optSite" checked="checked" value="0"
                        onclick="jsHideDiv('SearchSite','arrow_down.gif','arrow_up.gif');"></td><td>All</td></tr></table>
                    </td></tr> 
                    <tr><td><table border="0" cellpadding="0" cellspacing="0"><tr>
                      
                    <td><input type="radio" name="optSite" value="1" /></td>                
                     <td><a href="javascript:jsShowDiv('SearchSite','arrow_down.gif','arrow_up.gif','optSite');" id="SearchSite">Specify site(s)<img src="images/arrow_down.gif" border="0" id="SearchSite_icon" /></a></td></tr></table>
                     </td></tr>
                    </table>
                    </td></tr>
                <tr><td></td>
                    <td>
                    <table border="0" cellpadding="0" cellspacing="0" id="SearchSite_settings" style="display:none">
                    <tr><td width="25"></td><td height="30" colspan="4">
                    Specify a site's URL: 
                    <input type="text" class="button" size="25" name="txtSearchSite" id="txtSearchSite" />
                    <input id="btnSearchSite" name="btnSearchSite" type="button" class="button" onClick="jsSearchSite('txtSearchSite')" value="Search" style="width:50px" /> 
                    </td></tr>
                    <tr><td width="25"></td><td>
                    <div id="Tree__treepanel" style="width:550; height:380;border :1px solid Silver;; overflow:auto;height:252px">Please wait...</div>
                    </td></tr>
                    </table>
                </tr><td>

				<tr><td colspan="2" height="4"></td></tr>
				<tr><td class="data1" valign="top">File name: </td>
                    <td class="data1"><input type="text" name="txtFileName" id="txtFileName" maxlength="255"></td></tr>
                <tr><td colspan="2" height="4"></td></tr>

				<tr><td class="data1" valign="top">Type: </td>
				    <td class="data1">
                    <select class="text" id="optReasons" name="optReasons">
                    </select></td></tr>
                <tr><td colspan="2" height="4"></td></tr>
        		<tr><td class="data1" valign="top">Sort by: </td>		
					<td><table border="0" cellspacing="0" cellpadding="0"><tr><td class="data1"><select class="text" id="optSort" name="optSort">
                    <!--
                        <option value="date_time">Date/Time</option>
                        <option value="file_name">Name</option>
                        <option value="quarantine_reason">Reason</option>
                        <option value="file_violator">Violator</option>
							<option value="filter_scan_time">Scan time</option>
							<option value="filter_rule">Reasons</option>
							<option value="msg_source">Sender</option>
							<option value="msg_destination">Recipient</option>
							<option value="msg_subject">Subject</option>
							<option value="file_original">Filename</option>
							<option value="storage_path_quarantine">Quarantine path</option>
							<option value="storage_resend_count">Resend status</option> 
                    -->
							</select></td>
						<td><input type=radio id="optSortType" name="optSortType" value="0" ></td><td>Ascending</td>
						<td><input type=radio id="optSortType" name="optSortType" value="1" checked="checked"></td><td>Descending</td></tr></table></td></tr>
				<tr><td class="data1">Display: </td>
					<td class="data1"><input type=text class="text" id="txtNumPerPage" name="txtNumPerPage" size="5" maxlength="3" value="15"/> per page</td></tr>
				</table></td></tr>
        </table>
		<!--||Button||-->
		<tr><td class="data1">
				<input type=button class="text" id="btnSearch" name="btnSearch" value="Search" onClick="jsSubmit();" disabled ></td></tr>
		<!--||Query Result||-->
        <tr><td>
        <div id="divResult" name="divResult" style="display:none;width:100%;">
        <iframe marginheight="0" marginwidth="0" id="ifmResult" name="ifmResult" src="$$QUERY_CGI_URL$$" frameBorder="0" width="100%" height="100%" onload="Javascript:SetCwinHeight(this)"></iframe>
        </div>
        </td></tr>
        <!--/Page Content-->
</table>

<div id="divCalendar" name="divCalendar" style="position:absolute;width:0;height:0;overflow:auto">
<iframe id="ifmCalendar" name="ifmCalendar" src="html/calendar-new.htm" frameBorder="0" style="width:0;height:0"></iframe>
</div>

<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"/>
</body>
</html>
