if (window.attachEvent) {
	window.attachEvent('onload', setUp);
}
else if (window.addEventListener) {
	window.addEventListener("load", setUp, false);
}

function setUp(){
	// check if DOM is available
	if(!document.getElementById || !document.createTextNode){return;}
	MM_preloadImages('images/tele_o.gif','images/tv_o.gif','images/internet_o.gif','images/about_o.gif','images/contact_o.gif');
	runSlideShow();
}

// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully
// Modified for additional text by Deb Schwartz, 7 Sigma Systems 3/14/2008

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;

// Duration of crossfade (seconds)
var crossFadeDuration = 3;

// Specify the image files
var Pic = new Array(); // don't touch this
// to add more images, just continue
// the pattern, adding to the arrays below

Pic[0] = 'images/bannerpic1.jpg';
Pic[1] = 'images/bannerpic2.jpg';
Pic[2] = 'images/km_WB-15_060409.gif';


var lnk = new Array();

lnk[0] = 'internet.html';
lnk[1] = 'television.html';
lnk[2] = 'longdistance.html';


var descrip = new Array();

descrip[0] = 'Surf as fast as you want';
descrip[1] = 'Digital entertainment for the entire family.';
descrip[2] = 'Choose the best plan for you and start saving!';


// =======================================
// do not edit anything below this line
// =======================================

var t;
var j = 0;
var p = Pic.length;

var preLoad = new Array();
for (i = 0; i < p; i++){
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i];
}

function runSlideShow(){
	var slideDescrip=document.getElementById('slideDescrip');
	var slideLink=document.getElementById('slideLink');
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)";
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply();
   }
   document.images.SlideShow.src = preLoad[j].src;
   slideDescrip.innerHTML = descrip[j];
   slideLink.href = lnk[j];
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
   }
   j = j + 1;
   if (j > (p-1)) j=0;
   t = setTimeout('runSlideShow()', slideShowSpeed);
}
