function dwr(st) { document.write(st); }

function gebi(id) { return document.getElementById(id); }

var frames_time = 10000;
var frames_timer = 0;
var current_frame = 0;
var frames_name = '';

function play_frames(nm) {
	frames_name = nm;
	frames_tick();
}	

function frames_tick() {
	if (current_frame == 0) current_frame = 1;
	else {
		gebi(frames_name+current_frame).style.display = 'none';
		current_frame++;
		if (gebi(frames_name+current_frame) == undefined) current_frame = 1;
		gebi(frames_name+current_frame).style.display = '';
	}
	
	clearTimeout(frames_timer);
	frames_timer = setTimeout('frames_tick()',frames_time);
}