function writeFlashTags(movie,height,width,flashVars,alignment,wmode,menu,backgroundcolor,id,scale,embed) {
	//defaults
	wmode			= (wmode == undefined ? 'opaque' : wmode);
	menu			= (menu == undefined ? 'false' : menu);
	alignment		= (alignment == undefined ? 'false' : alignment);
	id				= (id == undefined ? 'false' : id);
	flashVars		= (flashVars == undefined ? '' : flashVars);
	backgroundcolor	= (backgroundcolor == undefined ? '' : backgroundcolor);
	scale			= (scale == undefined ? 'showAll' : scale);
	embed			= (embed == undefined ? 'false' : embed);

	if(id != false){
		var idAttribute = 'id="'+id+'"';
	} else {
		var idAttribute = '';
	}

	var classId = '';
	if(navigator.appVersion.toLowerCase().indexOf("msie")){
		//IE7 might act weird if this is not set...
		classId = 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ';
	}
	
	var HTML = '';
	HTML += '<object type="application/x-shockwave-flash" data="'+movie+'" width="'+width+'" height="'+height+'" '+idAttribute+'>';
	HTML += '	<param name="movie" value="'+movie+'" />';
	HTML += '	<param name="menu" value="'+menu+'" />';
	HTML += '	<param name="flashVars" value="' + flashVars + '" />';
	HTML += '	<param name="wmode" value="'+wmode+'" />';
	HTML += '	<param name="scale" value="'+scale+'" />';
	// If wmode is opaque and a backgroundcolor has been defined
	if(backgroundcolor != '' && wmode != 'transparent') {
		HTML += '	<param name="bgcolor" value="' + backgroundcolor + '" />';
	}
	HTML += '</' + 'object>';
	if(embed == true){
		return HTML;
	} else {
		document.write(HTML);
	}
}