var p1="/UploadFiles/flash/";
var p2=".jpg";
function run(bFirst){
	old_step = step;
	step = (step<(imgnub-1))?(step+1):0;
	oldimg = $('#coverpic_'+old_step);
	newimg = $('#coverpic_'+step);
	oldimg.css('zIndex',2);
	if(newimg.size()<=0)
	{
		$('#cover_box').append('<img id="coverpic_'+step+'" class="index_cover_img" width="969" height="300" border="0" src="/UploadFiles/flash/'+step+'.jpg" style="z-index:1;display:none;" onload="loadok(this)"/>');
		newimg = $('#coverpic_'+step);
	}
	else
	{
		newimg.css('zIndex',1);
	}
	var before = 3000;
	if(bFirst)before = 1000;
	setTimeout(
		"switchImg()", 
		before);
}
function switchImg()
{
	if(newimg.attr('ok')=='1')
	{
		newimg.fadeIn(1000);
		oldimg.fadeOut(1000);
		setTimeout(function(){run();}, 1000);
	}
	else
	{
		setTimeout("switchImg()", 1000);
	}
}
run(true);

