<!--
    var strimg=""; 
	var nn=0;
    var o = new Rotate(1003, 257, "container");
        o.addImg([
				  {url:'product/20110714090502178.jpg', link: '#'},{url:'product/称重式配麦器首页.jpg', link: 'http://macinte.com/products_51_1.html'},{url:'product/20110714090502750.jpg', link: '#'},{url:'product/20110715101627808.jpg', link: '#'}	    
				  ]);
		nn=4;
        o.show();
    function Rotate(width, height, container, timeout)
        {
                var isIE = navigator.appName == "Microsoft Internet Exploer";
                var isFF = /Firefox/i.test(navigator.userAgent);
                this.imgInfo = [];
                this.width = parseInt(width);
                this.height = parseInt(height);
                this.container = $(container);
                this.timeout = timeout || 3000;
                this.index = 0;
                this.oImg = null;
                this.timer = null;
                this.innerContainer = "asfman_" + uniqueID(6);
                this.order = "asfman_" + uniqueID(6);
                this.img = "asfman_" + uniqueID(6);
                this.template = "<div id='" + this.innerContainer + "'>\r\n" + "<div id='" + this.order + "'>\r\n{order}\r\n<div style='clear: both'></div>\r\n</div>";
                //add css 
                var styleCss = "#" + this.innerContainer + "{overflow: hidden; position: relative; width: " + this.width + "px; height: " + this.height + "px;}\r\n" +
                               "#" + this.order + "{position: absolute; right: 2px; bottom: 2px;}\r\n" +
                                           "#" + this.order + " a{width: 22px; line-height: 21px; height: 21px; font-size: 12px; text-align: center; margin: 3px 1px 0 1px; float: left;}\r\n" + "#" + this.order + " a:link, #" + this.order + " a:visited{background: transparent url(jsbg1.gif) ; color: #000; text-decoration: none;}\r\n"+
                                           "#" + this.order + " a:hover{text-decoration:none;}\r\n" + 
                                           "#" + this.innerContainer + " img{border: 0; width: " + this.width + "px; height: " + this.height + "px;}\r\n";
                function uniqueID(n)
                {
                        var str="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
                        for(var ret = "", i = 0; i < n; i++)
                        {
                        ret += str.charAt(Math.floor(Math.random()*62));
                        }
                        return ret;
        };
                void function(cssText, doc)
                {
                        doc = doc || document;
                        var oStyle = doc.createElement("style");
                        oStyle.type = "text/css"; 
                        if(oStyle.styleSheet)
                        {
                                oStyle.styleSheet.cssText = cssText; 
                        }
                        else
                        {
                                oStyle.appendChild(doc.createTextNode(cssText));
                        } 
                        doc.getElementsByTagName("head")[0].appendChild(oStyle);
                }(styleCss);
        function $(str){return document.getElementById(str);};
                function addListener(o, type, fn)
                {
                        var func = function()
                        {
                          return function(){fn.call(o);}
                        }();
                        if(isIE)
                        {
                                o.attachEvent("on" + type, func);
                        }
                        else if(isFF)
                        {
                                o.addEventListener(type, func, false);
                        }else{
                                o["on" + type] = func;
                        }
                        return func;
                }
                if(Rotate.initialize == undefined)
                {
                   Rotate.prototype.addImg = function(obj)
                   {//{url: imgUrl, link: linkUrl, alt: alt, txt: txt}
                       if(obj)
                           {
                              if(obj.constructor == Array)
                                  {
                                     for(var i = 0, l =  obj.length; i < l; i++)
                                     {
                                         this.imgInfo.push(obj[i]);
                                     }
                                  }else
                                    this.imgInfo.push(obj);
                           }
                   }
                   Rotate.prototype.show = function()
                   {
                      var _this = this;
                          var order = "";
					  for(var i = 1, l =  this.imgInfo.length; i <= l; i++)
                      {
                          order += "<a href='javascript: void(0)'></a>";
                      }
              this.template = this.template.replace(/{order}/, order);
                          this.container.innerHTML = this.template;
                          for(var j = 0, len =  $(this.order).getElementsByTagName("a").length; j < len; j++)
                          {
                             addListener($(this.order).getElementsByTagName("a")[j], "click", clickFunc);
                                 addListener($(this.order).getElementsByTagName("a")[j], "focus", function(){this.blur();});
                          }
                          $(this.order).getElementsByTagName("a")[this.index].style.background = "transparent url(jsbg2.gif)";
                          $(this.order).getElementsByTagName("a")[this.index].style.color = "#fff";
                          function clickFunc()
                          {
                                  if(_this.timer)
                                         clearInterval(_this.timer);
                                  var n = (this.innerHTML.replace(/^\s+|\s+$/g,"")|0)-1;
                                  _this.change(n);
                                  var o = _this;
                                  o.index = n;
                                  o.timer = setInterval(function(){o.autoStart();}, o.timeout);
                          }
                          this.oA = document.createElement("a");
                          this.oA.href = "javascript: void(0)";
                          if(this.imgInfo[this.index].link)
                          {
                              //this.oA.href = this.imgInfo[this.index].link//当前图片链接
                                 // this.oA.target = "_blank";
                          }
                          $(this.innerContainer).appendChild(this.oA);
                          this.oImg = new Image();
                          this.oImg.src = this.imgInfo[this.index].url;
                          this.oImg.style.filter = "revealTrans(duration=1,transition=23)";
                          this.oA.appendChild(this.oImg);
                          this.timer = setInterval(function(){_this.autoStart();}, this.timeout);

                   }
                   Rotate.prototype.autoStart = function()
                   {
                        this.index++;
                                var n = this.index >= this.imgInfo.length ? this.index = 0 : this.index;
                                this.change(n);
                   }
                   Rotate.prototype.change = function(index)
                   {
                          if(this.oImg.filters && this.oImg.filters.revealTrans)
                          {
                                 this.oImg.filters.revealTrans.Transition = Math.floor(Math.random()*23);
                                 this.oImg.filters.revealTrans.apply();
                                 this.oImg.src = this.imgInfo[index].url;
                                 this.oImg.filters.revealTrans.play();

                          }else
                            this.oImg.src = this.imgInfo[index].url;
                          this.oA.href = this.imgInfo[index].link;
                          for(var k = 0, length =  $(this.order).getElementsByTagName("a").length; k < length; k++)
                          {
                             $(this.order).getElementsByTagName("a")[k].style.background = "transparent url(jsbg1.gif)";
                                 $(this.order).getElementsByTagName("a")[k].style.color = "#000";
                          }
                        $(this.order).getElementsByTagName("a")[index].style.background = "transparent url(jsbg2.gif)";
                          $(this.order).getElementsByTagName("a")[index].style.color ="#fff";
                   }
                   Rotate.initialize = true;
                }
    }
 $("#qqonline2").mouseover(function() {
    $("#qqonline2").css("right",20); 
  }).mouseout(function(){
   $("#qqonline2").css("right",20); 
  });
$(this).scroll(function() { // 页面发生scroll事件时触发   
var bodyTop = 0;   
if (typeof window.pageYOffset != 'undefined') {   
bodyTop = window.pageYOffset;   
}   
else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat')   
{   
bodyTop = document.documentElement.scrollTop;   
}   
else if (typeof document.body != 'undefined') {   
bodyTop = document.body.scrollTop;   
}

$("#qqonline2").css("top", 100 + bodyTop) // 设置层的CSS样式中的top属性, 注意要是小写，要符合"标准"   

$("#qqonline1").css("top", 100 + bodyTop)   
$("#qqonline1").text(bodyTop);   
});   
function CloseQQ()
{
	$("#qqonline2").hide();
};       
//-->
