<%@ control language="C#" autoeventwireup="true" inherits="Controls_OnLine, Huibo.Net" %>

<script type="text/javascript">
    document.write('<link href="Images/kefu.css" type="text/css" rel="stylesheet"/>');
    document.write('<div class="QQbox" id="divQQbox">');
    document.write('<div class="Qlist" id="divOnline" onmouseout="hideMsgBox(event);" style="display:none;">');
    document.write('<img src="Images/qqkefu_t.gif"  alt="QQ客服热线">');
    document.write('<div class="con">');

        var xmlHttp=null;
        if(window.ActiveXObject) {
            xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        } else {
            xmlHttp = new XMLHttpRequest();
        }
        var url ="GetOnline.ashx";
        xmlHttp.open('GET', url, false);
        xmlHttp.send(null);
        
        if (4 == xmlHttp.readyState) {
            if (200 == xmlHttp.status) {
                var response = xmlHttp.responseText;
                if (response == '') {
                    
                } else{
		            document.write(response);
                }
            }
        }

    document.write('</div>');
    document.write('</div>');
    document.write('<div id="divMenu" onmouseover="OnlineOver();"><img src="images/qq1.gif" class="press" alt="QQ客服热线"></div>');
    document.write('</div>');

    var tips; var theTop = 65/*这是默认高度,越大越往下*/; var old = theTop;
    function initFloatTips() {
    tips = document.getElementById('divQQbox');
    moveTips();
    };
    function moveTips() {
    var tt=50;
    if (window.innerHeight) {
    pos = window.pageYOffset
    }
    else if (document.documentElement && document.documentElement.scrollTop) {
    pos = document.documentElement.scrollTop
    }
    else if (document.body) {
    pos = document.body.scrollTop;
    }
    pos=pos-tips.offsetTop+theTop;
    pos=tips.offsetTop+pos/10;
    if (pos < theTop) pos = theTop;
    if (pos != old) {
    tips.style.top = pos+"px";
    tt=10;
    //alert(tips.style.top);
    }
    old = pos;
    setTimeout(moveTips,tt);
    }

    initFloatTips();
    function OnlineOver(){
    document.getElementById("divMenu").style.display = "none";
    document.getElementById("divOnline").style.display = "block";
    document.getElementById("divQQbox").style.width = "145px";
    }
    function OnlineOut(){
    document.getElementById("divMenu").style.display = "block";
    document.getElementById("divOnline").style.display = "none";
    }
    function hideMsgBox(theEvent){ 
　     if (theEvent){
　     var browser=navigator.userAgent; 
　     if (browser.indexOf("Firefox")>0){ 
　　     if (document.getElementById('divOnline').contains(theEvent.relatedTarget)) { 
　　     return;
    } 
    } 
    if (browser.indexOf("MSIE")>0){ 
    if (document.getElementById('divOnline').contains(event.toElement)) { 
    return; 
    }
    }
    }
    document.getElementById("divMenu").style.display = "block";
    document.getElementById("divOnline").style.display = "none";
    }

    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

//    try {
//    var pageTracker = _gat._getTracker("UA-4101184-2");
//    pageTracker._trackPageview();
//    } catch(err) {}
</script>

