/***********************************************
* Fading Scroller- © 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 = 5000; //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(100,100,100); // start color (red, green, blue)
var endcolor=new Array(20,20,20); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div style="font: normal 13px Century Gothic,Arial; padding: 5px; background-color:#efefef; ">'; //set opening tag, such as font declarations
fcontent[0]="17.12.07 Many thanks and it has just been received, precisely 24 hours after placing the order. What excellent service, I would recommend you to anyone. Happy Christmas, Angela Shore";
fcontent[1]="My Jamaica hammock arrived today. Looks lovely! Thanks very much. Margaret";
fcontent[2]="Hi Caroline - thank you so much for your help and excellent service!!! I couldn't believe it when it all - including the right cushion - arrived at 8.30 this morning. What a brilliant service you run. I'll send you an email via your site - when I'm less rushed, which I would be happy for you to use as an endorsement. Thanks once again<br>Jane<br>P.S.I know - lazy monkey that she is - that my daughter is going to love it!<br>";
fcontent[3]="Hammock received.  Excellent service and thank you.  I am in Hammock heaven.  Never owned one before.  God knows why, they are just wonderful as well as elegant.  Used to be TV, now it's book, wine, cushions and off down the garden.  Great stuff! <br> Regards <br> Peter K ";
fcontent[4]="Thank you so much for this being done so fast <br> I would just like to say you have the best customer service I have encountered on the internet, and I shall be recommending your company to all my friends <br> Thanks again <br> Kate Mahon";
fcontent[5]="Hi - would just like to sat a big thank you!  My order arrived ontime.<br> I think the hammocks represent great value for money - they are good quality and the stand too - it was even easy to put together!<br>I spent all of Saturday in it - refusing to come out!  Pity it reained the rest of the weekend - looking forward to some more sunshine!<br>Thanks very much for a great service and great product.<br>Lorna  :-)...";
fcontent[6]="I would just like to thank you for your excellent hammock and excellent service. I ordered on Tuesday night and took delivery on Thursday morning at 9.30 am.  I have one slight problem, I can't get the kids off it so I can have a go !!!!<br>Would not hesitate to recommend Hammock Heaven ….<br>Many Thanks....<br>Ian Clarke<br>";
fcontent[7]="Just a note to say, order received and very  pleased with the products. Your service was efficient and rated high for customer satisfaction. I will mark your webpage as a 'favourite' and recommend to my family, friends and contacts.<br>	Yours FEBlack	";
fcontent[8]="Your lovely hammock arrived today!  Thank you.  It looks great hanging between two apple trees.  Long may the good weather last!<br>Best wishes,<br>Philippa Seale";
fcontent[9]="We are delighted with them. Your photos don't do them justice. As yesterday was sunny I spent most of the day in my hammock! <br> Thank you very much <br>Sarah-Jane";
fcontent[10]="Many thanks - I received the items yesterday and can't wait to give them to my husband for his birthday. Many thanks for such a smooth transaction<br>Kind regards<br>Catherine";
fcontent[11]="I am very impressed with your company so far.  The website is lovely, easy to use and you are able to see the products clearly.  The contact I have received from you has been excellent, and I will certainly recommend you. Kind regards<br>Heather ";
fcontent[12]=" Just a quick thank-you for swift delivery,  perfectly timed for a lazy day languishing in Easter holiday sunshine -  in a hammock ordered less than 24 hours prior to receipt.<br> As good as your word - will recommend to friends!<br>Theresa van Straten";
fcontent[13]="Hi Sara<br> We just want to send a great big 'THANK YOU' for its  prompt service and delivery.  We love our hammock -- extremely cozy and comfortable to relax and sleep in it...for hours!  We will definitely  recommend Hammock Heaven to others.<br> Thanks again!<br> Jacqueline & Stephan";
fcontent[14]="To all those at Hammock Heaven, <br> Thank you for you very prompt and courteous service, my brother, for whom the hammock was a gift for his 60th bithday,  received it on the day of his birthday and was delighted. All we need know is some pleasant  summer sun for him to enjoy it!  I guess that in your  power to deliver though!!";
fcontent[15]="Brilliant service yet again!  I brought my hammock from you a few years ago and you were brilliant then and I just ordered some replacement covers yesterday which arrived today.<br> Thank you!";
fcontent[16]="Hi Paul<br> My hammock arrived on Friday & I just wanted to say that I think it is fabulous - really good quality and the colours are beautiful. Often you take a bit of a punt when you order things on line but I am very impressed with your service & the hammock is better than I could have hoped. I put it up on our roof terrace at the weekend and the smartropes work perfectly. The  problem now is that my husband & I are fighting about who gets to sit in it!<br>thanks again<br> Victoria ";
fcontent[17]="Dear Team<br> I felt I should complement you on the wonderful products you sell and the personal customer service experience you offer.  I bought the hammock chair for my granddaughter last week and the quality is of a very high standard.  Delivery was prompt and when I needed to contact the office about the cushion which did not match, I was dealt with in a warm and efficient manner, receiving a replacement cover the very next day. Now all we need is for the sun to shine! I wish all companies would treat their customers as you do.  Thanks for the experience.  I will be back again soon to order a hammock for myself and will most certainly be recommending you to my friends.<br> Kind regards<br>
Karin Papps<br>23rd February ";
closetag='</div>';

var randomizecontents="yes" //randomize dislay order of images? "yes" or "no"
function shuffleit(){
return Math.floor((Math.random()*fcontent.length-1))
}

if (randomizecontents=="yes")
fcontent.sort(shuffleit)

var fwidth='400px'; //set scroller width
var fheight='250px'; //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
