﻿/// <reference path="../../js/jquery-1.3.2-vsdoc2.js" />
/// <reference path="../../js/jquery-cookie.js" />

function OnActiveTabChange(titleTabs, curTab)
{
    tabIndex = titleTabs.index(curTab);

    if (tabIndex == 1)
    {
        $("#helpGP").show();
        $("#helpPer").hide();
        $("#helpZZT").hide();

        $("#divSell").hide();
    }
    else if (tabIndex == 0)
    {
        $("#helpGP").hide();
        $("#helpPer").show();
        $("#helpZZT").hide();

        $("#divSell").show();
    }
    else if (tabIndex ==2)
    {
        $("#helpGP").hide();
        $("#helpPer").hide();
        $("#helpZZT").show();

        $("#divSell").hide();
    }

    if (window == top) return;
    var h = $("#tab2House").height();
    top.window.document.getElementById("2HouseList").style.height = (h + 40) + "px";
}

function setHeight()
{
    if (window == top) return;
    var h = $("#tab2House").height();
    try
    {
        top.window.document.getElementById("2HouseList").style.height = (h + 40) + "px";
    }
    catch (ex) { }
}

$(document).ready(function()
{
    document.domain = "gyfc.net.cn";

    $("#helpGP").live("click", function(event)
    {
        var p = $("#gpHelp");
        if (p.length == 0)
        {
            p = document.createElement("div");
            p.setAttribute("id", "gpHelp");
            document.body.appendChild(p);
        }
        $(p).css("position", "absolute").css("background-color", "#fbf6b9")
                .css("border", "solid 1px #000000").css("width", "270px")
                .css("height", "177px").css("overflow", "hidden")
                .css("font-size", "12px").css("line-height", "20px")
                .css("padding", "10px 10px 10px 10px");
        $(p).html("&nbsp;&nbsp;&nbsp;&nbsp;挂牌是指二手房出卖人通过交易中心或取得网上挂牌资格的中介机构将房屋信息登录到存量房网上交易系统的行为。根据《贵阳市存量房网上交易管理规定》的要求，贵阳市行政区域内所有存量房（即二手房）在交易时应通过存量房网上交易系统进行，除即时交易的房屋外，挂牌信息应在“筑房网”上公示。挂牌信息的真实性与合法性均经过审核。 <a href='http://www.gyfc.net.cn/2_estInfo/index/viewNews.aspx?id=3361' target='_blank'>贵阳市存量房网上交易管理规定</a>  <div style='float:right;margin-right:10px' onclick='$(\"#gpHelp\").css(\"display\",\"none\");' onmousemove=\"this.style.cursor=\'pointer\'\" onmouseout=\"this.style.cursor=\'auto\'\">关闭</div>");
        $(p).css("left", event.clientX).css("top", event.clientY).show();

        return false;
    });

    $("#helpPer").live("click", function(event)
    {
        var p = $("#perHelp");
        if (p.length == 0)
        {
            p = document.createElement("div");
            p.setAttribute("id", "perHelp");
            document.body.appendChild(p);
        }
        $(p).css("position", "absolute").css("background-color", "#fbf6b9")
                .css("border", "solid 1px #000000").css("width", "250px")
                .css("height", "120px").css("overflow", "hidden")
                .css("font-size", "12px").css("line-height", "20px")
                .css("padding", "10px 10px 10px 10px");
        $(p).html("&nbsp;&nbsp;&nbsp;&nbsp;自由发布是指二手房出卖人利用筑房网公开免费的二手房信息发布平台自行发布房屋信息的行为。筑房网对自由发布的信息只作形式上的审查，对其内容的真实性与合法性不承担责任。<div style='float:right;margin-right:10px' onclick='$(\"#perHelp\").css(\"display\",\"none\");' onmousemove=\"this.style.cursor=\'pointer\'\" onmouseout=\"this.style.cursor=\'auto\'\">关闭</div>");
        $(p).css("left", event.clientX).css("top", event.clientY).show();

        return false;
    });
});


function backAll(id)
{
    $("#" + id + " input:checkbox").removeAttr("checked");
    $("#" + id + " select").each(function(i)
    {
        this.selectedIndex = 0;
    });
    $("#" + id + " input:text").val("");
    $("#" + id + " input:submit").click();
}
