﻿var ajax=new Ajax();

var bottom_menu,bottom_Array;    //底部菜单
var iSpeedL = 1;      //左滚动速度
var iSpeedR = 1;      //右滚动速度
var iHeight = 44;     //滚动停止
var iCount = 5;       //滚动次数

function getObj(id) {return document.getElementById(id);}

onload = function() { 
    getIndex();
}






 

 

 
 function getIndex() { 
    var indexList = getObj("index").getElementsByTagName("a");
    for(var i = 0; i < indexList.length ; i++) { 
        indexList[i].onmouseover=spellIndex;
        indexList[i].onmouseout=onMouseOut;
        indexList[i].onmousemove=onMouseOve;
    }
 }
 
 function onMouseOut() { 
    this.className="";
    getObj("index_content").style.display="none";
 }
 function onMouseOve() { 
    this.className="selected";
    getObj("index_content").style.display="";
 }
 
 function spellIndex(){ 
    this.className="selected";
    var value = this.innerHTML;
    var index_content=getObj("index_content");
    index_content.style.display="";
    index_content.style.textAlign="center";
    index_content.innerHTML = "<img src=\"/images/loading.gif\" alt=\"\" />数据加载中……";
    ajax.DoCallBack("/Tools/Ajax.aspx?t=spellindex", "value=" + value);
    ajax.OnComplete = function(responseText, responseXML) { 
        index_content.innerHTML ="";
        var info=responseXML.getElementsByTagName("list")[0].getElementsByTagName("info");
        if(info.length<1){
           index_content.innerHTML="没有拼音字母“<font color=\"Red\">"+value+"</font>”开头的类目！";
           index_content.style.textAlign="center";
           return; 
        }
        index_content.style.textAlign="left";
        for(var i=0;i<info.length;i++) { 
            var a=document.createElement("a");
            a.href="http://list.u69cn.com/buyer/offerlist/"+info[i].getAttribute("id")+".shtml";
            a.target="_blank";
            var txt= document.createTextNode(info[i].getAttribute("name"));
            a.title=info[i].getAttribute("name");
            a.appendChild(txt);
            index_content.appendChild(a);
        }
    }
    var iThis=this;
    getObj("index_content").onmousemove = function(){ 
        this.style.display="";
        iThis.className="selected";
    }
    getObj("index_content").onmouseout = function () { 
        this.style.display="none";
        iThis.className="";
    }
 }
 
 
 
 
