﻿// JScript 文件

document.write("<link href=\"/style/QQ.css\" rel=\"stylesheet\" type=\"text/css\" />");
document.write("<div class='QQbox' id='divQQbox' >");
document.write("	<div class='Qlist' id='divOnline'>");
document.write("		<div class='t'></div>");


document.write("<table width='110' border='0' cellspacing='0' cellpadding='0'>");
document.write("  <tr>");
document.write("    <td><a href='http://hzmeilijian.taobao.com/?asker=wangwang'_blank'  title='中奖号码（订美丽健牛奶中金砖活动第二期中奖号码）-美丽健乳业'><img src='/images/淘宝网店网页.gif' width='110' height='90px' alt='' border=''/></a></td>");
document.write("  </tr>");
document.write("</table>");

document.write("</div>");
document.write("</div>");

//<![CDATA[
var tips; 
var theTop = 400;/*这是默认高度,越大越往下*/; 
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("divOnline").style.display = "block";
//		document.getElementById("divQQbox").style.width = "110px";
//	}
	
	function OnlineOut(){
		document.getElementById("divOnline").style.display = "none";
		document.getElementById("divQQbox").style.width = "20px";

	}

 function hideMsgBox(theEvent){  //theEvent用来传入事件，Firefox的方式
 　       if (theEvent){
   　           var browser=navigator.userAgent;   //取得浏览器属性
   　           if (browser.indexOf("Firefox")>0){  //如果是Firefox
    　　             if (document.getElementById('divOnline').contains(theEvent.relatedTarget)) {  //如果是子元素
     　　                  return;   //结束函式
                        } 
                  } 
                  if (browser.indexOf("MSIE")>0){  //如果是IE
                         if (document.getElementById('divOnline').contains(event.toElement)) {  //如果是子元素
                                return;  //结束函式
                          }
                   }
             }
            /*要执行的操作*/
		document.getElementById("divOnline").style.display = "block";
 }
 
drag("divQQbox",0);
function drag(o,s)  
{  
    if (typeof o == "string") o = document.getElementById(o);  
    o.orig_x = parseInt(o.style.left) - document.body.scrollLeft;  
    o.orig_y = parseInt(o.style.top) - document.body.scrollTop;  
    o.orig_index = o.style.zIndex;  
          
    o.onmousedown = function(a)  
    {  
        this.style.cursor = "move";  
        this.style.zIndex = 10000;  
        var d=document;  
        if(!a)a=window.event;  
        var x = a.clientX+d.body.scrollLeft-o.offsetLeft;  
        var y = a.clientY+d.body.scrollTop-o.offsetTop;  
        //author: www.longbill.cn  
        d.ondragstart = "return false;"  
        d.onselectstart = "return false;"  
        d.onselect = "document.selection.empty();"  
                  
        if(o.setCapture)  
            o.setCapture();  
        else if(window.captureEvents)  
            window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);  

        d.onmousemove = function(a)  
        {  
            if(!a)a=window.event;  
            o.style.left = a.clientX+document.body.scrollLeft-x;  
            o.style.top = a.clientY+document.body.scrollTop-y;  
            o.orig_x = parseInt(o.style.left) - document.body.scrollLeft;  
            o.orig_y = parseInt(o.style.top) - document.body.scrollTop;  
        }  

        d.onmouseup = function()  
        {  
            if(o.releaseCapture)  
                o.releaseCapture();  
            else if(window.captureEvents)  
                window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);  
            d.onmousemove = null;  
            d.onmouseup = null;  
            d.ondragstart = null;  
            d.onselectstart = null;  
            d.onselect = null;  
            o.style.cursor = "normal";  
            o.style.zIndex = o.orig_index;  
        }  
    }  
      
    if (s)  
    {  
        var orig_scroll = window.onscroll?window.onscroll:function (){};  
        window.onscroll = function ()  
        {  
            orig_scroll();  
            o.style.left = o.orig_x + document.body.scrollLeft;  
            o.style.top = o.orig_y + document.body.scrollTop;  
        }  
    }  
}  
