﻿  //图片滚动
    window.onload = function() {
        new dhooo({
            btns: UIs.call(UI('myTab_btns2'), 'LI')
			, className: 'hot'
			, contentID: 'main2'
			, len: 97
			, dir: 'top'
			, auto: true
        });
        getQa('qa_1', 9);
        //getProvince('440000', '440300', '440304');
        getIndexOrder();
        getIndexServices();
        getIndexShow();
        getIndexPrice();
    }
    function toInfo(id, dep) {
        var d = escape(dep);
        window.location = "Emyee_Info.aspx?id=" + id + "&dp=" + d + "";
    }
    function getSToSearch() {
        var key = document.getElementById('txtSKey').value;
        if (key.length > 15) {
            alert('长度不能超过15个字符.');
            return false;
        }
        var ar = document.getElementById('hdvVarea').value;
        window.location = 'Dept_List.aspx?s=' + ar + '&k=' + escape(key) + '';
    }
    function getIndexOrder()//加载实时订单
    {
        $.ajax({
            url: "Handsers/HIndexOrder.aspx",
            type: "GET", cache: false,
            beforeSend: function() {
                document.getElementById('con_ssppto_1').innerHTML = "<div style='width:100px;height:20px ;margin:50px auto;'> <img src='img/loading.gif' alt='' />&nbsp;数据载入中...</div>";
            },
            error: function() {
                document.getElementById('con_ssppto_1').innerHTML = "数据加裁超时,请刷新页面";
            },
            success: function(text) {
                document.getElementById('con_ssppto_1').innerHTML = text;
            }
        });
    }
    function getIndexServices()//实时服务单
    {
        $.ajax({
            url: "Handsers/HIndexServices.aspx",
            type: "GET", cache: false,
            beforeSend: function() {
                document.getElementById('con_ssppto_2').innerHTML = "<div style='width:100px;height:20px ;margin:50px auto;'> <img src='img/loading.gif' alt='' />&nbsp;数据载入中...</div>";
            },
            error: function() {
                document.getElementById('con_ssppto_2').innerHTML = "数据加裁超时,请刷新页面";
            },
            success: function(text) {
                document.getElementById('con_ssppto_2').innerHTML = text;
            }
        });
    }

    function getIndexShow()//l载秀机单，
    {
        $.ajax({
            url: "Handsers/HIndexShow.aspx",
            type: "GET", cache: false,
            beforeSend: function() {
                document.getElementById('con_wjdynic_1').innerHTML = "<div style='width:100px;height:20px ;margin:50px auto;'> <img src='img/loading.gif' alt='' />&nbsp;数据载入中...</div>";
            },
            error: function() {
                document.getElementById('con_wjdynic_1').innerHTML = "数据加裁超时,请刷新页面";
            },
            success: function(text) {
                document.getElementById('con_wjdynic_1').innerHTML = text;
            }
        });
    }
    function getIndexPrice()//价格走势
    {
        $.ajax({
            url: "Handsers/HIndexPrice.aspx",
            type: "GET", cache: false,
            beforeSend: function() {
                document.getElementById('con_wjdynic_2').innerHTML = "<div style='width:100px;height:20px ;margin:50px auto;'> <img src='img/loading.gif' alt='' />&nbsp;数据载入中...</div>";
            },
            error: function() {
                document.getElementById('con_wjdynic_2').innerHTML = "数据加裁超时,请刷新页面";
            },
            success: function(text) {
                document.getElementById('con_wjdynic_2').innerHTML = text;
            }
        });
    }
    function QueryString() {
        var name, value, i;
        var str = location.href;
        var num = str.indexOf("?")
        str = str.substr(num + 1);
        var arrtmp = str.split("&");
        for (i = 0; i < arrtmp.length; i++) {
            num = arrtmp[i].indexOf("=");
            if (num > 0) {
                name = arrtmp[i].substring(0, num);
                value = arrtmp[i].substr(num + 1);
                this[name] = value;
            }
        }
    }
