// JavaScript Document
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 2000

// Duration of crossfade (seconds)
var crossFadeDuration = 2
<!--
var ads = new Array(
	'images/banner01.jpg',
	'images/banner02.jpg',
	'images/banner03.jpg'
    )

var linkx = new Array(
     'http://www.currentware.com/page-content.php?prid=1',
	'http://www.currentware.com/page-content.php?prid=2',
	'http://www.currentware.com/page-content.php?prid=3'
	);

var old1 = 0;
var current1 = 0;
var t =0

var j = 0

var p = ads.length

/*var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = ads[i]
   }
*/
function adinit()
{
	if (screen.height >= 768 && screen.width >= 1024) {
//document.write();
if (document.images)
	{
		newad();
		 if (document.all){
      document.images.ad.style.filter="blendTrans(duration=2)"
      document.images.ad.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.ad.filters.blendTrans.Apply()      
   }
		document.images['ad'].src = ads[current1];
		
	//	 document.images.ad.src = preLoad[current1].src
   if (document.all){
      document.images.ad.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
  // t = setTimeout('runSlideShow()', slideShowSpeed)
		setTimeout('adinit()',10000);
	}
	
}
else {
if (screen.height == 600 && screen.width == 800) {
if (document.images)
	{
		newad();
		 if (document.all){
      document.images.ad.style.filter="blendTrans(duration=2)"
      document.images.ad.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.ad.filters.blendTrans.Apply()      
   }
		document.images['ad'].src = ads[current1];
		  if (document.all){
      document.images.ad.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
  // t = setTimeout('runSlideShow()', slideShowSpeed)
		setTimeout('adinit()',10000);
	}
	
}
else {
if (document.images)
	{
		newad();
		document.images['ad'].src = ads[current1];
		setTimeout('adinit()',10000);
	}
   }
}


}

function newad()
{
	current1 = Math.floor(Math.random()*ads.length);
	while (current1 == old1)
	{
		current1 = Math.floor(Math.random()*ads.length);
	}
	old1 = current1; 
}

function runSlideShow(){
   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
   document.images.SlideShow.src = ads[j]
   
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function sendlink()
{
	//window.open(linkx[current1],'Ad','800,600,toolbar=1,resizable=1') 

location.href = linkx[current1];
}

// -->

