<html>
||include||meta.tpl||
<head>
<link rel="stylesheet" type="text/css" href="||nwimg||||tpl_color||/surge.css" />
<script type="text/javascript">
<!--
||ifequal||_item_window||true||
var iw=true;
||else||
var iw=false;
||endif||
function getUID(){
	var now = new Date();
	var rnd = Math.random() + "";
	rnd = rnd.substring(0, rnd.indexOf('.')) + rnd.substring(rnd.indexOf('.')+1,rnd.length);
	return now.getMilliseconds() + "_" + rnd;
}
function SI(i){
	if (iw){
		if(document.all) {
			innerWidth = document.body.offsetWidth;
		}
		if(innerWidth > 800){
			var width=850;
			var height=550;
			var left=80;
			var top=60;
		}
		else{
			var width=788;
			var height=480;
			var left=0;
			var top=10;
		}
		var str = "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,status=0,menubar=yes,scrollbars=yes,resizable=1,left=" + left + ",top=" + top;
		var winname = "item_" + getUID();
		var url = act+"item-"+i+ut+"&_item_window=true&require_lock=true&java_email=true";
		var win = open(url, winname, str, 'POPUP');
		if (win.opener == null) win.opener = self;
		win.focus();
	}
	else
		G2("item-"+i+"&require_lock=true&java_email=true")
}
-->
</script>
<script type="text/javascript" src="||common_files||/util.js"></script>
<script type="text/javascript" src="||nwimg||/layout.js"></script>
<title>||cust_title|| - ||lang_str||Search||</title>
</head>
<body class="body" onload="doresize();" onresize="doresize()">

||include||_layout_start.tpl||

||ifdef||error||
	||include||_errorinline.tpl||
||endif||
||ifdef||msg||
	||include||_msginline.tpl||
||endif||

||ifequal||connection_type||mpop||
	||define||connection_type||pop||
||endif||

<form method="post" action="||action||">
<input type="hidden" name="utoken" value="||utoken||" />
<input type="hidden" name="cmd" value="" />
<input type="hidden" name="force_connection" value="true" />
<br />
<center>
<DIV class="LF b">||lang_str||Find an email||</DIV><P>
<TABLE width="60%">
<TR>
	<TD>
		<TABLE class="bg1" cellspacing="3">
		<TR>
			<TD COLSPAN="2" class="c LF b">||lang_str||Step 1. Enter your search criteria||</TD>
		</TR>
		<TR>
			<TD class="LF" valign="top">||lang_str||From||: </TD>
			<TD><INPUT TYPE="Text" NAME="search_from" value="||html_text||search_from||" SIZE="30"><BR>
			||lang_str||Eg. xxx@yyy.com or just a name||</TD>
		</TR>
		<TR>
			<TD class="LF" valign="top">||lang_str||To||: </TD>
			<TD><INPUT TYPE="Text" NAME="search_to" value="||html_text||search_to||" SIZE="30"><BR>
			||lang_str||Eg. One of your email addresses||</TD>
		</TR>
		<TR>
			<TD class="LF" valign="top">||lang_str||Subject||: </TD>
			<TD><INPUT TYPE="Text" NAME="search_subject" value="||html_text||search_subject||" SIZE="30"><BR>
			||lang_str||Eg. The sales document||</TD>
		</TR>
		<TR>
			<TD nowrap class="LF" valign="top">||lang_str||Message body||: </TD>
			<TD><INPUT TYPE="Text" NAME="search_body" value="||html_text||search_body||" SIZE="30"><BR>
			||lang_str||Eg. Any important keywords|| <BR>
			||ifnequal||connection_type||pop||
				<input type="checkbox" name="imap_search_whole_body" value="on" checked>
				||lang_str||Search for the entire sentence you have entered in Message Body or the individual words||.
				||lang_str||Eg. When ticked it will search for 'test message'. When unticked it will search for	'test' and 'message'.||
			||endif||
			</TD>
		</TR>
		||ifequal||connection_type||pop||
			<TR>
				<TD nowrap class="LF">||lang_str||Max Search Size||: </TD>
				<TD><select name="search_body_size" size="1">
					<option value="0">||lang_str||All||</option>
					<option value="1">1k</option>
					<option value="2">2k</option>
					<option value="4" selected="selected">4k</option>
					<option value="8">8k</option>
					<option value="16">16k</option>
					<option value="32">32k</option>
				</select></TD>
			</TR>
		||endif||
		||ifdef||display_charset||true||
			<TR><TD COLSPAN="2" HEIGHT="10"> </TD></TR>
			<TR>
				<TD class="LF">||lang_str||Character set||: </TD>
				<TD><select name="charset">
					<option value="US-ASCII">US-ASCII (Default)</option>
					<option value="UTF-8">UTF-8</option>
					<option value="BIG5">BIG5</option>
					<option value="iso-2022-jp">iso-2022-jp</option>
				</select></TD>
			</TR>
		||else||
			<input type="hidden" name="charset" value="US-ASCII" />
		||endif||
		</TABLE>
	</TD>
	<TD>
		<TABLE class="bg1">
		<TR><TD class="c LF b">||lang_str||Step 2. Select the folders to search||</TD></TR>
		<TR>
			<TD class="c"><SELECT NAME="multi_sel_fld" SIZE="6" multiple="multiple">
				||begin_fld_short||
					<option value="||fld_name||">||lang||fld_name||</option>
				||end_fld_short||
			</SELECT></TD>
		</TR>
		<TR><TD HEIGHT="10"> </TD></TR>
		<TR><TD class="c"><INPUT TYPE="Submit" class="btn" name="dosearch" VALUE="||lang_str||Search for emails||"></TD></TR>
		</TABLE>
	</TD>
</TR>
</TABLE>
</form>
<P>
<table class="LT" border="0" cellspacing="0" width="95%">
<TR class="bg1">
	<th>||lang_str||Folder||</th>
	<th>||lang_str||Attach||</th>
	<th>||lang_str||From||</th>
	<th>||lang_str||Subject||</th>
	<th>||lang_str||Date||</th>
	<th>||lang_str||Time||</th>
	<th>||lang_str||Size||</th>
</TR>
||define||color||1||
||begin_search||
||ifequal||h_priority||urgent|| ||ifequal||h_isread||0|| ||define||cls||(class="red b" )|| ||else|| ||define||cls||(class="red" )|| ||endif|| ||else|| ||ifequal||h_isread||0|| ||define||cls||(class="b" )|| ||else|| ||undef||cls|| ||endif|| ||endif||
	<TR class="L||color||" nowrap>
		||ifequal||color||1||
			||define||color||0||
		||else||
			||define||color||1||
		||endif||
		<TD><a href="javascript:G2('list&force_connection=true&fld=||encode_text||h_folder||&encode_text=fld')">||lang||h_folder||</a></TD>
		<td>||h_attach||</TD>
		<td><a ||cls||href="javascript:SI('||h_uidl||&fld=||encode_text||h_folder||&encode_text=fld')">||lchop||h_from_personal||40||</a></TD>
		<td><a ||cls||href="javascript:SI('||h_uidl||&fld=||encode_text||h_folder||&encode_text=fld')">||lchop||h_subject||70||</a></TD>
		<td>||h_date_day||</TD>
		<td>||h_date_time||</TD>
		<td>||h_kbytes||k</TD>
	</TR>
||end_search||
</TABLE>
</center>
</body>
</html>
