var tips; var theTop = 145; var old = theTop;
function initFloatTips() 
{
    tips = document.getElementById('divQQbox');
    moveTips();
}
function open1()
{
    var diag = new Dialog();
	diag.Width = 352;
	diag.Height = 225;
	diag.Title = "大客户通道/软文营销/SEO服务";
	diag.URL = "/dakehu.aspx";
	diag.show();
}
function open2()
{
    var diag = new Dialog();
	diag.Width = 370;
	diag.Height = 288;
	diag.Title = "官方链接收购";
	diag.URL = "/OfficialSideBuy.aspx";
	diag.show();
}
function open3()
{
    var diag = new Dialog();
	diag.Width = 370;
	diag.Height = 256;
	diag.Title = "报告订单问题";
	diag.URL = "/submitBUG.aspx";
	diag.show();
}
function open4()
{
    var diag = new Dialog();
	diag.Width = 480;
	diag.Height = 300;
	diag.Title = "链接交换高级搜索";
	diag.URL = "/highhuntserch.aspx";
	diag.show();
    return false;
}
function open7(strURL)
{
    var diag = new Dialog();
	diag.Width = 480;
	diag.Height = 260;
	diag.Title = "链接交换高级搜索";
	diag.URL =strURL;
	diag.show();
    return false;
}
function open5()
{
    var diag = new Dialog();
	diag.Width = 530;
	diag.Height = 270;
	diag.Title = "链接买卖高级搜索";
	diag.URL = "/SearchTop.aspx";
	diag.show();
    return false;
}
function openClass()
{
    var diag = new Dialog();
	diag.Width = 450;
	diag.Height = 180;
	diag.Title = "分类检索";
	diag.URL = "/topClass.html";
	diag.show();
    return false;
}
function open6(strURL)
{
    var diag = new Dialog();
	diag.Width = 530;
	diag.Height = 310;
	diag.Title = "链接买卖高级搜索";
	diag.URL = strURL;
	diag.show();
    return false;
}
function open8()
{
    var diag = new Dialog();
	diag.Width = 750;
	diag.Height = 300;
	diag.Title = "链接买卖快速检索";
	diag.URL = "/QuickSearches.aspx";
	diag.show();
    return false;
}
function open9()
{
    var diag = new Dialog();
	diag.Width = 750;
	diag.Height = 300;
	diag.Title = "链接交换快速检索";
	diag.URL = "/Exchange_Postmortem.aspx";
	diag.show();
    return false;
}
function openExchange(uid)
{
    var diag = new Dialog();
	diag.Width = 375;
	diag.Height = 220;
	diag.Title = "链接交换信息发送";
	diag.URL = "/Exchange_Link.aspx?UID="+uid;
	diag.show();
    return false;
}
//链接代理（购买）信息录入窗口--2011-6-15
function openLingAgent()
{
    var diag = new Dialog();
	diag.Width = 395;
	diag.Height = 230;
	diag.Title = "链接信息地址填写";
	diag.URL = "/LinkAgentBuyList.aspx";
	diag.show();
    return false;
}

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;
    }
    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";
}
if(typeof(HTMLElement)!="undefined")
{   
    HTMLElement.prototype.contains=function(obj)   
    {   
        while(obj!=null&&typeof(obj.tagName)!="undefind")
        {
            if(obj==this) 
            {
                return true;
            }
            obj=obj.parentNode;
        }   
        return false;
    };
}  
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";
}
