     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=60; // 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(0,0,0); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div style="padding-left:10px;padding-right:10px;text-align:justify">'; //set opening tag, such as font declarations
fcontent[0]="<p><span class='heading'>&#8220;</span><img src='images/01.jpg' width='109' height='97' hspace='10' vspace='10' align='right' />I thought it would take me a long time to get back on my feet again after I was divorced but after Home Purchase Pros helped me get an FHA loan with my less than perfect credit I was ecstatic.  The sellers paid all of my closing costs so I did not need a great deal of cash to get the process rolling. I am so thankful to Home Purchase Pros for having made the whole experience such an easy one.<span class='heading'>&#8221;</span></p><p align='right'><strong>Vanessa James, LA</strong></p>";
fcontent[1]="<p><span class='heading'>&#8220;</span><img src='images/02.jpg' width='109' height='97' hspace='10' vspace='10' align='right' />I had always wanted to own my own home but never imagined it could or would really happen.  I was not sure about the whole loan process and was very hesitant.  After I realized how much money I had thrown away on rent already I decided to take the plunge and I must say that I was really surprised that it was not as bad as I though it would be.  Thank you home purchase pros for helping me buy my first home.<span class='heading'>&#8221;</span></p><p align='right'><strong>Mike Austin, CA</strong></p>";
fcontent[2]="<p><span class='heading'>&#8220;</span><img src='images/03.jpg' width='109' height='97' hspace='10' vspace='10' align='right' />I have owned a number of homes so needless to say I have been through the loan adventure many times but I must say and this is one of the reasons I feel it necessary to complement my experience with Home Purchase Pros by putting it into words.  Working with HPP’s is by far and beyond my expectations the best company I have ever worked with in getting a mortgage.  When it came to getting financing for a my new home mortgage their knowledge, unsurpassed professionalism, experience  and  a large variety of programs some of which even I was not even aware of  was none like I had ever seen before.  Another plus was that they helped with getting something off my credit report that I thought would never come off and should have not been on there in the first place.  Thank you so much and I will be back and refer you to any and everyone that needs financing.<span class='heading'>&#8221;</span></p><p align='right'><strong>John Abraham, MY</strong></p>";
fcontent[3]="<p><span class='heading'>&#8220;</span><img src='images/04.jpg' width='109' height='97' hspace='10' vspace='10' align='right' />It was such a pleasure to deal with a company that was honest, made getting a loan on our new home without any complications and also getting it closed so quickly.  I had dealt with other lending institutions before but none compare to Home Purchase Pros and what is really nice is that any time I had a question they were right there for me and they always answered the phone or at least got back with us right away.  Thank you so much!<span class='heading'>&#8221;</span></p><p align='right'><strong>Brad, FL</strong></p>";
fcontent[4]="<p><span class='heading'>&#8220;</span><img src='images/05.jpg' width='109' height='97' hspace='10' vspace='10' align='right' />Purchasing a new house was a dream my wife and I had for a long time.  We had been turned down before for a loan and got in touch with Home Purchase Pros through a referral and they suggested we apply for a FHA loan.  Well I have to tell you we could not believe it but we got approved and now own the home of our dreams.  We will only refer Home Purchase Pros for their excellence, experience and complete professionalism.<br>They also showed us how to get our credit scores higher which we were so grateful for.<span class='heading'>&#8221;</span></p><p align='right'><strong>Smak Leo, NY</strong></p>";
fcontent[5]="<p><span class='heading'>&#8220;</span><img src='images/06.jpg' width='109' height='97' hspace='10' vspace='10' align='right' />It is so wonderful to own my own home and I and so thankful to Home Purchase Pros for explaining everything to me is such a clear and simple way that even I could understand.  I have talked to other mortgage companies before but none could compare in any way.  The also helped me to get my credit scores higher which I had lost all hope for and this in turn helped me to qualify for my home.  Thank you so much!<span class='heading'>&#8221;</span></p><p align='right'><strong>Mike Austin, CA</strong></p>";
closetag='</div>';

var fwidth='270px'; //set scroller width
var fheight='150px'; //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 ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;


/*Rafael Raposo edited function*/
//function to change content
function changecontent(){
  if (index>=fcontent.length)
    index=0
  if (DOM2){
    document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
    document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (ie4)
    document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
  index++
}

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

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

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

/*Rafael Raposo's new function*/
function getstepcolor(step) {
  var diff
  var newcolor=new Array(3);
  for(var i=0;i<3;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 (ie4||DOM2)
  document.write('<div id="fscroller"></div>');

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