function FsMarquee(ID, lineHeight, lineCount, scrollSpeed, atFirstDelay, lineDelay, moveDelay)
{
  this.id=ID;
  this.Target = document.getElementById(ID);
  this.LineHeight = lineHeight;
  this.LineCount = lineCount;
  this.ScrollSpeed = scrollSpeed;
  this.Actived = true;
  this.AtFirstDelay = atFirstDelay;
  this.LineDelay = lineDelay;
  this.MoveDelay = moveDelay;
  this.Target.innerHTML += this.Target.innerHTML; 
  $("#"+this.id).data("this", this); 
  window.setTimeout("$('#"+this.id+"').data('this').Run()", this.AtFirstDelay); 
  this.Run = function()
  {
    if (this.Actived)
    {
      this.Target.scrollTop += this.ScrollSpeed; 
    }
    if (this.Target.scrollTop == this.LineCount * this.LineHeight) 
      this.Target.scrollTop = 0; 
    if (this.Target.scrollTop % this.LineHeight == 0) { 
      window.setTimeout("$('#"+this.id+"').data('this').Run()", this.LineDelay); 
    } else { 
      window.setTimeout("$('#"+this.id+"').data('this').Run()", this.MoveDelay); 
    }
  };
  this.stop = function()
  {
    this.Actived = false;
  }
  this.go = function()
  {
    this.Actived = true;
  }
}

function Round(o, bc){
  var so = $(o).html();
  $(o).html("");
  $(o).append('<b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"></b></b>');
  $(o).append('<div class="xboxcontent">'+so+'</div>');
  $(o).append('<b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"></b></b>');
  $(o).find(".xb2").css("border-right-color", bc);
  $(o).find(".xb3").css("border-right-color", bc);
  $(o).find(".xb4").css("border-right-color", bc);
  $(o).find(".xb2").css("border-left-color", bc);
  $(o).find(".xb3").css("border-left-color", bc);
  $(o).find(".xb4").css("border-left-color", bc);
  $(o).find(".xb1").css("background", bc);
  $(o).find(".xboxcontent").css("border-top-color", bc);
  $(o).find(".xboxcontent").css("border-right-color", bc);
  $(o).find(".xboxcontent").css("border-bottom-color", bc);
  $(o).find(".xboxcontent").css("border-left-color", bc);
}

//以键值对的方式读取查询字符串
//例如【http://localhost/test.htm?first=1&second=2】
function QueryInt(key, defaultvalue)
{
  var t = Number(QueryString(key, defaultvalue));
  if (isNaN(t))
  {
    return defaultvalue;
  }
  return t;
}

function QueryString(key, defaultvalue)
{
  var value = defaultvalue; 
  //获取当前文档的URL,为后面分析它做准备
  var sURL = window.document.URL;
  //URL中是否包含查询字符串
  if (sURL.indexOf("?") > 0)
  {
    //分解URL,第二的元素为完整的查询字符串
    //即arrayParams[1]的值为【first=1&second=2】
    var arrayParams = sURL.split("?");
    //分解查询字符串
    //arrayURLParams[0]的值为【first=1 】
    //arrayURLParams[2]的值为【second=2】
    var arrayURLParams = arrayParams[1].split("&");
    //遍历分解后的键值对
    for (var i = 0; i < arrayURLParams.length; i++)
    {
          //分解一个键值对
      var sParam =  arrayURLParams[i].split("=");
      if ((sParam[0] == key) && (sParam[1] != ""))
      {
          //找到匹配的的键,且值不为空
          value = sParam[1];
          break;
      }
    } 
  }
  return value;
}
function getUrlFn()
{
  return location.pathname.substr(location.pathname.lastIndexOf('/')+1);   
}
