function FlashEmbed(Page, SEFile) {

	switch(Page) {
		case 'se' :
			SWF = '/sound/sound.swf';
			WIDTH = '80';
			HEIGHT = '25';
			LOOP = 'false';
			QUALITY = 'best';
			BGCOLOR = '#ffffff';
			break;
		default :
	}
	
	var splitedUrl = location.href.split('/');
	var slashesCount = splitedUrl.length - 1;
	var dotDotSlashCount = slashesCount - 1;
	var dotDotSlash = '';
	var reg = /php$/;
	if (splitedUrl.length > 4 && splitedUrl[3].match(reg))
	{
		dotDotSlashCount++;
	}
	for (var i=0; i<dotDotSlashCount; i++)
	{
		dotDotSlash += '../';
	}
	SEFile = dotDotSlash + 'sound/' + SEFile;

	FlashStr  = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\n';
	FlashStr += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"\n';
	FlashStr += ' width="' + WIDTH + '" height="' + HEIGHT + '"id="namae">\n';
	FlashStr += '\t<param name="movie" value="' + SWF + '" \/>\n';
	FlashStr += '\t<param name="allowScriptAccess" value="sameDomain" \/>\n';
	FlashStr += '\t<param name="loop" value="' + LOOP + '" \/>\n';
	FlashStr += '\t<param name="quality" value="' + QUALITY + '" \/>\n';
	FlashStr += '\t<param name="bgcolor" value="' + BGCOLOR + '" \/>\n';
	if(SEFile != ''){
		FlashStr += '\t<param name="FlashVars" value="soundfile=/' + SEFile + '" \/>\n';
	}
	FlashStr += '\t<param name="menu" value="false" \/>\n';
	FlashStr += '\t<embed\n';
	FlashStr += '\t src="' + SWF + '"\n';
	FlashStr += '\t loop="' + LOOP + '"\n';
	FlashStr += '\t quality="' + QUALITY + '"\n';
	if(SEFile != ''){
		FlashStr += '\t FlashVars="soundfile=/' + SEFile + '"\n';
	}
	FlashStr += '\t pluginspage="http://www.macromedia.com/go/getflashplayer"\n';
	FlashStr += '\t allowscriptaccess="sameDomain"\n';
	FlashStr += '\t type="application/x-shockwave-flash"\n';
	FlashStr += '\t bgcolor="' + BGCOLOR + '"\n';
	FlashStr += '\t width="' + WIDTH + '" height="' + HEIGHT + '" name="namae" menu="false"></embed>\n';
	FlashStr += '</object>\n';

	document.write(FlashStr);

}

