function STS11910SampleThumbScroller(aryThumb){ var _this = this; var _aryThumb = aryThumb; var _divThumbs = document.getElementById("STS11910_divThumbs"); var _intThumbCount = aryThumb.length; var _intThumbWidth = 72; var _intTimerID = 0; var _intLeft = 0; var _intNextIndex = 0; this.start = function(){ _intTimerID = window.setInterval("STS11910_sts.scrollRight()", 40); } this.stop = function(){ window.clearInterval(_intTimerID); } this.scrollRight = function(){ _intLeft--; _divThumbs.style.left = _intLeft.toString() + "px"; if(_intLeft % _intThumbWidth == 0){ console.log(_intTimerID); _aryThumb[_intNextIndex].style.left = ((_intLeft * -1) + (_intThumbCount * _intThumbWidth) - _intThumbWidth).toString() + "px"; _intNextIndex++; if(_intNextIndex == _intThumbCount) _intNextIndex = 0; } } } document.getElementById("__spnSTS11910").innerHTML = '
'.replace(/\|/g, ";"); var STS11910_strProviderHRef = "http://www.ifreelance.com/provider/detail.aspx?providerid=11910"; var STS11910_aryThumb = new Array(document.getElementById('STS11910_rptThumbs_ctl00_divThumb'),document.getElementById('STS11910_rptThumbs_ctl01_divThumb'),document.getElementById('STS11910_rptThumbs_ctl02_divThumb'),document.getElementById('STS11910_rptThumbs_ctl03_divThumb'),document.getElementById('STS11910_rptThumbs_ctl04_divThumb'),document.getElementById('STS11910_rptThumbs_ctl05_divThumb'),document.getElementById('STS11910_rptThumbs_ctl06_divThumb'),document.getElementById('STS11910_rptThumbs_ctl07_divThumb'),document.getElementById('STS11910_rptThumbs_ctl08_divThumb'),document.getElementById('STS11910_rptThumbs_ctl09_divThumb')); var STS11910_sts = new STS11910SampleThumbScroller(STS11910_aryThumb); STS11910_sts.start();