<html>
<head>
<title>##@TABLE.strCaption h##: ##message ADV_SEARCH##</title>
<link REL="stylesheet" href="include/style.css" type="text/css">
<!--[if IE]>
<link REL="stylesheet" href="include/styleIE.css" type="text/css">
<![endif]-->
<style>
#center_block {margin:0 auto;}
#contents_block {text-align:center;width:100%}
#header_block {white-space:nowrap;height:31px;padding-top:5px;}
#main_block {padding:10px 0;width:100%}
#inmain_block {margin:0 10px}
#fields_block {width:100%}
#buttons_block {width:100%;padding-bottom:5px}
#required_block {text-align:left;padding:5px}
#buttons_block > * {margin:0 2px}
</style>
<!--[if IE]>
<style>
#main_block {padding:10px 10;}
#inmain_block {margin:0 0px}
</style>
<![endif]-->
</head>
{$includes}
<body bgcolor=white>
{$header}
{BEGIN body}
	
{BEGIN contents_block}
<table align=center id="center_block" style="BORDER: #cccccc 1px solid;"><tr><td id="contents_block">
	
<div id="header_block" class=tableheader>
##@TABLE.strCaption h## - ##message ADVANCED_SEARCH##
</div>

{BEGIN conditions_block}
<DIV id=conditions_block>
<span class=fieldname>##message SEARCH_FOR##: </span>
<input type="radio" name="type" {$all_checkbox}>##message ALL_CONDITIONS##
&nbsp;&nbsp;&nbsp;
<input type="radio" name="type" {$any_checkbox}>##message ANY_CONDITION##
</div>
{END conditions_block}

<table cellpadding=4 cellspacing=0 border=0 id="fields_block">

##foreach Fields as @f filter @f.bAdvancedSearch && @f.strName=="MLS_Number" order @f.nAdvSearchPageOrder##		
<TR>
    <TD colSpan=10>&nbsp;</TD></TR>
  <TR>
    <TD colSpan=10>&nbsp;<STRONG><FONT face=Tahoma>Search by ##@f.strLabel h##</FONT></STRONG></TD></TR>		
  <tr class=shade>


	<td class=fieldname align=center colspan=10>##@f.strLabel h##:
	<input type="Hidden" name="asearchfield[]" value="##@f.strName h##">
	&nbsp;{$##@f.strName g##_editcontrol}
	&nbsp;
	<input type=button class=button name="SearchButton" value="##message SEARCH##"
	onClick="javascript:document.forms.editform.submit();"></td>
	<td align=center style="display:none"><input type=CheckBox name="not_##@f.strName g##" {$not_##@f.strName g##}></td>
	
	<td style="display:none"><SELECT ID="SearchOption" NAME="asearchopt_MLS_Number" SIZE=1><OPTION VALUE="Equals">Equals</option></SELECT>
	
	<td width=270 style="display:none"><span id="second_##@f.strName g##">
	{$##@f.strName g##_editcontrol1}
	</span></td>
	
</tr>
##endfor##
</table></td></tr></table>

<TABLE cellSpacing=1 cellPadding=4 width=750 align=center border=0>	
<tr><td><b><a href="#" id="handle1" onclick="toggle('1')">Hide</a></b>

&nbsp;&nbsp;&nbsp;<FONT face=Tahoma><STRONG>Search Criteria</STRONG></FONT>
</td></tr></table>

<div id="content1"> 

<table CELLPADDING=0 CELLSPACING=0 align='center' width='750' style="BORDER: #cccccc 1px solid;">
<tr valign=center>
<td width=100%>
<table width=100% cellpadding=3 cellspacing=1 border=0>
##foreach Fields as @f filter @f.bAdvancedSearch && (@f.strName=="Price" || @f.strName=="Sq_Ft" || @f.strName=="Bedrooms" || @f.strName=="Bathrooms" || @f.strName=="Year" || @f.strName=="Garage" || @f.strName=="sType" || @f.strName=="Style") order @f.nAdvSearchPageOrder##
  <tr class=shade>
	##if @f.strName=="Year"##
	<td class=fieldname>##@f.strLabel h##</td>
	<td width=100>{$searchtype_##@f.strName g##}</td>
	##else##
	<td colspan=2 class=fieldname width=200>##@f.strLabel h##</td>
	##endif##
	<td>
	<input type="Hidden" name="asearchfield[]" value="##@f.strName h##">
	{$##@f.strName g##_editcontrol}
	</td>
	##if @f.strName!="Year"##
		<td width=200><span id="second_##@f.strName g##">
		##if @f.strName=="Price" || @f.strName=="Sq_Ft"##
		<input type="Hidden" name="asearchopt_##@f.strName g##" value="Between">
		{$##@f.strName g##_editcontrol1}
		##else##
		<input type="Hidden" name="asearchopt_##@f.strName g##" value="Equals">
		<td width=200 style="display:none"><span id="second_##@f.strName g##">
		{$##@f.strName g##_editcontrol1}
		</span>
		##endif##
	##else##
		<td width=200 style="display:none"><span id="second_##@f.strName g##">
		{$##@f.strName g##_editcontrol1}
		</span><td>&nbsp;
	##endif##
	</span></td>
</tr>
##endfor##
</table>
</td></tr></table>
</div>

<TABLE cellSpacing=1 cellPadding=4 width=750 align=center border=0>	
<tr><td><b><a href="#" id="handle2" onclick="toggle('2')">Show</a></b>

&nbsp;&nbsp;&nbsp;<FONT face=Tahoma><STRONG>Search By Address</STRONG></FONT>
</td></tr></table>

<div id="content2" style="display:none"> 

<table CELLPADDING=0 CELLSPACING=0 align='center' width='750' style="BORDER: #cccccc 1px solid;">
<tr valign=center>
<td width=100%>
<table width=100% cellpadding=3 cellspacing=1 border=0>
##foreach Fields as @f filter @f.bAdvancedSearch && (@f.strName=="House_Number" || @f.strName=="Street_Name" || @f.strName=="Apartment/Unit" || @f.strName=="City" || @f.strName=="State" || @f.strName=="Zip" || @f.strName=="Country") order @f.nAdvSearchPageOrder##
  <tr class=shade>
	<td class=fieldname width=200>##@f.strLabel h##</td>
	<td>
	<input type="Hidden" name="asearchfield[]" value="##@f.strName h##">
	{$##@f.strName g##_editcontrol}
	<input type="Hidden" name="asearchopt_##@f.strName g##" value="Equals">
	</td>
	<td width=270 style="display:none"><span id="second_##@f.strName g##">
	{$##@f.strName g##_editcontrol1}
	</span></td>
</tr>
##endfor##
</table>
</td></tr></table>
</div>

<TABLE cellSpacing=1 cellPadding=4 width=750 align=center border=0>	
<tr><td><b><a href="#" id="handle3" onclick="toggle('3')">Show</a></b>

&nbsp;&nbsp;&nbsp;<FONT face=Tahoma><STRONG>Detailed Search</STRONG></FONT>
</td></tr></table>

<div id="content3" style="display:none"> 

<table CELLPADDING=0 CELLSPACING=0 align='center' width='750' style="BORDER: #cccccc 1px solid;">
<tr valign=center>
<td width=100%>
<table width=100% cellpadding=3 cellspacing=1 border=0>
##foreach Fields as @f filter @f.bAdvancedSearch && (@f.strName=="Kitchen" || @f.strName=="Living_Room" || @f.strName=="Family_Room" || @f.strName=="Rec_Room" || @f.strName=="Study_Room" || @f.strName=="Sun_Room" || @f.strName=="Loft" || @f.strName=="Dinning_Room" || 
@f.strName=="Amusement_Room" || @f.strName=="Foyer" || @f.strName=="Office" || @f.strName=="Den" || @f.strName=="Fireplaces" || @f.strName=="Acres" || @f.strName=="Range" || @f.strName=="Cooktop" || 
@f.strName=="Dishwasher" || @f.strName=="Disposal" || @f.strName=="Dryer" || @f.strName=="Exhaust_Fan/Hood" || @f.strName=="Fireplaces" || @f.strName=="Microwave" || @f.strName=="Refrigerator" || @f.strName=="Wall_Oven" || 
@f.strName=="Water_Softener" || @f.strName=="Eat_In_Kitchen" || @f.strName=="Kitchen/Dining_Room" || @f.strName=="Separate/Formal_Dining_Room" || @f.strName=="Basement" || @f.strName=="Finished_Basement" || @f.strName=="Drain_Tiled" || @f.strName=="Sum_Pump" || @f.strName=="Walkout" || @f.strName=="Daylight/Lookout_Windows") order @f.nAdvSearchPageOrder##
  <tr class=shade>
	##if @f.strName=="Acres"##
	<td class=fieldname>##@f.strLabel h##</td>
	<td width=100>{$searchtype_##@f.strName g##}</td>
	##else##
	<td colspan=2 class=fieldname width=200>##@f.strLabel h##</td>
	##endif##
	<td>
	<input type="Hidden" name="asearchfield[]" value="##@f.strName h##">
	{$##@f.strName g##_editcontrol}
	</td>
	##if @f.strName!="Acres"##
		<td width=200><span id="second_##@f.strName g##">
		<input type="Hidden" name="asearchopt_##@f.strName g##" value="Equals">
	##else##
		<td>&nbsp;
	##endif##
		<span id="second_##@f.strName g##">
		{$##@f.strName g##_editcontrol1}
		</span>
	</span></td>
</tr>
##endfor##


##foreach Fields as @f filter @f.bAdvancedSearch && 1=2 order @f.nAdvSearchPageOrder##		
{BEGIN ##@f.strName g##_fieldblock}	
<tr class=shade>
	<td class=fieldname>##@f.strLabel h##
	<td align=center><input type=checkbox {$##@f.strName g##_notbox}></td>
	<td>{$searchtype_##@f.strName g##}</td>
	<td width=270>{$##@f.strName g##_editcontrol}</td>
    <td width=270><span id="second_##@f.strName g##">
	{$##@f.strName g##_editcontrol1}
	</span></td>
</tr>
{END ##@f.strName g##_fieldblock}	
##endfor##
</table>

<div class="blackshade" id="buttons_block" align=center>
<div id="required_block" align=left><img src="images/icon_required.gif"> - ##message REQUIRED_FIELD##</div>
 {BEGIN search_button}
 <span class=buttonborder><input class=button type=button value="##message SEARCH##" {$searchbutton_attrs}></span>
{END search_button} 
{BEGIN reset_button}
 <span class=buttonborder><input class=button type=button value="##message RESET##" {$resetbutton_attrs}></span>
{END reset_button}
{BEGIN back_button}
 <span class=buttonborder><input class=button type=button value="##message BACK_TO_LIST##" {$backbutton_attrs}></span>
{END back_button}
</div>
</td></tr></table>
{END contents_block}
{END body}
{$footer}

</body>
</html>
