var panecount = 0, tmpPane, sitestart=0, flow, im;
var speed = 5, resumespeed = 6000, startspeed = 10;
function pane() {
	im = new Array();
	flow = new Array();
	tmpPane = new Array();
	loadImages();
	showPane(0);
	//setTimeout("showPane(1)", 1000 + Math.floor(Math.random() * 800));
}
function loadImages() {
	l = big_image.length;
	_big_image = new Array();
	for(i=0;i<l;i++) {
		_big_image[i] = new Image();
		_big_image[i].src = big_image[i];
	}
}
function showPane(wich) {
	flow[wich] = true;
	
	im[wich] = document.getElementById("pane" + wich);
	
	//index = Math.floor(Math.random() * big_image.length);
	
	im[wich].src = _big_image[panecount].src;
	
	im[wich].style.zIndex = 0;
	im[wich].style.opacity = 0;
	im[wich].style.filter = "alpha(opacity=0)";
	
	im[wich].style.display = "block";
	
	
	tmpPane[wich] = setInterval("showPane2(" + wich + ")", speed);
	panecount++;
	if(!big_image[panecount]) {
		panecount = 0;
	}
}
var paneSpeed = 7;
function resume(wich) {
	tmpPane[wich] = setInterval("showPane2(" + wich + ")", speed);
}
function showPane2(wich) {
	o = parseFloat(im[wich].style.opacity);
	o = o * 100;
	
	if(flow[wich]) {
		o = o + paneSpeed;
		if(o >= 100) {
			o = 100;
			flow[wich] = false;
			clearInterval(tmpPane[wich]);
			if(big_image.length > 1) {
				setTimeout("resume(" + wich +")", resumespeed);
			}
		}
	} else {
		o = o - paneSpeed;
		if(o<=0) {
			im[wich].style.display = "none";
			clearInterval(tmpPane[wich]);
			flow[wich] = true;
			setTimeout("showPane(" + wich + ")", Math.floor(Math.random() * startspeed));
		}
	}
	im[wich].style.opacity = o/100;
	im[wich].style.filter = "alpha(opacity=" + o+ ")";
}
var panecount = 0, tmpPane, sitestart=0, flow, im;
var speed = 10, resumespeed = 4000, startspeed = 10;
function pane() {
	im = new Array();
	flow = new Array();
	tmpPane = new Array();
	loadImages();
	showPane(0);
	//setTimeout("showPane(1)", 1000 + Math.floor(Math.random() * 800));
}
function loadImages() {
	l = big_image.length;
	_big_image = new Array();
	for(i=0;i<l;i++) {
		_big_image[i] = new Image();
		_big_image[i].src = big_image[i];
	}
}
function showPane(wich) {
	flow[wich] = true;
	
	im[wich] = document.getElementById("pane" + wich);
	
	//index = Math.floor(Math.random() * big_image.length);
	
	im[wich].src = _big_image[panecount].src;
	
	im[wich].style.zIndex = 0;
	im[wich].style.opacity = 0;
	im[wich].style.filter = "alpha(opacity=0)";
	
	im[wich].style.display = "block";
	
	
	tmpPane[wich] = setInterval("showPane2(" + wich + ")", speed);
	panecount++;
	if(!big_image[panecount]) {
		panecount = 0;
	}
}
var paneSpeed = 7;
function resume(wich) {
	tmpPane[wich] = setInterval("showPane2(" + wich + ")", speed);
}
function showPane2(wich) {
	o = parseFloat(im[wich].style.opacity);
	o = o * 100;
	
	if(flow[wich]) {
		o = o + paneSpeed;
		if(o >= 100) {
			o = 100;
			flow[wich] = false;
			clearInterval(tmpPane[wich]);
			if(big_image.length > 1) {
				setTimeout("resume(" + wich +")", resumespeed);
			}
		}
	} else {
		o = o - paneSpeed;
		if(o<=0) {
			im[wich].style.display = "none";
			clearInterval(tmpPane[wich]);
			flow[wich] = true;
			setTimeout("showPane(" + wich + ")", Math.floor(Math.random() * startspeed));
		}
	}
	im[wich].style.opacity = o/100;
	im[wich].style.filter = "alpha(opacity=" + o+ ")";
}
