// JavaScript Document

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

var fcontent=new Array();
begintag='<div style="font: italic 11px Arial; text-align:left; valign:middle; line-height:20px; padding: 0px;">'; //set opening tag, such as font declarations
fcontent[9]="‘Over the years he has been responsible for the production of thousands of homes and for relationships with literally hundreds of trade contractors and suppliers.’";
fcontent[10]="‘He has always held himself, and those around him, to high standards of excellence and integrity.’";
fcontent[11]="'His knowledge of land and home construction and his problem-solving abilities have been proven out time after time.’";
fcontent[12]="‘He has developed personal relationships and trust with city and county officials which have helped shortcut entitlement and other issues over the years.’";
fcontent[13]="`Rick is a natural leader. He is decisive, fair but firm and always bases his actions on his very high set of values.’";
fcontent[14]="‘When you hit an impasse, he just looks at people sitting around the table and says 'How can we make this a win-win? Just quit the bickering, and let’s make it work'.’";
fcontent[15]="‘There’s something about Rick that just makes you want to work for him. And you know what, if he gives you his word, he keeps it.’";
fcontent[16]="‘Holy moley! He makes you feel important.’";
fcontent[17]="‘Honest. Forthright. All of the qualities of the kind of person you want to deal with.’";
fcontent[18]="‘He knows everything from land purchase and entitlement through all phases of construction and ultimately dealing with the home buyer.’";
fcontent[19]="‘I think he’s in an ideal position to be working with the banks and the builders who have surplus stuff and want to know which way to go with it.’";
fcontent[0]="‘He has such a great approach to problem-solving that you never want to let him down.’";
fcontent[1]="‘He expects a lot from you. But he gives a lot back to you.’";
fcontent[2]="‘He listens. He thinks about his answer. And he solves things. That’s why Fieldstone threw him in the toughest situations to solve problems.’";
fcontent[3]="‘If I was a banker and knew nothing about construction, I can think of no guy I’d rather have than Rick sitting across the desk explaining it to me.’";
fcontent[4]="‘His word is his bond. He is very, very knowledgeable. He came up through the ranks. He’s a great problem solver.’";
fcontent[5]="‘If he picked the phone up at 2 in the morning and said I’ve got to meet you now out at a job site, I’d be there.’";
fcontent[6]="‘Anytime Rick Peters told you he was going to do something, it was done, and it was done well.’";
fcontent[7]="‘There are very few people like him, who when they shake your hand it’s as good as gold.’";
fcontent[8]="‘Very upfront. Very thorough. Results oriented. Everything that I dealt with him was always cordial, very thorough, and everything was resolved. One time shot – everything was done.’";

closetag='</div>';

var fwidth='168px'; //set scroller width
var fheight='175px'; //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" style="border:0px solid black;width:'+fwidth+';height:'+fheight+'"></div>');

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