var text = new Array();
text[0] = "A Safe &amp; Secure<br>Space In A<br>Central Location";
text[1] = "Fully Manned<br>40ft Lorry<br>Loading Bay";
text[2] = "<b>Free</b> Compactor<br>&amp; Waste<br>Disposal Unit";
text[3] = "<b>Free</b> Forklift<br>&amp; Pallet Truck<br>Usage";
text[4] = "Free<br>Car Parking<br>Space";
text[5] = "3 Tonne (x1) Lift<br>1 Tonne (x1) Lift<br>Passenger (x1) Lift";

var i = 0;
var hex = 255;

function dispText() {
  if(i == text.length - 1) i = 0;
  else i++;
  hex = 255 ;
  fadeOut();
}

setInterval("dispText()", 4000);

function fadeOut(){
  if(hex>155) {
    hex-=10;
    document.getElementById("whybox").style.color="rgb("+hex+","+hex+","+hex+")";
    setTimeout("fadeOut()",50); 
  }
  else { 
    setTimeout("newText()",50);
  }
}

function newText() {
    document.getElementById("whybox").innerHTML = text[i];
    fadeIn();
}

function fadeIn(){ 
  if(hex<255) {
    hex+=10;
    document.getElementById("whybox").style.color="rgb("+hex+","+hex+","+hex+")";
    setTimeout("fadeIn()",50); 
  }
  else {
    document.getElementById("whybox").style.color="rgb(255,255,255)";
  }
}
