var time;
function img_show(i, el) {
	var d = document, pth = d[el].src, tmp;
	
	pth = pth.substring(0, pth.lastIndexOf('/') + 1);
	
	if (d.start == undefined) d.start = -1;
	
	if (d.start == i.length - 1) d.start = 0;
	else d.start++;
	
	if (d.getElementById) d.getElementById(el).src = pth + i[d.start];
	else if (d.images) d[el].src = pth + i[d.start];
	else return;
	
	// need to reset the quotes for image names
	tmp = i.toString();
	tmp = '["' + tmp.replace(/,/g, '","') + '"]';
	time = setTimeout('img_show(' + tmp + ',"' + el + '")', 5000);
	//time = setTimeout(img_show(i, el), 5000);
}

function adv_show() {
	clearInterval(time);
	
}