﻿// JScript 文件

document.write("<link href=\"/style/QQ.css\" rel=\"stylesheet\" type=\"text/css\" />");
document.write("<div class='QQbox2' id='divQQbox2' >");
document.write("	<div class='Qlist2' id='divOnline2'>");
document.write("		<div class='t2'></div>");
document.write("        <table width='110' border='0' cellspacing='0' cellpadding='0'>");
document.write("          <tr>");
document.write("            <td><table width='110' border='0' cellspacing='0' cellpadding='0'>");
document.write("              <tr>");
document.write("                <td width='110'><img src='/images/fwpic.gif' width='110' alt='' border='' usemap=\"#Map\"/></td>");
document.write("              </tr>");
document.write("            </table></td>");
document.write("          </tr>");
document.write("        </table>");
document.write("    </div>");
document.write("</div>");
document.write("<map name=\"Map\" id=\"Map\"><area shape=\"rect\" coords=\"87,2,108,25\" href=\"javascript:void(0);\" onclick='OnlineOut2()' title='点击关闭' target=\"点击关闭\" />");
document.write("<area shape=\"rect\" coords=\"40,33,106,64\" href=\"/aspx/Online.aspx\"  target=\"网上报名\" />");
document.write("</map>");
//<![CDATA[
var tips2; 
var theTop2 = 200;/*这是默认高度,越大越往下*/; 
var old2 = theTop2;
function initFloatTips2() {
  tips2 = document.getElementById('divQQbox2');
  moveTips2();
};
function moveTips2() {
  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-tips2.offsetTop+theTop2;
  pos=tips2.offsetTop+pos/10;

  if (pos < theTop2) 
  {
      pos = theTop2;
  }
  if (pos != old2) 
  {
    tips2.style.top = pos+"px";
    tt=10;
  }
  old2 = pos;
  setTimeout(moveTips2,tt);
}
//!]]>
initFloatTips2();

function OnlineOut2(){
	document.getElementById("divOnline2").style.display = "none";
	document.getElementById("divQQbox2").style.width = "none";

}
drag2("divQQbox2",0);
function drag2(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;
        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;  
        }
    }  
}  
