var img1;
var img2;
var img3;
var img4;
var img5;
var i=0;

function fadeOut(obj) {
	if(window.navigator.appName=="Microsoft Internet Explorer") {
		obj.style.filter="blendTrans(duration=5)";
		obj.filters.blendTrans.Apply();
		obj.style.visibility="hidden";
		obj.filters.blendTrans.Play();
	}
}

function fadeIn(obj) {
	if(window.navigator.appName=="Microsoft Internet Explorer") {
		obj.style.filter="blendTrans(duration=3)";
		obj.filters.blendTrans.Apply();
		obj.style.visibility="visible";
		obj.filters.blendTrans.Play();
	}
}

function ChangeImage(obj, img)
{
	if (document.all) {
		obj.style.filter="blendTrans(duration=2)";
		obj.style.filter="blendTrans(duration=3)";
		obj.filters.blendTrans.Apply();
	}
	obj.src = img.src;

	if (document.all) {
		obj.filters.blendTrans.Play();
	}
}

function preLoadImages() {	
	img1=new Image;
	img2=new Image;
	img3=new Image;
	img4=new Image;
	img5=new Image;
	
	//Mobile Commerce Images
	img1.src="images/brch_ntfc.jpg";
	img2.src="images/mob_com4.jpg";
	
	//Internet & business Application Images
	img3.src="images/content_update.jpg";
	img4.src="images/mob_com5.jpg";
	img5.src="images/secureguru_awareness.gif";
	
}

function changeSet() {
	i=i+1;
	if(i>5) {
		i=0;
	}
	
	
	if(i==5) {
		document.ImgProduct.src=img5.src;
		document.ImgProduct.border=1;
		fadeOut(document.ImgProduct);
		fadeIn(document.ImgProduct);
		//ChangeImage(document.ImgProduct,img5);			
	}
	
	if(i==4) {	
		document.ImgProduct.src=img4.src;
		document.ImgProduct.border=1;
		document.ImgProduct.border=0;
		fadeOut(document.ImgProduct);
		fadeIn(document.ImgProduct);
		//ChangeImage(document.ImgProduct,img4);				
	}
	if(i==3) {
		document.ImgProduct.src=img3.src;
		document.ImgProduct.border=1;		
		fadeOut(document.ImgProduct);
		fadeIn(document.ImgProduct);	
		//ChangeImage(document.ImgProduct,img3);			
	}
	
	if(i==2) {
		document.ImgProduct.src=img2.src;
		document.ImgProduct.border=0;
		fadeOut(document.ImgProduct);
		fadeIn(document.ImgProduct);
		//ChangeImage(document.ImgProduct,img2);	
	}
	if(i==1) {
		document.ImgProduct.src=img1.src;
		document.ImgProduct.border=1;
		fadeOut(document.ImgProduct);
		fadeIn(document.ImgProduct);
		//ChangeImage(document.ImgProduct,img1);			
	}
}

function window_onload() {
	preLoadImages();
	i=0;
	//window.setInterval("changeSet()",5000);
	window.setInterval("changeSet()",5000);
	//window.setTimeOut("changeSet()",5000);
}


