// JavaScript Document
/***********************************************
© deens document at DHTML 2004 - 2005
***********************************************/
var delay = 12000; //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 (red, green, blue)
var endcolor=new Array(0,51,102); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div style="font: normal 10px Tahoma; padding: 1px;">'; //set opening tag, such as font declarations
fcontent[0]="<b>Mitac Mio168</b><br><br>The best advice given anywhere, good prices, system works fine. <br>Thank you all <br><br><b>William Mack,&nbsp; <br>Cambridgeshire</b>";
fcontent[1]="<b>Thank you....</b><br><br>Ipaq rx3715 with tomtom<br>Just recently purchased above. Very quick delivery and help by email really good. <br>Solves any probs quickly and effectively.<br><br> <b>Cheryl Sleath </b>";
fcontent[2]="<b>IPAQ with Tom Tom</b><br><br>Handtec were brilliant , fast and reliable service and the product package was excellant.<br><br><b>Sean <br><br>Eastbourne</b>";
fcontent[3]="<b>Excellent Service </b><br><br>Equipment received as described and very quickly.<br><br>I had a minor problem 6 months later was dealt with very efficiently and the staff are very helpful.<br><br>A highly recommended organisation.<br><br><b>Neil Turner,&nbsp; <br> Leeds, Yorkshire</b>";
fcontent[4]="<b>Great!!!.. </b><br><br>Leadtek 9553<br><br>Handtec has great service even before I ordered my item! Delivery was great and on time. Will definately recommend to other people!<br> <br><b>A. Panchal ,&nbsp; Lancashire</b>";
fcontent[5]="<b>Tomtom 5 </b><br><br>Many thanks to the team.  It is nice to find another company that go the extra mile when it comes to customer service.<br><br>The Tomtom 5 is everything it says it is; very impressive, almost as good as Handtec's service!<br><br>Keep it up guys!  I will be back for more & will be telling all my friends to do the same. <br><br>Many Thanks <br><br><b>Dave Slater,&nbsp; Macclesfield</b>";
fcontent[6]="<b>TomTom Go 500.. </b><br><br>Brilliant service! Checked on other sites and this product wasnt due for another week. Phoned Handtec to see if they'd got it wrong but was told that it was already on route and would be with me before five pm. <br><br>Sure enough, it arrive at two!<br> <br><b>Mark ,&nbsp; Leicester</b>";
fcontent[7]="<b>Ipaq sat nav Bundle </b><br><br>No crap customer service, handtec understands its customers needs and cares accordingly.<br><br>Top Stuff !! <br><br><b>Sam K ,&nbsp;<br> Birmingham</b>";
fcontent[8]="<b>Thank you.. </b><br><br>I was not able to setup my GPS on my Ipaq<br><br>Handtec took the time to explain to me how to operate the system and installing all the features<br><br>Thank you <br><br><b>Diane Everton,&nbsp; Swansea</b>";
fcontent[9]="<b>Leadtek Sirf receiver for Palm</b><br><br>Fast Delivery,Excellent communication,<br>Had minor problem,Item replaced in LESS THAN 48 HOURS.<br>First Class Company and Support team  <br> Many Thanks to you all<br><br><b>David Gilson <br> Ipswich</b>";
fcontent[10]="<b>Navman 510</b><br><br>Very good, ordered on internet received with in day and half service first class will deal with them again, would advise anyone to try an beat their prices <br><br><b>Chris Lawton,&nbsp; Milton Keynes</b>";
fcontent[11]="<b>TomTom Navigater 5 and Bluetooth reciever</b><br><br>between you and me i love your customer service with pleasure and ease <br>thanks once again<br><br><b>Andrew Jackson,&nbsp;<br>London</b>";
fcontent[12]="<b>Ipaq Sync/Charger Lead</b><br><br>Excellent, Fast Service.  Easy to order online and the correct item turned up on time within the 3 day delivery time. Very Good service will us them again <br><br><b>Jonathan Tasker,&nbsp; <br>Leicestershire</b>";
fcontent[13]="<b>Great Service..</b><br><br>Recieved a warm welcome from handtec with my enquiry!<br><br>My product was delivered on time and was working within minutes of delivery<br><br>Thank you <br><br><b>Pete Simpson,&nbsp; London</b>";
fcontent[14]="<b>TomTom Go 300.. </b><br><br>An outstanding product with all the latest features. Handtec deliver excellent delivery services, guaranteed next day if placed by 2:30.<br><br><b>WOW.</b><br> <br><b>Mark Duneavand ,&nbsp; London</b>";
fcontent[15]="<b>Navman 650.. </b><br><br><b>The best service I have ever recieved from an internet shopping.</b><br><br>First time a company delivered something within 17hours!!<br><br> I phoned yesterday at 4PM to other sites but nobody would deliver it next day. <br> Initially I thought it would be the same 'FOBBING OFF' business like others. But the Navman650 arrived at 9.00AM!! <br> <br><b>Ashraf Shaheen ,&nbsp; London</b>";



closetag='</div>';

var fwidth='125px'; //set scroller width
var fheight='210px'; //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++
}


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
