current1 = 1;
current2 = 2;
current3 = 8;
cimg = 1;
nimg = 1;
maximges = 26;
maxlocs = 3;
nextimg = 4;

function loopSlide()
{
	random = Math.ceil(Math.random() * maximges);
	if(cimg==1) while (random == current1 || random == current2 || random == current3) random = Math.ceil(Math.random() * maximges);
	if(cimg==2) while (random == current1 || random == current2 || random == current3) random = Math.ceil(Math.random() * maximges);
	if(cimg==3) while (random == current1 || random == current2 || random == current3) random = Math.ceil(Math.random() * maximges);
	
	if(cimg==1) current1 = random;
	if(cimg==2) current2 = random;
	if(cimg==3) current3 = random;

	if(ie5xwin) {
		document.images['cimg'+cimg].style.filter="blendTrans(duration=2)";
		document.images['cimg'+cimg].filters.blendTrans.Apply();
		document.images['cimg'+cimg].src = '/images/template/rpc/splash-img'+random+'.jpg';
		document.images['cimg'+cimg].filters.blendTrans.Play();
	}
	else 
		document.images['cimg'+cimg].src = '/images/template/rpc/splash-img'+random+'.jpg';

	while (nimg == cimg) nimg = Math.ceil(Math.random() * maxlocs);
	cimg=nimg;
	nextimg=nextimg+1;
	if(nextimg>maximges) nextimg=1;
	setTimeout('loopSlide()', 2500);
	
}

function loopSlide2()
{
	if(current1==3) current1=2;
	else current1=3;
	document.images['cimg1'].style.filter="blendTrans(duration=3)";
	document.images['cimg1'].filters.blendTrans.Apply();
	document.images['cimg1'].src = '/upload/Image/banners/banner'+current1+'.jpg';
	document.images['cimg1'].filters.blendTrans.Play();
	setTimeout('loopSlide2()', 6500);

}

var d, dom, ie, ie4, ie5x, moz, mac, win, lin, old, ie5mac, ie5xwin, op;
d = document; n = navigator; na = n.appVersion; nua = n.userAgent; win = ( na.indexOf( 'Win' ) != -1 ); mac = ( na.indexOf( 'Mac' ) != -1 ); 
lin = ( nua.indexOf( 'Linux' ) != -1 );
if ( !d.layers ){
	dom = ( d.getElementById );
	ie5x = ( d.all && dom );
	ie5xwin = ( win && ie5x );
}