function write_flash(filename, w, h, param, transparent) {
	document.write('<object title="Click here to skip intro" align="middle" type="application/x-shockwave-flash" data="'+filename+'" Width="'+w+'" height="'+h+'">');
	document.write('<param name="movie" value="'+filename+'" />');
	document.write('<param name="FlashVars" value="'+param+'" />');
	if (transparent) {
		document.write('<param name="wmode" value="transparent" />');
	}
	document.write('</object>');
}

var citems = Array();
var cscroll_index = 0;
var cscroll_height = 51;
var cs;
var cscroll_timeout = 1;
var cpause_timeout = 5000; 

function setup_cscroller() {
	if ((cs = document.getElementById('info_scroll')) != null) {
		citems = cs.getElementsByTagName('DIV');
		if (citems.length > 0) {
			for (i=0; i<citems.length; i++) {
				citems[i].style.top = i * cscroll_height + "px";
				citems[i].style.display = 'block';
			}
			if (citems.length > 1) {
				setTimeout(cscroll, cscroll_timeout);
			}
		}
	}
}

function cpause() {
	setTimeout(cscroll , cpause_timeout);
}

function cscroll() {
	do_pause = false;
	for (i=0; i<citems.length; i++) {
		current_top = parseInt(citems[i].style.top);
		if (current_top < -cscroll_height) {
			citems[i].style.top = ((citems.length-1) * cscroll_height) + "px";
			current_top =  ((citems.length-1) * cscroll_height);
		}
		citems[i].style.top = (current_top - 1) + "px";
		if (current_top == 0) {
			do_pause = true;
		}
	}
	if (do_pause == true) {
		cpause();
	} else {
		setTimeout(cscroll, cscroll_timeout);
	}
}

window.onload = function() {
	setup_cscroller();
}