﻿// JScript 文件

var __storemenuimg = document.getElementById("__StoreMenuImg");
var __classmenuimg = document.getElementById("__ClassMenuImg");
var __storemenudiv = document.getElementById("__StoreMenuDiv");
var __classmenudiv = document.getElementById("__ClassMenuDiv");
__storemenudiv.style.display = "none";
__classmenudiv.style.display = "none";
function fnClearTopMenu()
{
    if(__g_topdivmenu != null && __g_topdivmenu.style.display == "")
    {
        fnShowStoreMenu(__g_action);
    }
    var cityobj = _getObj("__SelectCityListDiv");
    if(cityobj != null && cityobj.style.display == "")
    {
        cityobj.style.display = "none";
    }
}
if(window.ActiveXObject)
{
    document.body.attachEvent("onclick", fnClearTopMenu);
}
else
{
    document.body.addEventListener("click", fnClearTopMenu, false);
}

var __g_topdivmenu;
var __g_action;
function fnShowStoreMenu(ntype, bstate)
{
    var objdiv;
    var objimg;
    var tempID = 0;
    __g_action = ntype;
    var tempobj = null;
    if(ntype == 0)
    {
        objdiv = __storemenudiv;
        objimg = __storemenuimg;
        tempobj = __classmenudiv;
        tempID = 1;
    }
    else
    {
        objdiv = __classmenudiv;
        objimg = __classmenuimg;
        tempobj = __storemenudiv;
        tempID = 0;
    }
    __g_topdivmenu = objdiv;
    if(objimg.src.lastIndexOf("dot_menu.gif") > -1)
    {
        objdiv.style.width = "80px";
        objdiv.style.display = "";
        objimg.src = "/images/dot_menu_1.gif";
    }
    else
    {
        objimg.src = "/images/dot_menu.gif";
        objdiv.style.display = "none";
    }
    if(tempobj.style.display == "" && typeof(bstate) == "undefined")
    {
        fnShowStoreMenu(tempID, true);
    }
}

function fnShowTopCityList(nType)
{
    var strDisplay = nType == 0 ? "" : "none";
    _getObj("__SelectCityListDiv").style.display = strDisplay;
}

var _toplocationArray = ["store", "job", "tech", "biz", "car", "buy", "service", "life"];
var _toptemplocation = window.location.pathname;
var _WebSiteAutoRun = new Array();
for(var i=0; i<_toplocationArray.length; i++)
{
    if(_toptemplocation.indexOf(_toplocationArray[i]) > -1)
    {
        if(document.getElementById("_tophouse") != null)
        {
            document.getElementById("_tophouse").className = "";
            document.getElementById("_top" + _toplocationArray[i]).className = "current";
        }
        break;
    }
}

function fnReSetCityID(nCityID)
{
    var InParam = new ParamClass();
    InParam.SetValue("CityID", nCityID);
    fnCallEx("ReSetCity", InParam, "/transfer.aspx", fnSetCityCallBack);
}


function fnSetCityCallBack(sResult)
{
    if(sResult == "OK")
    {
        window.location.reload();
    }
}

var strServiceList = '<a href="http://quote.eastmoney.com/" target="_blank">股票查询</a> <a href="http://fund.eastmoney.com/fund.html" target="_blank">基金净值</a> <a href="http://www.xjflcp.com" target="_blank">彩票查询</a> <a href="http://www.668map.com/qgqtmap/" target="_blank">交通地图</a> <a href="http://qq.ip138.com/train/henan/NanYang.htm" target="_blank">火车查询</a> <a href="http://www.hao123.com/bankjt.htm" target="_blank">网络银行</a> <a href="http://www.ip138.com/" target="_blank">IP 查 询</a> <a href="http://www.ip138.com/" target="_blank">手机查询</a> <a href="http://www.hao123.com/harcksafe.htm" target="_blank">杀毒安全</a> <a href="http://www.lihuajie.cn/postcode/index.aspx" target="_blank">邮编区号</a> <a href="http://tool.cidu.net/tv/" target="_blank">电视预告</a> <a href="http://www.nmc.gov.cn/" target="_blank">天气预报</a> <a href="http://www.nyinfo.ha.cn/shike/plane.htm" target="_blank">飞机航班</a> <a href="http://astro.sina.com.cn/" target="_blank">星座运程</a> <a href="http://www.hao123.com/ss/fy.htm" target="_blank">在线翻译</a>';
var __serviceobj = _getObj("serviceList");
if(__serviceobj)
{
__serviceobj.innerHTML = strServiceList;
}