var delay = 10000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(255,255,255); // start color (red, green, blue)
var endcolor=new Array(255,255,255); // end color (red, green, blue)

var fcontent2=new Array();
begintag='<div  style="border: 0px solid #000000; text-align: left;width:204px;">';
//starttestimonial@@
/*fcontent2[0]='<div><div style="margin:0px auto;padding:2px 11px 2px 3px;float:left;position:relative;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;color:#4e4e4e;text-align:justify;">Master Del Pe’s Healthy Professionals Program brings broadness, depth and practicality which are rare to find in any wellness pr...</div><div style="margin:0px auto;padding:0px 11px 2px 9px !important;padding:2px 11px 2px 9px;float:right;position:relative;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;font-weight:bold;color:#008ecc;text-align:right;">- KS, Financial Investor , New Delhi, India</div></div>';
			fcontent2[1]='<div><div style="margin:0px auto;padding:2px 11px 2px 3px;float:left;position:relative;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;color:#4e4e4e;text-align:justify;">After 15 years of attending numerous leadership training sessions, I thought I had seen it all, but the GLOCEN Wisdom MBA workshop...</div><div style="margin:0px auto;padding:0px 11px 2px 9px !important;padding:2px 11px 2px 9px;float:right;position:relative;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;font-weight:bold;color:#008ecc;text-align:right;">- CEO, North Carolina , USA</div></div>';
			fcontent2[2]='<div><div style="margin:0px auto;padding:2px 11px 2px 3px;float:left;position:relative;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;color:#4e4e4e;text-align:justify;">When a company is going through important changes, it is necessary to strengthen its strategy with practical knowledge that can ef...</div><div style="margin:0px auto;padding:0px 11px 2px 9px !important;padding:2px 11px 2px 9px;float:right;position:relative;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;font-weight:bold;color:#008ecc;text-align:right;">- Monica Garcia, Human Resources Director, Colgate-Palmolive, Ecuador</div></div>';
			fcontent2[3]='<div><div style="margin:0px auto;padding:2px 11px 2px 3px;float:left;position:relative;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;color:#4e4e4e;text-align:justify;">Companies these days are in a marathon for success and sustainable growth. It is hard to manage and implement strategies without h...</div><div style="margin:0px auto;padding:0px 11px 2px 9px !important;padding:2px 11px 2px 9px;float:right;position:relative;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;line-height:18px;font-weight:bold;color:#008ecc;text-align:right;">- RL, CEO, North Carolina, USA</div></div>';
			
*/
var fcontent2 = new Array();
			fcontent2[0] = "<div><div class=\"left_text\">";
            fcontent2[0] += "Think benevolently<br/>Speak wisely<br/>Act fairly<br/>Work intelligently<br/>Share altruistically<br/>Serve selflessly<br/>Live moderately<br/>Success follows...<br/>Fulfillment thereafter";
			
			
			fcontent2[1] = "<div><div class=\"left_text\">";
            fcontent2[1] += "Will-power pulls people out of the past and pushes them to the future.";
			
			
			fcontent2[2] = "<div><div class=\"left_text\">";
            fcontent2[2] += "Mastery of the virtue of sacrifice is mastery of true leadership and greatness. It is the power behind greatness.";
			
			fcontent2[3] = "<div><div class=\"left_text\">";
            fcontent2[3] += "In the future, we will see that good health will be treasured and considered a priceless gift equal to professional success. It will be a demonstration and barometer of spiritual maturity and a high culture.";
			
			fcontent2[4] = "<div><div class=\"left_text\">";
            fcontent2[4] += "Mastery of the virtue of sacrifice is mastery of true leadership and greatness. It is the power behind greatness.";
			
			fcontent2[5] = "<div><div class=\"left_text\">";
            fcontent2[5] += "In the future, we will see that good health will be treasured and considered a priceless gift equal to professional success. It will be a demonstration and barometer of spiritual maturity and a high culture.";
			
			fcontent2[6] = "<div><div class=\"left_text\">";
            fcontent2[6] += "Knowledge through the mind brings success. Wisdom through virtues brings fulfillment.";
			
			fcontent2[7] = "<div><div class=\"left_text\">";
            fcontent2[7] += "Nurture others with positive, truthful words. Do it every day. This is one of the most obvious qualities of the most beloved people. ";
			
			fcontent2[8] = "<div><div class=\"left_text\">";
            fcontent2[8] += "People who will be enduringly wealthy or who will sustain their abundance will be those who practice altruism. This is the key to sustained prosperity, and it is the formula for good luck and entitlement.";
			
			fcontent2[9] = "<div><div class=\"left_text\">";
            fcontent2[9] += "Real discipline takes into account the right virtue and process to achieve the best results.";
			
			fcontent2[10] = "<div><div class=\"left_text\">";
            fcontent2[10] += "The virtue of objectivity and practicality increases your ability to produce great results with certainty and converts your efficiency to effectiveness.";
			
			fcontent2[11] = "<div><div class=\"left_text\">";
            fcontent2[11] += "The greatest leader of leaders in the world will be those with the heart of Mother Teresa, the mind of Albert Einstein, the will power of Mahatma Gandhi and the philanthropic capabilities of Bill Gates.";
			
			fcontent2[12] = "<div><div class=\"left_text\">";
            fcontent2[12] += "Greater powers are permanently achieved through the virtues of benevolence and harmlessness. When you have attained a level where even if you are pushed to your limits, you will not misuse power, then true personal powers are at your disposal.";
			
			fcontent2[13] = "<div><div class=\"left_text\">";
            fcontent2[13] += "The real freedom is not in being independent from your need of others, but in knowing that your life exists because of others.";
			
			
			

//endtestimonial@@
closetag='</div>';

var fwidth='180px'; //set scroller width
var fheight='120px'; //set scroller height

var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////


var iee4=document.all&&!document.getElementById;
var DOM1=document.getElementById;
var faderdelay=0;
var index1=0;


/*Rafael Raposo edited function*/
//function to change content
function changecontent2(){
  if (index1>=fcontent2.length)
    index1=0
  if (DOM1){
    document.getElementById("fscroller1").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
    document.getElementById("fscroller1").innerHTML=begintag+fcontent2[index1]+closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (iee4)
    document.all.fscroller1.innerHTML=begintag+fcontent2[index1]+closetag;
  index1++
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

function linkcolorchange(step){
  var obj=document.getElementById("fscroller1").getElementsByTagName("A");
  if (obj.length>0){
    for (i=0;i<obj.length;i++)
      obj[i].style.color=getstepcolor(step);
  }
}

/*Rafael Raposo edited function*/
var fadecounter2;
function colorfade(step) {
  if(step<=maxsteps) {	
    document.getElementById("fscroller1").style.color=getstepcolor(step);
    if (fadelinks)
      linkcolorchange(step);
    step++;
    fadecounter2=setTimeout("colorfade("+step+")",stepdelay);
  }else{
    clearTimeout(fadecounter2);
    document.getElementById("fscroller1").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
    setTimeout("changecontent();changecontent2()", delay);
	
  }   
}

/*Rafael Raposo's new function*/
function getstepcolor(step) {
  var diff
  var newcolor=new Array(13);
  for(var i=0;i<13;i++) {
    diff = (startcolor[i]-endcolor[i]);
    if(diff > 0) {
      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
    } else {
      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
    }
  }
  return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}

if (iee4||DOM1)
  document.write('<div id="fscroller1" style="border:0 solid black;width:140;height:'+fheight+'"></div>');

if (window.addEventListener)
window.addEventListener("load", changecontent2, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent2)
else if (document.getElementById)
window.onload=changecontent2