var movieURL = "";

function drawFlash(movie, width, height, background, transparent) {
	document.write(generateFlash(movie, width, height, background, transparent));
}

function generateFlash(movie, width, height, background, transparent) {
	var output = "";
	output += "<object id='flash_" + movie + "' type='application/x-shockwave-flash' data='" + movie + "' width='" + width + "' height='" + height + "' allowFullScreen='true'>";
	output += "<param name='movie' value='" + movie + "' />";
	output += "<param name='bgcolor' value='" + background + "' />";
	output += "<param name='allowFullScreen' value='true' />";
	if(transparent) {
		output += "<param name='wmode' value='transparent' />";
	}
	output += "</object>";
	return output;
}

function resizeFlash(id, newWidth, newHeight) {
	var obj = document.getElementById(id);
	obj.width = newWidth;
	obj.height = newHeight;
}

function init() {
}

function finish(type) {
	var movie = document.getElementById("movie");
	movie.innerHTML = generateFlash("http://dev.flashlabs.eu/extensions/swf/advertisement.swf", 600, 400, "#FFFFFF", true);
	if(type == "faq") {}
}

function replay() {
	var movie = document.getElementById("movie");
	movie.innerHTML = generateFlash(movieURL, 600, 400, "#FFFFFF", true);
}

function refresh() {
	location.reload();
}
