

var bgimages = new Array();
bgimages[0] = "../images/header_1400x368_a.jpg";
bgimages[1] = "../images/header_1400x368_b.jpg";
bgimages[2] = "../images/header_1400x368_c.jpg";
bgimages[3] = "../images/header_1400x368.jpg";

var msg = new Array();
msg[0] = "<h1>Networking, Server, and Telecom hardware from the leading manufacturers</h1>";
msg[1] = "<h1>Full configuration capabilities <br />with a choice of service options</h1>";
msg[2] = "<h1>Top quality products at the <br />best price with uncompromised service and support</h1> ";
msg[3] = "<h1>Welcome to a<br />Profitable Alternative to Traditional Distribution</h1>";


//preload images
var pathToImg = new Array();

for (i = 0; i < bgimages.length; i++ ) {
  pathToImg[i]=new Image();
  pathToImg[i].src=bgimages[i];
}

var inc=-1;

function bgSlide()
{
  if (inc<bgimages.length-1){
    inc++;
  } else{
    inc=0;
    }
  var newImage = "url("+ pathToImg[inc].src +")";
  document.getElementById("header").style.background = newImage;
  document.getElementById("header").style.backgroundPosition = "center"; 
  document.getElementById("header").style.backgroundRepeat = "no-repeat"; 
  document.getElementById("message").innerHTML = msg[inc] ;
	
  }

if (document.all||document.getElementById){
  window.onload=new Function('setInterval("bgSlide()",5000)');
}