/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Lee Underwood :: http://javascript.internet.com/ */

var bannerImg = new Array();
  // Enter the names of the images below
  bannerImg[0]="/Portals/56151/background/protection_ad.jpg";
  bannerImg[1]="/Portals/56151/background/detect_ad.jpg";
  bannerImg[2]="/Portals/56151/background/smooth_ad.jpg";
  bannerImg[3]="/Portals/56151/background/ondemand_ad.jpg";
  bannerImg[4]="/Portals/56151/background/retail_ad.jpg";

var bannerLink = new Array();
  // Enter the names of the images below
  bannerLink[0]="/outsourced-it/data-protection/";
  bannerLink[1]="/outsourced-it/managed-security/";
  bannerLink[2]="/outsourced-it/why-managed-services-/";
  bannerLink[3]="/ondemand-services/";
  bannerLink[4]="/retail-store/";
var newBanner = 0;
var totalBan = bannerImg.length;

function cycleBan() {
  var temper = document.getElementById("banner_img");
  if(temper != null){
	   newBanner++;
	   if (newBanner == totalBan) {
		 newBanner = 0;
	   }
	   temper.src=bannerImg[newBanner];
	   temper.onclick=function(){
			document.location.href = bannerLink[newBanner];   
	   }
	   //alert(temper.src);
	   // set the time below for length of image display
	   // i.e., "4*1000" is 4 seconds
	   setTimeout("cycleBan()", 4*1000);
  }
}
window.onload=cycleBan;

