function sleep(milliseconds) {
  var start = new Date().getTime();
  for (var i = 0; i < 1e7; i++) {
    if ((new Date().getTime() - start) > milliseconds){
      break;
    }
  }
}


function VSScroller(ulId, speed) {
 
	this.container = document.getElementById(ulId);
	this.container.Scroller = this;
	this.speed = speed;
  this.delay = 0;
  
	this.scroll = function() {
			var c = this.container.firstChild;
			var first = null;
			while (c) {
				if (c.tagName == 'LI') {
					first = c;
					break;
				}
				c = c.nextSibling;
			}
			var nodeSize = 0;
			var px = 0;
			nodeSize = first.clientWidth;
			
			if (first.style.marginLeft != '') {
				px = parseInt(first.style.marginLeft);
			}
			first.style.marginLeft = ( px - 2 ) + 'px';
			
			this.delay++;
			//alert(this.delay);
			if(this.delay == 926)
			{
  			this.delay = 0;
  			//sleep(3000);
			}
			if ( parseInt(first.style.marginLeft) <= -(nodeSize) ) {
				
        first.style.marginLeft = '0px';
				this.container.removeChild(first);
				this.container.appendChild(first);
			}
		setTimeout('document.getElementById(\'' + this.container.id + '\').Scroller.scroll()', this.speed);	
	}
 
	setTimeout('document.getElementById(\'' + ulId + '\').Scroller.scroll()', this.speed);
 
}
-->



