/*
Initialize a flash object. This function is a workaround used so the HTML code validates.
(There is not really a nice way to include flash cross-browser compatible and validating)
*/
function cms_flash_init(aFile, w, h, t, params) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'" title="'+t+'">');
	document.write('<param name="movie" value="'+aFile+'">');
	for (i in params) {
		document.write('<param name="'+i+'" value="'+params[i]+'">');
	}
	document.write('<embed src="'+aFile+'"');
	for (i in params) {
		document.write(' '+i+'="'+params[i]+'"');
	}
	document.write(' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'">');
	document.write('</embed>');
	document.write('</object>');
}

function cms_flash_init_video(aFile, w, h, t, params, aId) {
	// NOTE: This code is shared with WSNLinks
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'" align="middle" title="'+t+'"');
	if (aId) document.write(' id="'+aId+'"');
	document.write('>');
	document.write('<param name="allowScriptAccess" value="sameDomain">');
	document.write('<param name="movie" value="'+aFile+'">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="allowFullScreen" value="true">');
	document.write('<embed src="'+aFile+'" quality="high" width="'+w+'" height="'+h+'" name="ploneskin" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" allowFullScreen="true">');
	document.write('</object>');
}

