<!--
/***********************************************
* Fading Scroller- &#169; Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var delay = 8000; //set delay between message change (in miliseconds)
var maxsteps=30; // 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(255,255,255); // start color (white)
var endcolor=new Array(113,109,91); // end color (dark green)
var fcontent=new Array();
begintag='<div style="font: normal 9pt Arial; padding: 0px;">'; //set opening tag, such as font declarations

fcontent[0]="I LOVE downtown Franklin with all my heart...  Hearts and Hands is one place I know I'll find truly friendly folks and an atmosphere that makes me WANT to linger.  Not to mention the fabulous merchandise... <i>-- Jill, Franklin</i>";
fcontent[1]="I love visiting your store. There are always new and different things to see. My favorite birthday present to give are the church babies. Everyone loves receiving them, and playing with them during a sermon! <i>-- Maggie S., Franklin</i>";
fcontent[2]="Every time we come to TN to see our daughter and her husband we stop in to see what's new. Love your store! <i>-- Dawn R.</i>";
fcontent[3]="I love this place. All of the handmade items....cats, pillows, candles, jewelry. The list could go on and on. <i>-- Susie S., Westmoreland</i>";
fcontent[4]="I lovvve Heart &amp; Hands &amp; come through every couple of weeks with my sister. We agree that we'd much rather buy a gift from among your TN treasures than something at a department store or imported gift shop. <i>-- Jane G., Franklin</i>";
fcontent[5]="It's always a pleasure to see things that are original, that I won't see in any other store! <i>-- Janice B.</i>";
fcontent[6]="I live in Chatt. &amp; try to get to your store once a quarter. I love handmade items &amp; always find something when I come there. I have brought several of my friends &amp; all out of town women who like the hand made items... <i>-- Cindy O., Ooltewah</i>";
fcontent[7]="I look forward to my visits to your shop . . .I love to shop with you.  Living in Indiana does limit my visits however. <i>-- Becky B.</i>";
fcontent[8]="I visit my sister Marta often... I always visit your store, have bought many important baby gifts there. I love to get my Christmas gifts at your store, they are so special! Heart and Hands is always on my must visit list while in Franklin. <i>-- Kathy W.</i>";
fcontent[9]="I shopped at your store a few years ago and really loved it!  I especially like the angel dolls by Sandra Thomas! <i>-- Dee Austin TX</i>";
fcontent[10]="My husband and I love your store. Our 24 hr open kitchen heart plaque hangs proudly... We also love the beautiful fabric angel doll... They're more special to us because they're made by local TN artisans. <i>-- Janice H., Mount Juliet</i>";

closetag='</div>';

var fwidth='140px'; //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" 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
-->