// JavaScript Document
	//var siteurl="http://artemis.instanthosting.com.au/~der15796/RealEstateTalk";//FOR SITE
		//var siteurl="http://192.168.0.191/Derwent_Realty/team";//FOR LOCAL
	
	
	function disp(mode,number)
	{
		//alert("dd");
		document.getElementById("blog_content").style.display = 'none';
		//document.getElementById("blog_details").style.display = 'none';
		document.getElementById("ads_content").style.display = '';
		document.getElementById("ads_content").innerHTML = getstring(mode,number);
		getDetails(mode,number,0,'id');
	}
	
	function getSort(mode,si)
	{
		//alert(mode);
		//alert(document.getElementById("sortType").value);
		getDetails(mode,si,0,document.getElementById("sortType").value)
	}
	function getDetails(type,sublink,startNumber,sortType)//FOR QUICK SEARCH
	{ 		
		//var siteurl="http://192.168.0.191/Derwent_Realty/team";//FOR LOCAL
		//alert(type);
		var XMLHttpreqobj1004 = false;
		if(window.XMLHttpRequest)
		{
			 XMLHttpreqobj1004 = new XMLHttpRequest();
			 if(XMLHttpreqobj1004.overrideMimeType)
			 {
					XMLHttpreqobj1004.overrideMimeType("text/xml");
			 }
		}
		else if (window.ActiveXObject)
		{
			XMLHttpreqobj1004 = new ActiveXObject("Microsoft.XMLHTTP");
		}
			if (XMLHttpreqobj1004)
			{
				//alert(siteurl+"/"+ads_details.php);
				XMLHttpreqobj1004.open("POST",siteurl+"/ads_details.php");
				XMLHttpreqobj1004.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
				XMLHttpreqobj1004.onreadystatechange = function()
				{
					//alert(XMLHttpreqobj1004.readyState+"-"+XMLHttpreqobj1004.status);
					if(XMLHttpreqobj1004.readyState == 4 && XMLHttpreqobj1004.status == 200)
					{
						//alert(XMLHttpreqobj1004.responseText);
						document.getElementById("srchResults").innerHTML=XMLHttpreqobj1004.responseText;	
						document.getElementById("blog_content").style.display 	='none';
				document.getElementById("wishlist_div").style.display 	='none';
				document.getElementById("showmap_div").style.display	='none';
				location.href="#topp";
					}
					else
					{
						document.getElementById("srchResults").innerHTML ='<div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="90" height="40"><param name="movie" value="images/loading2.swf" /><param name="quality" value="high" /><embed src="images/loading2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="90" height="40"></embed></object></div>';
					location.href="#topp";
					}
				}
				XMLHttpreqobj1004.send('type='+type+"&sub="+sublink+"&start="+startNumber+"&sortType="+sortType);//send datas
		  }
	}
	function selectResType()
	{
		if(document.getElementById("res").checked==0)
		{
			document.getElementById("resHouse").checked=0;
			document.getElementById("resUnit").checked=0;
			document.getElementById("resApt").checked=0;
			document.getElementById("resVilla").checked=0;
			document.getElementById("resFlat").checked=0;
			document.getElementById("resStdo").checked=0;
			document.getElementById("resTwnh").checked=0;
			document.getElementById("resCtApt").checked=0;
			document.getElementById("resWare").checked=0;
		}
		else
		{
			document.getElementById("resHouse").checked=1;
			document.getElementById("resUnit").checked=1;
			document.getElementById("resApt").checked=1;
			document.getElementById("resVilla").checked=1;
			document.getElementById("resFlat").checked=1;
			document.getElementById("resStdo").checked=1;
			document.getElementById("resTwnh").checked=1;
			document.getElementById("resCtApt").checked=1;
			document.getElementById("resWare").checked=1;
		}
	}
	
	function selectLandType()
	{
		if(document.getElementById("lan").checked==0)
		{
			document.getElementById("lndDiary").checked=0;
			document.getElementById("lndHort").checked=0;
			document.getElementById("lndCrop").checked=0;
			document.getElementById("lndFarmlt").checked=0;
			document.getElementById("lndLivstk").checked=0;
			document.getElementById("lndOther").checked=0;
		}
		else
		{
			document.getElementById("lndDiary").checked=1;
			document.getElementById("lndHort").checked=1;
			document.getElementById("lndCrop").checked=1;
			document.getElementById("lndFarmlt").checked=1;
			document.getElementById("lndLivstk").checked=1;
			document.getElementById("lndOther").checked=1;		
		}
	}
	function selectCommType()
	{
		if(document.getElementById("comm").checked==0)
		{
			document.getElementById("comDevl").checked=0;
			document.getElementById("commcal").checked=0;
			document.getElementById("commRtail").checked=0;
			document.getElementById("commOther").checked=0;
			document.getElementById("commOffcl").checked=0;
			document.getElementById("commInvst").checked=0;
			document.getElementById("commShowrm").checked=0;
			document.getElementById("commInd").checked=0;
		}
		else
		{
			document.getElementById("comDevl").checked=1;
			document.getElementById("commcal").checked=1;
			document.getElementById("commRtail").checked=1;
			document.getElementById("commOther").checked=1;
			document.getElementById("commOffcl").checked=1;
			document.getElementById("commInvst").checked=1;		
			document.getElementById("commShowrm").checked=1;
			document.getElementById("commInd").checked=1;		
		}
	}
	function deSelect(tId,pId)
	{
		if(!document.getElementById(pId).checked && document.getElementById(tId).checked)
			document.getElementById(tId).checked=0;
	}
	
	function generateString(property_mode)
	{
			
			
			var where  ="";
			var property_tye ="";
			if(document.getElementById("resHouse").checked==1)
			{
					var property_tye ="property_tye='House'";
			}
			if(document.getElementById("resUnit").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Unit'";
				else
					property_tye ="property_tye='Unit'";
			}
			if(document.getElementById("resApt").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Apartment'";
				else
					property_tye ="property_tye='Apartment'";
			}
			if(document.getElementById("resVilla").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Villa'";
				else
					property_tye ="property_tye='Villa'";
			}
			if(document.getElementById("resFlat").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Flat'";
				else
					property_tye ="property_tye='Flat'";
			}
			if(document.getElementById("resStdo").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Studio'";
				else
					property_tye ="property_tye='Studio'";
			}
			if(document.getElementById("resTwnh").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Townhouse'";
				else
					property_tye ="property_tye='Townhouse'";
			}
			
			if(document.getElementById("resCtApt").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='City Apartment'";
				else
					property_tye ="property_tye='City Apartment'";
			}
			if(document.getElementById("resWare").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Warehouse'";
				else
					property_tye ="property_tye='Warehouse'";
			}				
			if(document.getElementById("lndDiary").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Dairy'";
				else
					property_tye ="property_tye='Dairy'";
			}
			if(document.getElementById("lndHort").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Horticulture'";
				else
					property_tye ="property_tye='Horticulture'";
			}
			if(document.getElementById("lndCrop").checked==1)
			{
				if(property_tye!="")
				  property_tye =property_tye+" OR property_tye='Cropping'";
				else
				  property_tye ="property_tye='Cropping'";
			}
			if(document.getElementById("lndFarmlt").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Farmlet'";
				else
					property_tye ="property_tye='Farmlet'";
			}
			if(document.getElementById("lndLivstk").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Livestock'";
				else
					property_tye ="property_tye='Livestock'";
			}
			if(document.getElementById("lndOther").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Other'";
				else
					property_tye ="property_tye='Other'";
			}		
					//if(property_tye!="")
					//property_tye = "type='Land' AND ("+property_tye+")";	
			if(document.getElementById("comDevl").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Development'";
				else
					property_tye ="property_tye='Development'";
			}
			if(document.getElementById("commcal").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Commercial'";
				else
					property_tye ="property_tye='Commercial'";
			}
			if(document.getElementById("commRtail").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Retail'";
				else
					property_tye ="property_tye='Retail'";
			}
			/*if(document.getElementById("commOther").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Other'";
				else
					property_tye ="property_tye='Other'";
			}*/
			if(document.getElementById("commOffcl").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Offices'";
				else
					property_tye ="property_tye='Offices'";
			}
			if(document.getElementById("commInvst").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Investment'";
				else
					property_tye ="property_tye='Investment'";
			}			
			
			if(document.getElementById("commShowrm").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Showroom'";
				else
					property_tye ="property_tye='Showroom'";
			}
			
			if(document.getElementById("commInd").checked==1)
			{
				if(property_tye!="")
					property_tye =property_tye+" OR property_tye='Industrial'";
				else
					property_tye ="property_tye='Industrial'";
			}				
			var type="";
			
			if(document.getElementById("res").checked==1 && document.getElementById("lan").checked==1 && document.getElementById("comm").checked==1 )
			property_tye='';
			if(document.getElementById("res").checked==1)
			{
				if(type!="")
					type =type+" AND type='Resisential'";
				else
					type ="type='Resisential'";
			}
			if(document.getElementById("lan").checked==1)
			{
				if(type!="")
					type =type+" AND type='Land'";
				else
					type ="type='Land'";
			}
			if(document.getElementById("comm").checked==1)
			{
				if(type!="")
					type =type+" AND type='Commercial'";
				else
					type ="type='Commercial'";
			}				
			var adprice="";
			if(document.getElementById("minPrice").value!=0 && document.getElementById("maxPrice").value!=0)
			{
				adprice ="price BETWEEN "+document.getElementById("minPrice").value +" AND "+document.getElementById("maxPrice").value;
				
			}
			else if(document.getElementById("minPrice").value==0)
			{
				adprice="price<"+document.getElementById("maxPrice").value;
			}
			else if(document.getElementById("maxPrice").value==0)
			{
				adprice="price>"+document.getElementById("minPrice").value;
			}
			if(document.getElementById("minPrice").value==0 && document.getElementById("maxPrice").value==0)
			adprice="";
			
			var list;
			if(document.getElementById("listAll").checked)
				list = "";
			else if(document.getElementById("list7").checked)	
				list =document.getElementById("list7").value; 
			else if(document.getElementById("list30").checked)	
				list =document.getElementById("list30").value; 
				
			where ='property_tye='+property_tye+'&adprice='+adprice+'&list='+list+"&adtype="+type+"&type="+property_mode;
			//alert(where);
			
			
			
			
			
			var XMLHttpreqobj1004 = false;
		if(window.XMLHttpRequest)
		{
			 XMLHttpreqobj1004 = new XMLHttpRequest();
			 if(XMLHttpreqobj1004.overrideMimeType)
			 {
					XMLHttpreqobj1004.overrideMimeType("text/xml");
			 }
		}
		else if (window.ActiveXObject)
		{
			XMLHttpreqobj1004 = new ActiveXObject("Microsoft.XMLHTTP");
		}
			if (XMLHttpreqobj1004)
			{
				XMLHttpreqobj1004.open("POST",siteurl+"/ads_details.php");
				XMLHttpreqobj1004.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
				XMLHttpreqobj1004.onreadystatechange = function()
				{
					
					if(XMLHttpreqobj1004.readyState == 4 && XMLHttpreqobj1004.status == 200)
					{
						//alert(property_mode);
						//alert(XMLHttpreqobj1004.responseText);
						document.getElementById("rescontent").style.display='none';
						document.getElementById("srchResults").innerHTML=XMLHttpreqobj1004.responseText;
						document.getElementById("blog_content").style.display 	='none';
						document.getElementById("wishlist_div").style.display 	='none';
						document.getElementById("showmap_div").style.display	='none';
					}
					else
					{
						document.getElementById("srchResults").innerHTML ='<div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="90" height="40"><param name="movie" value="images/loading2.swf" /><param name="quality" value="high" /><embed src="images/loading2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="90" height="40"></embed></object></div>';
					}
				}
				XMLHttpreqobj1004.send(where);//send datas
		  }
			
	}


function quickSearch()
{
	//alert("hi");
	var where = "";
	//where =document.getElementById("mode").value+"^j_%_C_*_k^"+document.getElementById("suburb").value+"^j_%_C_*_k^"+document.getElementById("type").value+"^j_%_C_*_k^"+document.getElementById("pricefrom").value+"^j_%_C_*_k^"+document.getElementById("priceto").value;
	
		var adPrice="";
		if(document.getElementById("pricefrom").value!=0 && document.getElementById("priceto").value!=0)
		{
			adPrice ="price BETWEEN "+document.getElementById("pricefrom").value +" AND "+document.getElementById("priceto").value;
			
		}
		else if(document.getElementById("pricefrom").value==0)
		{
			adPrice="price>"+document.getElementById("priceto").value;
		}
		else if(document.getElementById("priceto").value==0)
		{
			adPrice="price<"+document.getElementById("pricefrom").value;
		}
		if(document.getElementById("pricefrom").value==0 && document.getElementById("priceto").value==0)
		adPrice="";
		//alert(document.getElementById("suburb").value);		
		var where='mode=' 				+document.getElementById("mode").value
		+'&suburb='			 	 		+document.getElementById("suburb").value
		+'&ad_type='				  	+document.getElementById("ad_type").value
		+'&adPrice='			  		+adPrice;
		//alert(where);
		document.getElementById("ads_content").style.display = '';
		document.getElementById("ads_content").innerHTML = getstring(document.getElementById("mode").value,9);
		
	if(window.XMLHttpRequest)
	{
		XMLHttpreqobj2001 = new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		XMLHttpreqobj2001 = new ActiveXObject("Microsoft.XMLHTTP");
	}
	if (XMLHttpreqobj2001)
	{
		XMLHttpreqobj2001.open("POST",siteurl+"/ads_details.php",true);
		XMLHttpreqobj2001.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 
		XMLHttpreqobj2001.onreadystatechange = function()
		{
			//alert(XMLHttpreqobj2001.readyState +"b"+XMLHttpreqobj2001.status);
			if (XMLHttpreqobj2001.readyState == 4 && XMLHttpreqobj2001.status == 200)
			{
				//alert(XMLHttpreqobj2001.responseText);
				
				document.getElementById("srchResults").innerHTML 		= XMLHttpreqobj2001.responseText;		
				document.getElementById("blog_content").style.display 	='none';
				document.getElementById("wishlist_div").style.display 	='none';
				document.getElementById("showmap_div").style.display	='none';
			}
			else
			{
				document.getElementById("srchResults").innerHTML ='<div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="90" height="40"><param name="movie" value="images/loading2.swf" /><param name="quality" value="high" /><embed src="images/loading2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="90" height="40"></embed></object></div>'; 
				//location.href="#ok";
			}
		}
		XMLHttpreqobj2001.send(where);
	}		//}//STR == NULL
			
}

	function getstring(type,subb)
	{
		if(type=="Sale")
			typetitle="Property for&nbsp;Sale";
		else if(type=="Rental")
			typetitle="Property for&nbsp;Rent";
		else
			typetitle="Property Details";
		//subb=$_GET['sub'];
		var heading;
		if(subb=="")
			heading  ="";
		else if(subb==1)		
			heading  ="-&nbsp;Residential";	
		else if(subb==2)		
			heading  ="-&nbsp;Land";	
		else if(subb==3)		
			heading  ="-&nbsp;Commercial";	
		else if(subb==4)		
			heading  ="-&nbsp;Open Houses";	
		else if(subb==5)		
			heading  ="-&nbsp;Rural Residential";	
		else if(subb==6)		
			heading  ="-&nbsp;Historic Homes";	
		else if(subb==7)		
			heading  ="-&nbsp;Rural Land up to 100 Acres";	
		else if(subb==8)		
			heading  ="-&nbsp;Rural Land + 100 Acres";
		else if(subb==0)		
			heading  ="";
		else if(subb==9)		
			heading  =" Search Results";
	
	var siteurlBlog="http://www.derwentrealestate.com.au/RealEstateTalk";//FOR SITE
		//var siteurlBlog="http://192.168.0.191/Derwent_Realty/team";//FOR LOCAL
 str='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
    str= str + '<td height="100" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td align="left"><h1>';
		 str = str + typetitle +'&nbsp;<span class="subhead">';
		 str = str + heading +'</span></h1></td>';
      str = str + '</tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%"><a name="top">&nbsp;</a></td>';
             str = str +'<td width="98%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="forboxtophead" height="30" onClick="javascript:resize_refine();" align="left"><span class="head3">Refine Property Search</span></td>';
               str = str +'</tr><tr><td height="5" valign="top"><div id="refine_contents" style="display:none;"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"><tr><td class="forborders"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
 str = str +'<td colspan="3" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%" height="149">&nbsp;</td>';
 str = str +'<td width="32%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td height="13" ></td></tr><tr><td height="33" class="propheads" ><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="13%"><div align="center"><input type="checkbox" name="res"  id="res" value="res" onclick="selectResType()"/></div></td><td width="87%" height="26" align="left"><span class="listh1">Residential</span></td>';
str = str +'</tr></table></td></tr><tr><td height="90" valign="top" class="forcategorybox"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%"></td>';
str = str +'<td width="9%"><input class="forcheckbox" type="checkbox" name="resHouse" value="resHouse" id="resHouse" onclick=\'deSelect("res","resHouse")\'/></td>';
str = str +'<td width="20%"><span class="searchopt">&nbsp;House</span></td><td width="1%">&nbsp;</td>';
str = str +'<td width="9%"><input class="forcheckbox" type="checkbox" name="resUnit" value="resUnit" id="resUnit" onclick=\'deSelect("res","resUnit")\'/></td>';
str = str +'<td width="19%"><span class="searchopt">&nbsp;Unit</span></td><td width="9%"><input class="forcheckbox" type="checkbox" name="resApt" value="resApt" id="resApt" onclick=\'deSelect("res","resApt")\'/></td>';
str = str +'<td width="32%"><span class="searchopt">Apartment</span></td></tr></table></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="1%"></td><td width="9%"><input class="forcheckbox" type="checkbox" name="resVilla" value="resVilla" id="resVilla" onclick=\'deSelect("res","resVilla")\'/></td>';
str = str +'<td width="20%"><span class="searchopt">&nbsp;Villa</span></td><td width="1%">&nbsp;</td>';
str = str +'<td width="9%"><input class="forcheckbox" type="checkbox" name="resFlat" value="resFlat" id="resFlat" onclick=\'deSelect("res","resFlat")\'/></td>';
str = str +'<td width="19%"><span class="searchopt">&nbsp;Flat</span></td><td width="9%"><input class="forcheckbox" type="checkbox" name="resStdo" value="resStdo" id="resStdo" onclick=\'deSelect("res","resStdo")\'/></td>';
str = str +'<td width="32%"><span class="searchopt">&nbsp;Studio</span></td></tr></table></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="1%"></td><td width="9%"><input class="forcheckbox" type="checkbox" name="resTwnh" value="resTwnh" id="resTwnh" onclick=\'deSelect("res","resTwnh")\'/></td>';
str = str +'<td width="33%"><span class="searchopt">&nbsp;Townhouse</span></td><td width="2%">&nbsp;</td><td width="9%"><input class="forcheckbox" type="checkbox" name="resCtApt" value="resCtApt" id="resCtApt" onclick=\'deSelect("res","resCtApt")\'/></td>';
str = str +'<td width="46%"><span class="searchopt">&nbsp;City Apartment</span><span class="searchopt">&nbsp;</span></td></tr></table></td></tr><tr>';
str = str +'<td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="1%"></td><td width="9%"><input class="forcheckbox" type="checkbox" name="resWare" value="resWare" id="resWare" onclick=\'deSelect("res","resWare")\'/></td>';
str = str +'<td width="33%"><span class="searchopt">&nbsp;Warehouse</span></td><td width="2%">&nbsp;</td><td><span class="searchopt">&nbsp; </span></td></tr></table></td>';
str = str +'</tr></table></td></tr><tr><td height="6" valign="top"><img src='+siteurlBlog+'/images/derwent_realestate_australia_cbtm.jpg " width="216" height="6" alt="derwent realestate australia"/></td></tr></table></td><td width="34%" valign="top"><div align="center">';
str = str +'<table width="90%" border="0" cellspacing="0" cellpadding="0"><tr><td height="13" ></td></tr><tr><td height="33" class="propheads" ><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="13%"><div align="center"><input type="checkbox" name="lan" id="lan" value="lan" onclick="selectLandType()"/></div></td><td width="87%" height="26"><div align="left"><span class="listh1">Land</span></div></td>';
str = str +'</tr></table></td></tr><tr><td height="89" valign="top" class="forcategorybox"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="1%"></td><td width="9%"><input class="forcheckbox" type="checkbox" name="lndDiary" value="lndDiary" id="lndDiary" onclick=\'deSelect("lan","lndDiary")\'/></td>';
str = str +'<td width="20%"><span class="searchopt">&nbsp;Dairy</span></td><td width="1%">&nbsp;</td><td width="9%"><input class="forcheckbox" type="checkbox" name="lndHort" value="lndHort" id="lndHort" onclick=\'deSelect("lan","lndHort")\'/></td>';
str = str +'<td width="19%"><span class="searchopt">&nbsp;Horticulture</span></td><td width="9%"><input class="forcheckbox" type="checkbox" name="lndCrop" value="lndCrop" id="lndCrop" onclick=\'deSelect("lan","lndCrop")\'/></td>';
str = str +'<td width="32%"><span class="searchopt">Cropping</span></td></tr></table></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>';
str = str +'<td width="1%"></td><td width="9%"><input class="forcheckbox" type="checkbox" name="lndFarmlt" value="lndFarmlt" id="lndFarmlt" onclick=\'deSelect("lan","lndFarmlt")\'/></td>';
str = str +'<td width="20%"><span class="searchopt">&nbsp;Farmlet</span></td><td width="1%">&nbsp;</td><td width="9%"><input class="forcheckbox" type="checkbox" name="lndLivstk" value="lndLivstk" id="lndLivstk" onclick=\'deSelect("lan","lndLivstk")\'/></td>';
str = str +'<td width="19%"><span class="searchopt">&nbsp;Livestock</span></td><td width="9%"><input class="forcheckbox" type="checkbox" name="lndOther" value="lndOther" id="lndOther" onclick=\'deSelect("lan","lndOther")\'/></td>';
str = str +'<td width="32%"><span class="searchopt">&nbsp;Other</span></td></tr></table></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="1%"></td><td width="9%">&nbsp;</td><td width="30%"><span class="searchopt">&nbsp;</span></td><td width="2%">&nbsp;</td><td width="9%">&nbsp;</td>';
str = str +'<td width="44%"><span class="searchopt">&nbsp;</span></td><td width="5%">&nbsp;</td></tr></table></td></tr><tr><td>&nbsp;</td></tr></table></td></tr><tr><td valign="top"><img src='+siteurlBlog+'/images/derwent_realestate_australia_cbtm.jpg " width="216" height="6" alt="derwent realestate australia"/></td>';
str = str +'</tr></table></div></td><td width="33%" valign="top"><table width="90%" border="0" cellspacing="0" cellpadding="0"><tr><td height="13" ></td></tr><tr><td height="33" class="propheads" ><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="13%"><div align="center"><input type="checkbox" name="comm" id="comm" value="comm" onclick="selectCommType()"/></div></td><td width="87%" height="26" align="left"><span class="listh1">Commercial</span></td></tr>';
str = str +'</table></td></tr><tr><td height="90" valign="top" class="forcategorybox"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="1%"></td><td width="7%"><input class="forcheckbox" type="checkbox" name="comDevl" value="comDevl" id="comDevl" onclick=\'deSelect("comm","comDevl")\'/></td>';
str = str +'<td width="33%"><span class="searchopt">&nbsp;Development</span></td><td width="2%">&nbsp;</td><td width="8%"><input class="forcheckbox" type="checkbox" name="commOffcl" value="commOffcl" id="commOffcl" onclick=\'deSelect("comm","commOffcl")\'/></td>';
str = str +'<td width="49%"><span class="searchopt">&nbsp;Offices</span><span class="searchopt">&nbsp;</span></td></tr></table></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="1%"></td><td width="9%"><input class="forcheckbox" type="checkbox" name="commRtail" value="commRtail" id="commRtail" onclick=\'deSelect("comm","commRtail")\'/></td>';
str = str +'<td width="20%"><span class="searchopt">&nbsp;Retail</span></td><td width="2%">&nbsp;</td><td width="9%"><input class="forcheckbox" type="checkbox" name="commOther" value="commOther" id="commOther" onclick=\'deSelect("comm","commOther")\'/></td>';
str = str +'<td width="19%"><span class="searchopt">&nbsp;Other</span></td><td width="7%"><input class="forcheckbox" type="checkbox" name="commcal" value="commcal" id="commcal" onclick=\'deSelect("comm","commcal")\'/></td>';
str = str +'<td width="33%"><span class="searchopt">Commercial</span></td></tr></table></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="1%"></td><td width="9%"><input class="forcheckbox" type="checkbox" name="commInvst" value="commInvst" id="commInvst" onclick=\'deSelect("comm","commInvst")\'/></td>';
str = str +'<td width="30%"><span class="searchopt">&nbsp;Investment</span></td><td width="2%">&nbsp;</td><td width="9%"><input class="forcheckbox" type="checkbox" name="commShowrm" value="commShowrm" id="commShowrm" onclick=\'deSelect("comm","commShowrm")\'/></td>';
str = str +'<td width="44%"><span class="searchopt">&nbsp;Showroom</span></td><td width="5%">&nbsp;</td></tr></table></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="1%"></td><td width="9%"><input class="forcheckbox" type="checkbox" name="commInd" value="commInd" id="commInd" onclick=\'deSelect("comm","commInd")\'/></td>';
str = str +'<td width="30%"><span class="searchopt">&nbsp;Industrial</span></td><td width="2%">&nbsp;</td><td width="9%">&nbsp;</td><td width="44%"><span class="searchopt">&nbsp;</span></td>';
str = str +'<td width="5%">&nbsp;</td></tr></table></td></tr></table></td></tr><tr><td valign="top"><img src='+siteurlBlog+'/images/derwent_realestate_australia_cbtm.jpg " width="216" height="6" alt="derwent realestate australia"/></td></tr>';
str = str +'</table></td></tr></table></td></tr><tr><td width="1%">&nbsp;</td><td width="98%"><table  width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="2%" height="71" valign="top">&nbsp;</td>';
str = str +'<td width="97%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class="forbottomline"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="12%"><span class="listh1">Min price</span></td><td width="20%"><select class="forlistbx"   name="minPrice" id="minPrice"><option value="0" selected="selected">---Price From---</option>';
str = str +'<option value="500">0.5K</option><option value="1000">1K</option><option value="2000">2K</option><option value="3000">3K</option><option value="4000">4K</option><option value="5000">5K</option><option value="10000">10K</option><option value="20000">20K</option><option value="30000">30K</option><option value="40000">40K</option><option value="50000">50K</option><option value="100000">100K</option><option value="150000">150K</option><option value="200000">200K</option><option value="250000">250K</option>';
str = str +'<option value="300000">300K</option><option value="350000">350K</option><option value="400000">400K</option><option value="450000">450K</option><option value="500000">500K</option>';
str = str +'<option value="550000">550K</option><option value="600000">600K</option><option value="650000">650K</option><option value="700000">700K</option><option value="750000">750K</option>';
str = str +'<option value="800000">800K</option><option value="850000">850K</option><option value="900000">900K</option><option value="950000">950K</option><option value="1000000">1.00M</option>';
str = str +'<option value="1250000">1.25M</option><option value="1500000">1.50M</option><option value="1750000">1.75M</option><option value="2000000">2.00M</option><option value="2250000">2.25M</option>';
str = str +'<option value="2500000">2.50M</option><option value="2750000">2.75M</option><option value="3000000">3.00M</option><option value="3500000">3.50M</option><option value="4000000">4.00M</option>';
str = str +'<option value="4500000">4.50M</option><option value="5000000">5.00M</option><option value="6000000">6.00M</option><option value="7000000">7.00M</option><option value="8000000">8.00M</option><option value="9000000">9.00M</option><option value="10000000">10.00M</option><option value="2000000">20.00M</option><option value="3000000">30.00M</option></select></td><td width="4%" height="35">&nbsp;</td><td width="12%"><span class="listh1">Max  price</span></td>';
str = str +'<td width="52%"><select  class="forlistbx" name="maxPrice" id="maxPrice"><option value="0" selected="selected">---Price To---</option><option value="500">0.5K</option><option value="1000">1K</option><option value="2000">2K</option><option value="3000">3K</option><option value="4000">4K</option><option value="5000">5K</option><option value="10000">10K</option><option value="20000">20K</option><option value="30000">30K</option><option value="40000">40K</option><option value="50000">50K</option><option value="100000">100K</option>';
str = str +'<option value="150000">150K</option><option value="200000">200K</option><option value="250000">250K</option><option value="300000">300K</option><option value="350000">350K</option><option value="400000">400K</option>';
str = str +'<option value="450000">450K</option><option value="500000">500K</option><option value="550000">550K</option><option value="600000">600K</option><option value="650000">650K</option><option value="700000">700K</option>';
str = str +'<option value="750000">750K</option><option value="800000">800K</option><option value="850000">850K</option><option value="900000">900K</option><option value="950000">950K</option><option value="1000000">1.00M</option>';
str = str +'<option value="1250000">1.25M</option><option value="1500000">1.50M</option><option value="1750000">1.75M</option><option value="2000000">2.00M</option><option value="2250000">2.25M</option>';
str = str +'<option value="2500000">2.50M</option><option value="2750000">2.75M</option><option value="3000000">3.00M</option><option value="3500000">3.50M</option><option value="4000000">4.00M</option>';
str = str +'<option value="4500000">4.50M</option><option value="5000000">5.00M</option><option value="6000000">6.00M</option><option value="7000000">7.00M</option><option value="8000000">8.00M</option><option value="9000000">9.00M</option><option value="10000000">10.00M</option><option value="2000000">20.00M</option><option value="3000000">30.00M</option></select></td></tr><tr><td height="6"></td><td height="6"></td><td height="6"></td><td height="6"></td><td height="6"></td>';
str = str +'</tr></table></td></tr><tr><td class="forbottomline"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td height="10" colspan="2"></td></tr><tr>';
str = str +'<td width="19%" height="23"><span class="listh1">Newly Listed </span> </td><td width="81%" height="23"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr><td width="4%"><input class="" type="radio" checked name="newlyListd" value="all" id="listAll"/></td><td width="11%"><span class="searchopt">&nbsp;All </span></td>';
str = str +'<td width="4%"><input class="" type="radio" name="newlyListd" value="7" id="list7"/></td><td width="19%"><span class="searchopt">&nbsp;Last 7 days</span></td><td width="3%"><input class="" type="radio" name="newlyListd" value="30" id="list30"/></td><td width="59%"><span class="searchopt">&nbsp;Last one month</span></td>';
str = str +'</tr></table></td></tr><tr><td height="6" colspan="2"></td></tr></table></td></tr><tr><td height="10"></td></tr><tr><td><table width="100%" border="0" cellspacing="0" cellpadding="0">';
str = str +'<tr valign="top"><td width="84%"><div align="right"></div></td><td width="4%">&nbsp;</td><td width="12%"><div align="right"><input type="button" class="loginButton" name="Submit2" value="Search" onclick="javascript:generateString(\''+type+'\')"/>';
str = str +'</div></td></tr></table></td></tr></table></td><td width="1%" valign="top">&nbsp;</td></tr></table></td><td width="1%">&nbsp;</td></tr></table></div></td></tr><tr><td><div align="center"><img src='+siteurlBlog+'/images/derwent_realestate_australia_btmbx.jpg " width="676" height="8" alt="derwent realestate australia" /></div></td></tr></table></td></tr>';
str = str +'</tr><tr><td>&nbsp;</td></tr><tr><td><div id="srchResults"></div></td></tr><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr></table></td><td width="1%">&nbsp;</td></tr>';
//str = str +'<tr><td height="19">&nbsp;</td><td valign="top"></td><td>&nbsp;</td></tr><tr><td height="19">&nbsp;</td><td valign="top">&nbsp;</td><td>&nbsp;</td>';
str = str +'</table></td></tr></table></td></tr></table><div id="rescontent"></div>';
		return str;	
		
	}
	
	function resize_refine()
	{
		if(document.getElementById("refine_contents").style.display=="")
			document.getElementById("refine_contents").style.display='none';
		else
			document.getElementById("refine_contents").style.display='';
	}
	
	function resize_ad_listing()
	{
		//alert("hi");
		if(document.getElementById("resize_listing").style.display=="")
			document.getElementById("resize_listing").style.display='none';
		else
			document.getElementById("resize_listing").style.display='';
	}