// JavaScript Document

var delay = 8000; 
var maxsteps=30;
var stepdelay=80; 
var startcolor= new Array(255,255,255);
var endcolor=new Array(0,0,0);

var fcontent=new Array();
begintag='<div style="font: normal 14px Verdana, Arial, Helvetica, sans-serif; padding: 0px;">'; //set opening tag, such as font declarations

fcontent[0]="&quot;I was attracted to the King-Kong package by the amazing prices. When I set up my domains I received a great amount of help. Very professional company and I recommend to all. Thank you MonkeyWrench!&quot; <br><br>Luke B<br> <a href=\"http://12limited.co.uk\">12limited.co.uk</a> <img src=\"http://monkeywrenchhosting.com/images/flags/uk.gif\">";

fcontent[1]="&quot;In the past 6 years I have gone through a lot of turmoil with unreliable hosting companies. These guys are a nice change, as they are reliable, friendly and very open about any information on server status. The best bang for the buck I have seen so far.&quot; <br><br>Mario Rader<br><a href=\"http://emolife.net\">emolife.net</a> <img src=\"http://monkeywrenchhosting.com/images/flags/us.gif\">";

fcontent[2]="&quot;I was with other web hosting companies in the past and I always hated the down time and poor service. I searched around and found a reliable, powerful and cost-effective hosting solution. MonkeyWrench is the best hosting I could ever choose. They provide stunning customer support and 100% uptime. I recommend MonkeyWrench Hosting...<a href=\"testimonials.php\">»</a><br><br>Andy Paulson <img src=\"http://monkeywrenchhosting.com/images/flags/us.gif\">";

fcontent[3]="&quot;When looking for web hosting solutions, I found MonkeyWrench Hosting to be not only the most competitively priced, but also eager to help meet my needs as a dynamic small business. Their service is above and beyond what I have come to expect from competing hosting companies and made for a pleasent experience. A big thanks to Jonathan...<a href=\"testimonials.php\">»</a><br><br>Evan Bache <img src=\"http://monkeywrenchhosting.com/images/flags/ca.gif\">";

fcontent[4]="&quot;I went with Monkey Wrench because of the great value and quick response times I got with my pre-sales questions. I'm happy to report that the great service and support has continued in the many months I have been here. I will continue to recommend you to all my friends and family.&quot; <br><br>Joe Platz<br><a href=\"http://platzphoto.com\">platzphoto.com</a> <img src=\"http://monkeywrenchhosting.com/images/flags/us.gif\">";

fcontent[5]="&quot;We have been through many hosts and find that all the affordable hosts are here one day and gone the next. Along with the fact that their uptime is barely acceptable. MonkeyWrench on the other hand has been fantastic; the prices are extremely competitive and server uptime is second to none...<a href=\"testimonials.php\">»</a><br><br>Paul<br><a href=\"http://geelongforums.com\">geelongforums.com</a> <img src=\"http://monkeywrenchhosting.com/images/flags/au.gif\">";

fcontent[6]="&quot;I have been a customer for about 6-9 months and the service is excellent! It is cheap and reliable and customer support is very quick so you don't have to worry about your sites problems. The bandwidth and space has never been a problem always been below what i can use but for such a cheap price it's good to know...<a href='testimonials.php'>»</a>&quot; <br><br>Ellis Smith <img src=\"http://monkeywrenchhosting.com/images/flags/us.gif\">";

closetag='</div>';
var fwidth='100%';
var fheight='245px';
var fadelinks=1; 
var fadeimages=1;
var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;

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);
  }
}
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);
	
  }   
}

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