function ScrollText(content,btnPrevious,btnNext,autoStart) { this.Delay = 10; this.LineHeight = 20; this.Amount = 1;//注意:LineHeight一定要能整除Amount. this.Direction = "up"; this.Timeout = 5000; this.ScrollContent = this.$(content); this.ScrollContent.innerHTML += this.ScrollContent.innerHTML; if(btnNext) { this.NextButton = this.$(btnNext); this.NextButton.onclick = this.GetFunction(this,"Next"); this.NextButton.onmouseover = this.GetFunction(this,"Stop"); this.NextButton.onmouseout = this.GetFunction(this,"Start"); } if(btnPrevious) { this.PreviousButton = this.$(btnPrevious); this.PreviousButton.onclick = this.GetFunction(this,"Previous"); this.PreviousButton.onmouseover = this.GetFunction(this,"Stop"); this.PreviousButton.onmouseout = this.GetFunction(this,"Start"); } this.ScrollContent.onmouseover = this.GetFunction(this,"Stop"); this.ScrollContent.onmouseout = this.GetFunction(this,"Start"); if(autoStart) { this.Start(); } } ScrollText.prototype.$ = function(element) { return document.getElementById(element); } ScrollText.prototype.Previous = function() { clearTimeout(this.AutoScrollTimer); clearTimeout(this.ScrollTimer); this.Scroll("up"); } ScrollText.prototype.Next = function() { clearTimeout(this.AutoScrollTimer); clearTimeout(this.ScrollTimer); this.Scroll("down"); } ScrollText.prototype.Start = function() { clearTimeout(this.AutoScrollTimer); this.AutoScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Timeout); } ScrollText.prototype.Stop = function() { clearTimeout(this.ScrollTimer); clearTimeout(this.AutoScrollTimer); } ScrollText.prototype.AutoScroll = function() { if(this.Direction == "up") { if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2) { this.ScrollContent.scrollTop = 0; } this.ScrollContent.scrollTop += this.Amount; } else { if(parseInt(this.ScrollContent.scrollTop) <= 0) { this.ScrollContent.scrollTop = parseInt(this.ScrollContent.scrollHeight) / 2; } this.ScrollContent.scrollTop -= this.Amount; } if(parseInt(this.ScrollContent.scrollTop) % this.LineHeight != 0) { this.ScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Delay); } else { this.AutoScrollTimer = setTimeout(this.GetFunction(this,"AutoScroll"), this.Timeout); } } ScrollText.prototype.Scroll = function(direction) { if(direction=="up") { if(this.ScrollContent.scrollTop == 0) { this.ScrollContent.scrollTop = parseInt(this.ScrollContent.scrollHeight) / 2; } this.ScrollContent.scrollTop -= this.Amount; } else { this.ScrollContent.scrollTop += this.Amount; } if(parseInt(this.ScrollContent.scrollTop) >= parseInt(this.ScrollContent.scrollHeight) / 2) { this.ScrollContent.scrollTop = 0; } if(parseInt(this.ScrollContent.scrollTop) % this.LineHeight != 0) { this.ScrollTimer = setTimeout(this.GetFunction(this,"Scroll",direction), this.Delay); } } ScrollText.prototype.GetFunction = fu

Description

pulled from site's meta description

阿孚宠物,宠物,东北宠物代理商,辽宁宠物代理商,沈阳大农动物医药有限公司,东北宠物,辽宁宠物,宠物用品,宠物医院,宠物疾病,宠物药品,宠物保健品,犬粮,狗,犬,猫,走进阿孚,新闻中心,产品展示,合作伙伴,会员专栏,医师专栏,联系我们


This is an automatically generated AboutUs page for Alfpet.com. Click the "Edit" button at the top of the page to make changes. Please read our Getting Started page if you need any help.

Domain Resolution

This domain resolves to the following IP addresses:


Retrieved from "http://aboutus.com/index.php?title=Alfpet.com&oldid=58140346"