// JavaScript Document
function OpenUrl(url)  {
	  window.open(url, "_blank");
  }

//Scroller class
function Scroller(id)
{
  //this.sid = sid;	//Remember to disable/enable the input element later on
  //this.fid = fid;	//Remember to disable/enable the input element later on
  
  this.scrolling_text = document.getElementById(id);
 
  this.timer = null;
  this.speed = 100;	//1000 = 1 second
  this.right_to_left = true;            
  
  this.scroll();
}

Scroller.prototype.scroll = function()
{
  var text = this.scrolling_text.firstChild.nodeValue;
  
  if (text.length > 0)
  {
    //Remove the first character and add it to the end
    if (this.right_to_left)
    {	      
      text = text.substring(1, text.length) + text.substring(0, 1);
    }
    else
    {
      text = text.substring(text.length - 1, text.length) + text.substring(0, text.length - 1);
    }
    this.scrolling_text.firstChild.nodeValue = text;
    
    var obj = this;
    this.timer = setTimeout(function(){obj.scroll();}, this.speed);
  }
}
