﻿//跳转到最终页
function HotSearch_SecondHand(area,price,keyword)
{
	var url = "/Second/SearchList.aspx";
	var search_type="售";
	var fiter="";
	fiter+="&keyWord="+encodeURI(keyword);
	fiter+="&PriceForSale="+encodeURI(price);
	fiter+="&Area="+encodeURI(area);
	fiter = "?search_type=" + encodeURI(search_type) + fiter;
	if(fiter!="" && fiter!=null)
	{
		url = url + fiter;
	}
	 var a_href = document.createElement("a");document.body.appendChild(a_href);a_href.target = "_blank"; a_href.href=url;a_href.click();document.body.removeChild(a_href);
}
//跳转到最终页
function HotSearch_SecondHand2(roomNumber,propertyType)
{
	var url = "/Second/SearchList.aspx";
	var search_type="售";
	var fiter="";
	fiter+="&houseType="+encodeURI(propertyType);
	fiter+="&ROOMNUMBER="+encodeURI(roomNumber);
	fiter = "?search_type=" + encodeURI(search_type) + fiter;
	if(fiter!="" && fiter!=null)
	{
		url = url + fiter;
	}
	
	 var a_href = document.createElement("a");document.body.appendChild(a_href);a_href.target = "_blank"; a_href.href=url;a_href.click();document.body.removeChild(a_href);
}
//跳转到最终页
function HotSearch_SecondHand3(DISTRICT)
{
	var url = "/Second/SearchList.aspx";
	var search_type="售";
	var fiter="";
	fiter+="&DISTRICT="+encodeURI(DISTRICT);
	fiter = "?search_type=" + encodeURI(search_type) + fiter;
	if(fiter!="" && fiter!=null)
	{
		url = url + fiter;
	}
	 var a_href = document.createElement("a");document.body.appendChild(a_href);a_href.target = "_blank"; a_href.href=url;a_href.click();document.body.removeChild(a_href);
}
//将事件添加到对象
function HotNavigateSec_AddEventToObj(obj,Event,Fun)
{
	if(window.addEventListener){
      obj.addEventListener(Event,Fun,false);
	} 
	else{
      obj.attachEvent(Event,Fun); 
      }
}
//获取元素的纵坐标
function HotNavigateSec_getTop(e){
var offset=e.offsetTop;
if(e!=window.document.body) offset+=HotNavigateSec_getTop(e.offsetParent);
return offset;
}
//获取元素的横坐标
function HotNavigateSec_getLeft(e){
var offset=e.offsetLeft;
if(e!=window.document.body) offset+=HotNavigateSec_getLeft(e.offsetParent);
return offset;
}
//显示浮动信息
function HotNavigateSec_ShowFloating(obj,district)
{
    var element = obj;
    var y = HotNavigateSec_getTop(element);
    var x = HotNavigateSec_getLeft(element);
    var div_float = document.getElementById('div_HotNavigate1_Floating');
    var html_div = document.getElementById('div_HotNavigate1_Floating_' + district);
    div_float.innerHTML = html_div.innerHTML;
    div_float.style.display="";
    div_float.style.top=y + (obj.offsetHeight) - 6;
    //div_float.style.left=parseInt(x - (div_float.offsetWidth/2) + (obj.offsetWidth/2)) + 30;
    div_float.style.right=15;
    
    
    element.style.backgroundColor="#ccccff";
    window.HotNavigate1_redObj = element;
    
 
}
//记忆移动
function HotNavigateSec_record_move(){
window.is_div_move_HotNavigateSec=true;
}
//记忆移动
function HotNavigateSec_record_out(){
window.is_div_move_HotNavigateSec=false;
}
//隐藏浮动对象
function HotNavigateSec_HideFloating()
{
    var div_float = document.getElementById('div_HotNavigate1_Floating');
    if(div_float)
    {
    div_float.style.display="none";
    }
    
    if( window.HotNavigate1_redObj)
    {
         window.HotNavigate1_redObj.style.backgroundColor="Transparent";
    }
}
//隐藏浮动对象
function  HotNavigateSec_body_onmousemove(){
    if(window.is_div_move_HotNavigateSec!=true)
    {
        HotNavigateSec_HideFloating();
    }
}