function switchImage(num)
{
  Element.setOpacity('imgbuffer', 1.0);
	$('imgbuffer').innerHTML = $('frontimage').innerHTML;
	new Ajax.Updater('frontimage', 'lib/lib.imageview.php?a=switch&src=index_'+num, {asynchronous:true, evalScripts:true, onComplete: updateImg(num)});
}
function updateImg(num){
	
	new Effect.Opacity('imgbuffer', { delay: 1.0,duration:2.0, from:1.0, to:0.0, queue: {position:'front', scope: 'imgscope', limit: 2}});
	if (num < 9) {
		var t=setTimeout('switchImage('+(num+1)+')',3500)
	} else {
		var t=setTimeout('switchImage(1)',3500)
	}
}
