function generateFlashBanner(bannerSrc, bannerWidth, bannerHeight){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+bannerWidth+'" height="'+bannerHeight+'">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="movie" value="'+bannerSrc+'" />');
	document.write('<param name="quality" value="high" />');
	document.write('<embed src="'+bannerSrc+'" quality="high" width="'+bannerWidth+'" height="'+bannerHeight+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.write('</object>');
}



function generateMediaPlayer(playerUrl, playerId, width, height, showStatusBar, showControls, autoStart, uiMode){
	mediaPlayer(playerUrl, playerId, width, height, showStatusBar, showControls, autoStart, uiMode);
}


function mediaPlayer(playerUrl, playerId, width, height, showStatusBar, showControls, autoStart, uiMode){
	var ieShowControls = (showControls == 1) ? "true" : "false";
	var ieShowStatusBar = (showStatusBar == 1) ? "true" : "false";
	var ieAutoStart = (autoStart == 1) ? "true" : "false";
	document.write('<object ');
	document.write('	classid ="clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" ');
	document.write('	id ="'+playerId+'" ');
	document.write('	align="middle" ');
	document.write('	width="'+width+'" ');
	document.write('	height="'+height+'"');
	document.write('	>');
	document.write('	<param name="url" value="'+playerUrl+'">');
	document.write('	<param name="showcontrols" value="'+ieShowControls+'">');
	document.write('	<param name="showstatusbar" value="'+ieShowStatusBar+'">');
	document.write('	<param name="invokeURLs" value="false">');
	document.write('	<param name="autostart" value="'+ieAutoStart+'">');
	if (uiMode != '0'){
		document.write('	<param name="uiMode" value="'+uiMode+'">');
	}
	document.write('	<embed 	type="application/x-mplayer2" ');
	document.write('		pluginspage = "http://www.microsoft.com/windows/mediaplayer/" ');
	document.write('		name="'+playerId+'" ');
	document.write('		src="'+playerUrl+'" ');
	document.write('		width="'+width+'" ');
	document.write('		height="'+height+'" ');
	document.write('		showstatusbar="'+showStatusBar+'" ');
	document.write('		showcontrols="'+showControls+'" ');
	document.write('		autostart="'+autoStart+'"');
	document.write('		>');
	document.write('	</embed>');
	document.write('</object>');
}


function showFlash(flashSrc, flashWidth, flashHeight, flashId, wmode, zIndex){
	if (!flashId){
		flashId = 'standardFlashObject';
	}
	if (!wmode){
		wmode = 'opaque';
	}
	if (!zIndex){
		zIndex = '1';
	}
	var flashHTML = '';
	flashHTML += '<object style="z-index:'+zIndex+';" id="'+flashId+'" type="application/x-shockwave-flash" data="'+flashSrc+'" width="'+flashWidth+'" height="'+flashHeight+'">\n';
	flashHTML += ' <param name="allowScriptAccess" value="sameDomain" />\n';
	flashHTML += ' <param name="movie" value="'+flashSrc+'" />\n';
	flashHTML += ' <param name="quality" value="high" />\n';
	flashHTML += ' <param name="wmode" value="'+wmode+'" />\n';
	flashHTML += '</object>\n';
	
	//alert(flashHTML);

	document.write(flashHTML);
}