﻿// JScript 文件
function QQControl(){
  var QQService = document.getElementById("QQService");
  QQService.onmouseover = function(){
    this.style.cursor = "hand";
    QQShow();
  }
  QQService.onmouseout = function(){
    QQHide();
  }
}

function QQShow(){
  var QQContent = document.getElementById("QQContent");
  if(QQContent.movement1){
    clearTimeout(QQContent.movement1);
  }
  if(QQContent.movement2){
    clearTimeout(QQContent.movement2);
  }
  var CWidth = parseInt(QQContent.style.width);
  if(CWidth<=116){
    QQContent.style.width = CWidth+4+"px";
    QQContent.movement1 = setTimeout(QQShow,10);
  }else{
    QQContent.style.width = "120px";
  }
}

function QQHide(){
  var QQContent = document.getElementById("QQContent");
  if(QQContent.movement1){
    clearTimeout(QQContent.movement1);
  }
  if(QQContent.movement2){
    clearTimeout(QQContent.movement2);
  }
  var CWidth = parseInt(QQContent.style.width);
  if(CWidth>=4){
    QQContent.style.width = CWidth-4+"px";
    QQContent.movement2 = setTimeout(QQHide,10);
  }else{
    QQContent.style.width = "0px";
  }
}