var listok=false;
var str2="";
function fylist(){
	var str="";
	listok=false;
	str+=getParam("yewu",form1.yewu.value);
	str+=getParam("days",form1.days.value);
	str+=getParam("mul_region",repalceall(form1.mul_region.value," ","$"));
	str+=getParam("house_type",form1.house_type.value);
	str+=getParam("floor",form1.floor.value);
	str+=getParam("price",form1.price.value);
	str+=getParam("area",form1.area.value);
	str+=getParam("house_age",form1.house_age.value);
	str+=getParam("mohu",form1.mohu.value);
	str+=getParam("direction",form1.direction.value);
	str+=getParam("house_prop",form1.house_prop.value);
	str+=getParam("purpose",form1.purpose.value);
	str+=getParam("frame",form1.frame.value);
	str+=getParam("fitment",form1.fitment.value);
	str+=getParam("fy_resource",form1.fy_resource.value);
	str+=getParam("input_date",form1.input_date.value);
	str+=getParam("input_dated",form1.input_dated.value);
	userdefine=form1.userdefine.value;
	param_other_="";
	loadmap();
	initPage("/servlet/oyeall.yewu.mapfy_list",str+str2);//
	str2="";
}
/////////新的
//左键点击列表上的信息
function mmdetail(id,region,map_x,map_y,map_z){
	var mPoint = new LTPoint(map_x,map_y);
	map.centerAndZoom(mPoint,map_z);
}
//生成标签
function showDetail(i){
	var tds=document.getElementById("ajtr"+i).getElementsByTagName('TD');
	table = document.getElementById("tablepage");
	var temp="";
	temp+="<table border='0' cellspacing='0' cellpadding='0'>";
	temp+="<tr><td width='9' colspan='2'></td>";
	temp+="    <td height='1'  bgcolor='4E5B6C'></td>";
	temp+="    <td width='9' colspan='2'></td></tr>";
	temp+="<tr onclick='javascript:CloseDivId()'><td width='9' height='15' align=left colspan=2><img src='/images/div1.jpg' border=0 ></img></td>";
	temp+="    <td height='9' align='right' bgcolor='white'><a href='javascript:CloseDivId()'><img src='/images/close2.gif' border=0 wifth=14 height=14></img></a></td>";
	temp+="    <td width='9' colspan='2' align='right'><img src='/images/div2.jpg' border=0 ></img></td></tr>";
	temp+="<tr><td height='1' colspan='5' bgcolor='4E5B6C'></td></tr>";
	temp+="<tr>";
	temp+="    <td width='1' bgcolor='4E5B6C'></td>";
	temp+="    <td width='8' class=ajtd></td>";
	temp+="    <td class=ajtd>";
	//插入内容开始
/*	temp+="<table border=0 cellspacing=1 cellpadding=0 align=center>";
	temp+="<tr><td nowrap>"+trim(tds[4].innerText)+"&nbsp;&nbsp;"+trim(tds[3].innerHTML)+"</td></tr>";
	temp+="<tr><td nowrap>售价:"+trim(tds[8].innerText)+"&nbsp;"+trim(tds[9].innerText)+"</td></tr>";
	temp+="<tr><td nowrap>户型:"+trim(tds[5].innerText)+"</td></tr>";
	temp+="<tr><td nowrap>楼层:"+trim(tds[6].innerText)+"&nbsp;&nbsp;面积:"+trim(tds[7].innerHTML)+"平方米</td></tr>";
	temp+="</table>";
*/	//插入内容结束
	temp+="    </td>";
	temp+="    <td width='8' class=ajtd></td>";
	temp+="    <td width='1' bgcolor='4E5B6C'></td></tr>";
	temp+="<tr class=ajtd>";
	temp+="    <td width='9' colspan=2></td>";
	temp+="    <td height='8' ></td>";
	temp+="    <td width='9' colspan=2></td>";
	temp+="</tr>";
	temp+="<tr bgcolor='4E5B6C'>";
	temp+="    <td width='9' colspan=2></td>";
	temp+="    <td height='1' ></td>";
	temp+="    <td width='9' colspan=2></td>";
	temp+="</tr>";
	temp+="</table>";
	table.innerHTML=temp;
	obj_=document.getElementById("biao"+i);
	displayLayer();
}
function setbiao(tds){
	var lab="";
	var mPoint;	
	lab=tds[3].innerHTML;
//	lab+=trim("tds[4].innerText");
	//lab+="<br>"+trim(tds[4].innerText);
	//lab+="<br>"+trim(tds[5].innerText);
	mPoint = new LTPoint(tds[0].innerText,tds[1].innerText);
	var icon = new LTIcon("td.jpg","","");
	var marker1= new LTMarker(mPoint,icon);
	marker1.setLabel(lab);
	marker1.setFontSize(12);
	marker1.setFontColor("red");
	map.addOverLay(marker1);
	var control = new LTStandMapControl()
	map.addControl(control);
}
function getBiao(){
	map.clearOverLays();
	var temp=1;
	while(document.getElementById("ajtr"+temp)){
		var tds=document.getElementById("ajtr"+(parseInt(temp))).getElementsByTagName('TD');		
		setbiao(tds);
		temp++;
	}	
	if(document.getElementById("ajtr0")){
		map.centerAndZoom(mPoint,3);
	}
	else{
		map.centerAndZoom("朝阳",3);
	}
}
var mm=1;
var map;
var search,points;
function loadmap(){
	if(listok){
		if(mm==1){
			map=new LTMaps('maps');
			map.addControl(new LTStandMapControl());
			map.centerAndZoom("朝阳",3);
			var zoomSearchControl=new LTZoomSearchControl();
			LTEvent.addListener(zoomSearchControl,'mouseup',searchByBounds);
			map.addControl(zoomSearchControl);
			search=new LTLocalSearch(showPoint);
			search.setCity("朝阳");
			mm=0;
		}
		//设置标签
		getBiao();
	}
	else{
		setTimeout("loadmap();",1000);
	}
}
loadmap();
function searchByBounds(bounds){
	document.form44.lx.value=bounds.getXmin();
	document.form44.ly.value=bounds.getYmin();
	document.form44.rx.value=bounds.getXmax();
	document.form44.ry.value=bounds.getYmax();
	//拉框后取消拉框
	var tt=maps.getElementsByTagName("input");
	tt[0].click();
	searchMap();	
//alert(str);
//	fylist();
}
function showPoint(bounds){
}
//点击标记时事件
function biaoclick(i){
	document.getElementById("ajtr"+i).onclick();
	//showDetail(i);
}