var taofw = { getElement: function(id) { return document.getElementById(id); } }; var isOpenHouseLink = true; function OpenWindow(theUrl,winName,features){ window.open(theUrl,winName,features); } function OpenModalWindow(url, width, height){ window.showModalDialog(url, window, "dialogWidth:"+width+"px; dialogHeight:"+height+"px; status:0; resizable:0; scroll:0"); window.location.reload(); } function doCopyClick(CopyText) { clipboardData.setData('text', CopyText); alert("复制成功，现在你可以粘贴（Ctrl+v）到QQ/MSN上，推荐给你的好友！"); } function IsOption(){ if(confirm("你真的要执行该操作吗？")){ return true; } else{ return false; } } function Delete(){ if(confirm("你真的要删除吗？")){ return true; } else{ return false; } } function Exit(){ if(confirm("你真的要退出登录吗？")){ return true; } else{ return false; } } function TempTip(){ alert("此功能正在开发中……"); } function CheckUpImg(list,imgsize,ischeckwidth) { if(list.value!="") { var tempValue = list.value; var isimg=true; var pos=list.value.lastIndexOf("."); var end=list.value.length; var value=list.value.substring(pos+1,end); if (pos==-1){ isimg=false; } if (value!="jpg" && value!="gif" && value!="bmp" && value!="JPG" && value!="GIF" && value!="BMP"){ isimg=false; } if (!isimg) { taofw.getElement('submit').disabled = "disabled"; alert("上传图片类型错误，只能是jpg/jpeg/gif/bmp格式。"); } else { taofw.getElement('previewimg').innerHTML="<img src='"+tempValue+"'align='middle' id='imgsmall' onload=CheckUpImgSize(this,"+ imgsize +","+ ischeckwidth +") />"; } } } /*判断图片大小*/ function CheckUpImgSize(img,imgsize,ischeckwidth){ fileSize=img.fileSize/1024; if (fileSize > imgsize){ alert("当前图片大小为"+fileSize+"kb，但系统限制图片大小不能超过"+imgsize+"kb！请调整图片大小。"); taofw.getElement('submit').disabled = "disabled"; } else { if (img != null && img.width<300 && img.height<300 && ischeckwidth== true){ alert("您传的图片太小了，换张大点的吧。图片长、宽必须大于300像素。"); taofw.getElement('submit').disabled = "disabled"; } else { taofw.getElement('submit').disabled = ""; } } img.width=48; img.height=48; } function CheckLogin(theForm){ if (theForm.username.value.length == 0){ alert("淘房屋提醒您：请输入用户名！"); return false; } if (theForm.password.value.length == 0){ alert("淘房屋提醒您：请输入密码！"); return false; } return true; } function Show_ActivePage(Pageid_name){ if (taofw.getElement(Pageid_name) != null){ taofw.getElement(Pageid_name).className = "navigationA"; } } function Show_ActiveTab(Tabid_num){ if (Tabid_num == 0){ if (taofw.getElement("st_1") != null){ taofw.getElement("st_1").innerHTML = "售价"; } if (taofw.getElement("st_2") != null){ taofw.getElement("st_2").innerHTML = "万"; } if (taofw.getElement("st_3") != null){ taofw.getElement("st_3").style.display = ""; } } if (Tabid_num == 1){ if (taofw.getElement("st_1") != null){ taofw.getElement("st_1").innerHTML = "租价"; } if (taofw.getElement("st_2") != null){ taofw.getElement("st_2").innerHTML = "元"; } if (taofw.getElement("st_3") != null){ taofw.getElement("st_3").style.display = ""; } } } function Show_SearchHistory(moth){ if (moth == 0){ if (taofw.getElement("searchhistoryList") != null){ taofw.getElement("searchhistoryList").style.display = "none"; } } if (moth == 1){ if (taofw.getElement("searchhistoryList") != null){ taofw.getElement("searchhistoryList").style.display = ""; } } } function showCityMore() { taofw.getElement("cityMore").style.display = ""; } function hideCityMore() { taofw.getElement("cityMore").style.display = "none"; } /*写入cookie*/ function writeCookie(name, value, hours){ var expire = ""; if(hours != null){ expire = new Date((new Date()).getTime() + hours * 3600000); expire = "; expires=" + expire.toGMTString(); } document.cookie = name + "=" + escape(value) + expire + ";path=/"; } /*读取cookie*/ function readCookie(name){ var cookieValue = ""; var search = name + "="; if(document.cookie.length > 0){ offset = document.cookie.indexOf(search); if (offset != -1){ offset += search.length; end = document.cookie.indexOf(";", offset); if (end == -1) end = document.cookie.length; cookieValue = unescape(document.cookie.substring(offset, end)); } } return cookieValue; } /*读取cookie 带解码*/ function readCookieDecode(name){ var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return decodeURIComponent(c.substring(nameEQ.length,c.length)); } return null; } /*选择所有*/ function CheckedAll(){ if ((taofw.getElement("checkboxall").checked == true) || (taofw.getElement("checkboxall").getAttribute("checked") == "checked") || (taofw.getElement("checkboxall").getAttribute("checked",3) == "checked")) { for(i=0;i<50;i++){ if (taofw.getElement("checkbox"+i) != null){ taofw.getElement("checkbox"+i).checked = true; taofw.getElement("checkbox"+i).setAttribute("checked","checked"); } } } else{ for(i=0;i<50;i++){ if (taofw.getElement("checkbox"+i) != null){ taofw.getElement("checkbox"+i).checked = false; taofw.getElement("checkbox"+i).setAttribute("checked",""); } } } } function DrawImage(ImgD,FitWidth,FitHeight){ var image=new Image(); image.src=ImgD.src; if(image.width>0 && image.height>0){ if(image.width/image.height>= FitWidth/FitHeight){ if(image.width>FitWidth){ ImgD.width=FitWidth; ImgD.height=(image.height*FitWidth)/image.width; }else{ ImgD.width=image.width; ImgD.height=image.height; } } else{ if(image.height>FitHeight){ ImgD.height=FitHeight; ImgD.width=(image.width*FitHeight)/image.height; }else{ ImgD.width=image.width; ImgD.height=image.height; } } } } var Category=function(id,name){ this.id=id; this.name = name; this.childs = new Array(); this.childIndex=0; }; var NewsTypeArray=new Array(); NewsTypeArray[0]=new Category(0,'最新博客文章'); NewsTypeArray[1]=new Category(2,'图片新闻'); NewsTypeArray[2]=new Category(3,'头条新闻'); NewsTypeArray[3]=new Category(4,'市场动态'); NewsTypeArray[4]=new Category(5,'人物视点'); NewsTypeArray[5]=new Category(6,'房产知识'); NewsTypeArray[6]=new Category(7,'家居装饰'); NewsTypeArray[7]=new Category(8,'分析预测'); NewsTypeArray[8]=new Category(9,'经验分享'); NewsTypeArray[9]=new Category(10,'政策法规'); NewsTypeArray[10]=new Category(11,'精品博文'); NewsTypeArray[11]=new Category(12,'火爆话题'); function GetNewsTypeByID(ID){ NewsType = ""; for(i=0;i<NewsTypeArray.length;i++){ if (NewsTypeArray[i].id == ID){ NewsType = NewsTypeArray[i].name; break; } } document.write(NewsType); } var HouseTypeArray=new Array(); HouseTypeArray[0]=new Category(0,'住宅'); HouseTypeArray[1]=new Category(1,'公寓'); HouseTypeArray[2]=new Category(2,'商铺'); HouseTypeArray[3]=new Category(3,'别墅'); HouseTypeArray[4]=new Category(4,'商住楼'); HouseTypeArray[5]=new Category(5,'写字楼'); HouseTypeArray[6]=new Category(6,'仓库厂房'); HouseTypeArray[7]=new Category(7,'车位'); HouseTypeArray[8]=new Category(8,'酒店'); function GetHouseTypeArray_search(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { zone.options.add(new Option('类型','')); for(i=0;i<HouseTypeArray.length;i++){ zone.options.add(new Option(HouseTypeArray[i].name,HouseTypeArray[i].id)); if (HouseTypeArray[i].id == selID){ zone.options[i+1].selected = true; } } } } function GetHouseTypeArray(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { for(i=0;i<HouseTypeArray.length;i++){ zone.options.add(new Option(HouseTypeArray[i].name,HouseTypeArray[i].id)); if (HouseTypeArray[i].id == selID){ zone.options[i].selected = true; } } } } function GetHouseTypeByID(ID){ HouseTypeText = ""; for(i=0;i<HouseTypeArray.length;i++){ if (HouseTypeArray[i].id == ID){ HouseTypeText = HouseTypeArray[i].name; break; } } document.write(HouseTypeText); } var HouseFitmentArray=new Array(); HouseFitmentArray[0]=new Category(0,'毛坯'); HouseFitmentArray[1]=new Category(1,'简装'); HouseFitmentArray[2]=new Category(2,'精装'); HouseFitmentArray[3]=new Category(3,'豪华'); HouseFitmentArray[4]=new Category(4,'中装'); function GetHouseFitmentArray_search(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { zone.options.add(new Option('装修','')); for(i=0;i<HouseFitmentArray.length;i++){ zone.options.add(new Option(HouseFitmentArray[i].name,HouseFitmentArray[i].id)); if (HouseFitmentArray[i].id == selID){ zone.options[i+1].selected = true; } } } } function GetHouseFitmentArray(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { for(i=0;i<HouseFitmentArray.length;i++){ zone.options.add(new Option(HouseFitmentArray[i].name,HouseFitmentArray[i].id)); if (HouseFitmentArray[i].id == selID){ zone.options[i].selected = true; } } } } function GetHouseFitmentByID(ID){ HouseFitmentText = ""; for(i=0;i<HouseFitmentArray.length;i++){ if (HouseFitmentArray[i].id == ID){ HouseFitmentText = HouseFitmentArray[i].name; break; } } document.write(HouseFitmentText); } var HouseAspectArray=new Array(); HouseAspectArray[0]=new Category(0,'南'); HouseAspectArray[1]=new Category(1,'南北'); HouseAspectArray[2]=new Category(2,'东南'); HouseAspectArray[3]=new Category(3,'西南'); HouseAspectArray[4]=new Category(4,'东'); HouseAspectArray[5]=new Category(5,'东西'); HouseAspectArray[6]=new Category(6,'东北'); HouseAspectArray[7]=new Category(7,'西'); HouseAspectArray[8]=new Category(8,'西北'); HouseAspectArray[9]=new Category(9,'北'); function GetHouseAspectArray(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { for(i=0;i<HouseAspectArray.length;i++){ zone.options.add(new Option(HouseAspectArray[i].name,HouseAspectArray[i].id)); if (HouseAspectArray[i].id == selID){ zone.options[i+1].selected = true; } } } } function GetHouseAspectByID(ID){ HouseAspect = ""; for(i=0;i<HouseAspectArray.length;i++){ if (HouseAspectArray[i].id == ID){ HouseAspect = HouseAspectArray[i].name; break; } } document.write(HouseAspect); } var HousePropertyArray=new Array(); HousePropertyArray[0]=new Category(0,'其他'); HousePropertyArray[1]=new Category(1,'商品房'); HousePropertyArray[2]=new Category(2,'经济适用房'); HousePropertyArray[3]=new Category(3,'使用权房'); HousePropertyArray[4]=new Category(4,'公房'); HousePropertyArray[5]=new Category(5,'私房'); HousePropertyArray[6]=new Category(6,'房改房'); function GetHousePropertyArray(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { for(i=0;i<HousePropertyArray.length;i++){ zone.options.add(new Option(HousePropertyArray[i].name,HousePropertyArray[i].id)); if (HousePropertyArray[i].id == selID){ zone.options[i+1].selected = true; } } } } function GetHousePropertyByID(ID){ HouseProperty = ""; for(i=0;i<HousePropertyArray.length;i++){ if (HousePropertyArray[i].id == ID){ HouseProperty = HousePropertyArray[i].name; break; } } document.write(HouseProperty); } var HouseAgeArray=new Array(); HouseAgeArray[0]=new Category(0,'不详'); HouseAgeArray[1]=new Category(2010,'2010年'); HouseAgeArray[2]=new Category(2009,'2009年'); HouseAgeArray[3]=new Category(2008,'2008年'); HouseAgeArray[4]=new Category(2007,'2007年'); HouseAgeArray[5]=new Category(2006,'2006年'); HouseAgeArray[6]=new Category(2005,'2005年'); HouseAgeArray[7]=new Category(2004,'2004年'); HouseAgeArray[8]=new Category(2003,'2003年'); HouseAgeArray[9]=new Category(2002,'2002年'); HouseAgeArray[10]=new Category(2001,'2001年'); HouseAgeArray[11]=new Category(2000,'2000年'); HouseAgeArray[12]=new Category(1999,'1999年'); HouseAgeArray[13]=new Category(1998,'1998年'); HouseAgeArray[14]=new Category(1997,'1997年'); HouseAgeArray[15]=new Category(1996,'1996年'); HouseAgeArray[16]=new Category(1995,'1995年'); HouseAgeArray[17]=new Category(1994,'1994年'); HouseAgeArray[18]=new Category(1993,'1993年'); HouseAgeArray[19]=new Category(1992,'1992年'); HouseAgeArray[20]=new Category(1991,'1991年'); HouseAgeArray[21]=new Category(1990,'1990年'); HouseAgeArray[22]=new Category(1989,'1989年'); HouseAgeArray[23]=new Category(1988,'1988年'); HouseAgeArray[24]=new Category(1987,'1987年'); HouseAgeArray[25]=new Category(1986,'1986年'); HouseAgeArray[26]=new Category(1985,'1985年'); HouseAgeArray[27]=new Category(1984,'1984年'); HouseAgeArray[28]=new Category(1983,'1983年'); HouseAgeArray[29]=new Category(1982,'1982年'); HouseAgeArray[30]=new Category(1981,'1981年'); HouseAgeArray[31]=new Category(1980,'1980年'); HouseAgeArray[32]=new Category(1,'80年代前'); function GetHouseAgeArray(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { for(i=0;i<HouseAgeArray.length;i++){ zone.options.add(new Option(HouseAgeArray[i].name,HouseAgeArray[i].id)); if (HouseAgeArray[i].id == selID){ zone.options[i+1].selected = true; } } } } /*根据建筑年代ID得到建筑年代名称*/ function GetHouseAgeByID(ID){ HouseAge = ""; for(i=0;i<HouseAgeArray.length;i++){ if (HouseAgeArray[i].id == ID){ HouseAge = HouseAgeArray[i].name; break; } } document.write(HouseAge); } var HouseZfanTypeArray=new Array(); HouseZfanTypeArray[0]=new Category(0,'整租'); HouseZfanTypeArray[1]=new Category(1,'合租'); HouseZfanTypeArray[2]=new Category(2,'短租'); function GetHouseZfanTypeArray(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { for(i=0;i<HouseZfanTypeArray.length;i++){ zone.options.add(new Option(HouseZfanTypeArray[i].name,HouseZfanTypeArray[i].id)); if (HouseZfanTypeArray[i].id == selID){ zone.options[i].selected = true; } } } } function GetHouseZfanTypeByID(ID){ HouseZfanType = ""; for(i=0;i<HouseZfanTypeArray.length;i++){ if (HouseZfanTypeArray[i].id == ID){ HouseZfanType = HouseZfanTypeArray[i].name; break; } } document.write(HouseZfanType); } var HouseRoomArray=new Array(); HouseRoomArray[1]=new Category(1,'一居'); HouseRoomArray[2]=new Category(2,'二居'); HouseRoomArray[3]=new Category(3,'三居'); HouseRoomArray[4]=new Category(4,'四居'); HouseRoomArray[5]=new Category(5,'五居'); HouseRoomArray[6]=new Category(6,'六居以上'); HouseRoomArray[7]=new Category(7,'大开间'); function GetHouseRoomArray_search(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { zone.options.add(new Option('户型','')); for(i=1;i<HouseRoomArray.length;i++){ zone.options.add(new Option(HouseRoomArray[i].name,HouseRoomArray[i].id)); if (HouseRoomArray[i].id == selID){ zone.options[i].selected = true; } } } } function GetHouseRoomArray(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { for(i=1;i<HouseRoomArray.length;i++){ zone.options.add(new Option(HouseRoomArray[i].name,HouseRoomArray[i].id)); if (HouseRoomArray[i].id == selID){ zone.options[i-1].selected = true; } } } } function GetHouseRoomByID(ID){ HouseRoomText = ""; for(i=0;i<HouseRoomArray.length;i++){ if (HouseRoomArray[i]!=null) { if (HouseRoomArray[i].id == ID){ HouseRoomText = HouseRoomArray[i].name; break; } } } document.write(HouseRoomText); } var HouseOfficeArray=new Array(); HouseOfficeArray[1]=new Category(1,'一厅'); HouseOfficeArray[2]=new Category(2,'二厅'); HouseOfficeArray[3]=new Category(3,'三厅'); HouseOfficeArray[4]=new Category(4,'四厅以上'); HouseOfficeArray[5]=new Category(0,'无'); function GetHouseOfficeArray(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { for(i=1;i<HouseOfficeArray.length;i++){ zone.options.add(new Option(HouseOfficeArray[i].name,HouseOfficeArray[i].id)); if (HouseOfficeArray[i].id == selID){ zone.options[i-1].selected = true; } } } } var HouseWcArray=new Array(); HouseWcArray[1]=new Category(1,'一卫'); HouseWcArray[2]=new Category(2,'二卫'); HouseWcArray[3]=new Category(3,'三卫'); HouseWcArray[4]=new Category(4,'四卫以上'); HouseWcArray[5]=new Category(0,'无'); function GetHouseWcArray(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { for(i=1;i<HouseWcArray.length;i++){ zone.options.add(new Option(HouseWcArray[i].name,HouseWcArray[i].id)); if (HouseWcArray[i].id == selID){ zone.options[i-1].selected = true; } } } } var HouseElevatorArray=new Array(); HouseElevatorArray[0]=new Category(0,'否'); HouseElevatorArray[1]=new Category(1,'是'); function GetHouseElevatorArray_search(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { zone.options.add(new Option('电梯',2)); for(i=0;i<HouseElevatorArray.length;i++){ zone.options.add(new Option(HouseElevatorArray[i].name,HouseElevatorArray[i].id)); if (HouseElevatorArray[i].id == selID){ zone.options[i+1].selected = true; } } } } function GetHouseElevatorArray(crlName,selID){ zone = taofw.getElement(crlName); if (zone!=null) { for(i=0;i<HouseElevatorArray.length;i++){ zone.options.add(new Option(HouseElevatorArray[i].name,HouseElevatorArray[i].id)); if (HouseElevatorArray[i].id == selID){ zone.options[i].selected = true; } } } } function GetHouseElevatorByID(ID){ HouseElevato = ""; for(i=0;i<HouseElevatorArray.length;i++){ if (HouseElevatorArray[i].id == ID){ HouseElevato = HouseElevatorArray[i].name; break; } } document.write(HouseElevato); } var xmlHttp; var blogID; function showHint(str) { if(xmlHttp!=null) { xmlHttp.abort(); xmlHttp=null; } if (str.length==0) { return; } xmlHttp=GetXmlHttpObject(); if (xmlHttp==null) { alert ("您的浏览器不支持AJAX！"); return; } blogID = str; var url="/view_blognew_support.ashx"; url=url+"?BlogID="+str; xmlHttp.onreadystatechange = stateChanged; xmlHttp.open("GET",url,true); xmlHttp.send(null); } function stateChanged() { if (xmlHttp.readyState==4) { if(xmlHttp.status==200) { var message=xmlHttp.responseText; var count=taofw.getElement("BlogSupport"+blogID).innerText; if(message=="ok") { count++; taofw.getElement("BlogSupport"+blogID).innerText=count; alert("支持成功！"); } else { alert("谢谢支持，该篇文章您已经顶过一次了！"); } } } } function GetXmlHttpObject() { var xmlHttp=null; try { /* Firefox, Opera 8.0+, Safari*/ xmlHttp=new XMLHttpRequest(); } catch (e) { /* Internet Explorer*/ try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; } function MouseOverEditorClass(ss,op) { taofw.getElement("Compare"+op).style.display="block"; ss.style.backgroundColor="#eaf5ff"; } function MouseOutEditorClass(ss,op) { taofw.getElement("Compare"+op).style.display="none"; ss.style.backgroundColor="#FFFFFF"; } function AddCompare(topictype,op1,op2,topcount,txtlength) { var tempStr=""; /*添加值*/ var houseStr="";/*页面代码*/ var temphouseStr;/*cookie代码*/ var splitHouse=new Array();/*cookie数组*/ var cookieName=GetTopicType(topictype); temphouseStr=readCookie(cookieName) || ""; if(temphouseStr!="") splitHouse=temphouseStr.split('|'); temphouseStr=""; var myDate = new Date(); tempStr=op2+"*"+op1+"*"; if (topictype.indexOf("history") > -1)tempStr+=myDate.toLocaleString(); if (topictype.indexOf("history") == -1) { if(splitHouse.length>=9) { alert("淘房屋提示您：最多只能同时比较8个！"); return; } } for(var i=0;i<splitHouse.length;i++) { if(splitHouse[i]=="") continue; splitHouseInfo = splitHouse[i].split('*'); var houseId = splitHouseInfo[1]; if(houseId==op1) { if (topictype.indexOf("history") == -1) alert("淘房屋提示您：此项已在待比较列表中！"); return; } } splitHouse[splitHouse.length]=tempStr; var start = 0; if (topictype.indexOf("history") > -1 && splitHouse>50) start = splitHouse.length-50; for(var i=start;i<splitHouse.length;i++) { if(splitHouse[i]=="") continue; temphouseStr+=splitHouse[i]+"|"; } writeCookie(cookieName,temphouseStr,99999); GetCompareHouse(topictype,topcount,txtlength); } function DelCompareHouse(topictype,op,topcount,txtlength) { var cookieName=GetTopicType(topictype); var temphouseStr;/*cookie代码*/ var splitHouse=new Array();/*cookie数组*/ temphouseStr=readCookie(cookieName) || ""; if(temphouseStr!="") splitHouse=temphouseStr.split('|'); temphouseStr="";/*清空cookie代码*/ splitHouse.splice(op,1);/*删除*/ for(var i=0;i<splitHouse.length;i++) { if(splitHouse[i]=="") continue; temphouseStr+=splitHouse[i]+"|"; } writeCookie(cookieName,temphouseStr,5); if(taofw.getElement("history"+op)!=null) taofw.getElement("history"+op).style.display="none"; GetCompareHouse(topictype,topcount,txtlength); } function DelCookie(topictype,topcount,txtlength) { var cookieName=GetTopicType(topictype); writeCookie(cookieName,"",1); GetCompareHouse(topictype,topcount,txtlength); } function GetTopicType(topictype) { var topicType=topictype;/*主题*/ if(topicType==""){ /*alert("参数错误！");*/return;} var cookieName="CompareHouse"+topicType; return cookieName; } function GetCompareHouse(topictype,topcount,txtlength) { var cookieName=GetTopicType(topictype); var houseStr=""; var temphouseStr; var splitHouse=new Array();/*cookie数组*/ temphouseStr=readCookie(cookieName) || ""; if(temphouseStr!="") { splitHouse=temphouseStr.split('|'); var maxSplit = splitHouse.length-1; var j=0; for(var i=maxSplit-1;i>=0;i--) { if(splitHouse[i]=="") continue; splitHouseInfo = splitHouse[i].split('*'); var houseText = splitHouseInfo[0]; var houseId = splitHouseInfo[1]; if(houseText.length>txtlength) houseText=houseText.substring(0,txtlength)+"…"; j++; if (j>topcount) break; houseStr += "<li>·"; houseStr += "<A href='/house/view_house_"+ houseId +".html' target=_blank >"; houseStr += houseText; houseStr += "</a> "; houseStr += "<a href=\"javascript:DelCompareHouse('"+topictype+"','"+i+"','"+topcount+"','"+txtlength+"')\">[×]</a></li>"; } houseStr="<ul>"+houseStr+"</ul>"; if (topictype.indexOf("history") > -1) { if(taofw.getElement("HistoryHouse")!=null) taofw.getElement("HistoryHouse").innerHTML=houseStr; if(taofw.getElement("HistoryHouse1")!=null) taofw.getElement("HistoryHouse1").style.display=""; } else { if(taofw.getElement("CompareHouse")!=null) taofw.getElement("CompareHouse").innerHTML=houseStr; if(taofw.getElement("CompareHouse1")!=null) taofw.getElement("CompareHouse1").style.display=""; } } else { if (topictype.indexOf("history") > -1) { if(taofw.getElement("HistoryHouse1")!=null) taofw.getElement("HistoryHouse1").style.display="none"; } else { if(taofw.getElement("CompareHouse1")!=null) taofw.getElement("CompareHouse1").style.display="none"; } } } var LoatBigImgTimeOut; var BigHouseImg; function LoatBigImg() { if(taofw.getElement("BigHouseImgRight")!=null) taofw.getElement("BigHouseImgRight").innerHTML = "<img src='"+BigHouseImg+"' />"; } function ShowBigHouseImg(obj,houseimg) { var oDiv = document.createElement("div"); oDiv.style.position = "absolute"; oDiv.id = "BigHouseImg"; var x=obj.offsetLeft,y=obj.offsetTop; while(obj=obj.offsetParent) { x+=obj.offsetLeft; y+=obj.offsetTop; } oDiv.style.left = (x+55) + "px"; oDiv.style.top = (y-50) + "px"; oDiv.className = "BigHouseImgBg"; document.body.appendChild(oDiv); var leftDiv = document.createElement("div"); leftDiv.id = "BigHouseImgLeft"; leftDiv.className = "BigHouseImgLeft"; taofw.getElement("BigHouseImg").appendChild(leftDiv); var rightDiv = document.createElement("div"); rightDiv.id = "BigHouseImgRight"; rightDiv.className = "BigHouseImgRight"; taofw.getElement("BigHouseImg").appendChild(rightDiv); taofw.getElement("BigHouseImgRight").innerHTML = "<br><br><br><br><img src='http://img.taofw.cn/images/loading.gif' align='absmiddle' style='border:0px;'> 正在放大图片，请稍候…"; BigHouseImg = houseimg; LoatBigImgTimeOut = window.setTimeout("LoatBigImg()",1000); } function HideBigHouseImg() { window.clearTimeout(LoatBigImgTimeOut); if(taofw.getElement("BigHouseImg")!=null) document.body.removeChild(taofw.getElement("BigHouseImg")); } 