var speed = 4000;
var speedclicked = 4000;
var t;
var x;
var j = -1;
var p = 0;
function runSlideShow(){
	pic_move(1,true);
	t = setTimeout('runSlideShow()', speed);
}
function pic_move(add,doTransition){

	if(p > 1){
		j = j + add;
		if (j < 0){
			j = (p - 1);
		}else{
			if (j >= p){
				j=0;
			}
		}
		
		x = x + add;
		if (x < 0){
			x = (p - 1);
		}else{
			if (x >= p){
				x=0;
			}
		}
		
		if (document.all && doTransition){
			document.images.SlideShow.style.filter="blendTrans(duration=1)";
			document.images.SlideShow.filters.blendTrans.Apply();
			document.images.SlideShow2.style.filter="blendTrans(duration=1)";
			document.images.SlideShow2.filters.blendTrans.Apply();
		}
		document.images.SlideShow.src = preLoad[j].src;
		document.images.SlideShow2.src = preLoad[x].src;
		if (document.all && doTransition){
			document.images.SlideShow.filters.blendTrans.Play();
			document.images.SlideShow2.filters.blendTrans.Play();
		}
	}
}
function pic(add){
	pic_move(add,false);
	window.clearTimeout(t);
	t = setTimeout('runSlideShow()', speedclicked);
}

function openSponsor(x){
	if (Linksxx[x] == '') {
	} else {
		window.open(Linksxx[x]);
	}
}