/* RunActiveContent For Flash*/

// Macromedia URL(plug-ins page)
var pluginsURL = new Array();
pluginsURL[0] = "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"; // English
pluginsURL[1] = "http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"; // Japanese


// check for Flash Player plug-in
function checkFlashPlugin() {
	var results = ((navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ?  navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0);
	return results;
}

var plugin, pluginVer = 0;
plugin = checkFlashPlugin();
if (plugin) pluginVer = parseInt(plugin.description.substring(plugin.description.indexOf(".") -1));

function altAction(Obj) {
	if (Obj.nonflashSW == 0) {
		altContent(Obj.nonFlashSRC);
	} else if (Obj.nonflashSW == 1) {
		altPage(Obj.nonFlashSRC);
	}
}

function altPage(_url) {
	location.href = _url;
}

function altContent(_content) {
	document.write(_content);
}


function RunActiveContent(Obj) {
	if (!Obj.dir) Obj.dir = '';
	if (!Obj.id) Obj.id = 'activecontent';
	if (!Obj.requiredVer) Obj.requiredVer = 4;
	if (!Obj.bgcolor) Obj.bgcolor = "#ffffff";
	if (!Obj.quality) Obj.quality = "high";
	if (!Obj.language) Obj.language = 0;
	if (!Obj.macie4exec && Obj.macie4exec != "0") Obj.macie4exec = 0;
	if (!Obj.moz_exec && Obj.moz_exec != "0") Obj.moz_exec = 1;
	if (!Obj.opera_exec && Obj.opera_exec != "0") Obj.opera_exec = 0;
	if (!Obj.nonflashSW && Obj.nonflashSW != "0") Obj.nonflashSW = 0;
	if (!Obj.nonFlashSRC) Obj.nonFlashSRC = "";
	if (!Obj.menu) Obj.menu = "false";


	document.open();
	if (window.opera && Obj.opera_exec == 1 || !window.opera) {
		if (Obj.file && Obj.width && Obj.height && Obj.id) {
			document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="' + Obj.id + '" width="' + Obj.width + '" height="' + Obj.height + '" name="' + Obj.id + '">');
			document.write('<param name="movie" value="' + Obj.dir + Obj.file + '">');
			document.write('<param name="quality" value="' + Obj.quality + '">');
			document.write('<param name="bgcolor" value="' + Obj.bgcolor + '">');
			document.write('<param name="menu" value="' + Obj.menu + '"' + '>');

			if ((navigator.appVersion.indexOf('Win',0) != -1 && navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1) && !window.opera && Obj.nonflashSW == 0) altContent(Obj.nonFlashSRC);
			if (plugin && pluginVer >= Obj.requiredVer && !((navigator.userAgent.indexOf("Gecko") != -1) && Obj.moz_exec != 1) || (navigator.appVersion.indexOf('Mac',0) != -1 && navigator.appVersion.indexOf('MSIE 4.',0) != -1 && Obj.macie4exec == 1) || (navigator.appVersion.indexOf('Mac',0) != -1 && navigator.appVersion.indexOf('MSIE 3.',0) != -1 && Obj.macie4exec == 1)) {
			document.write('<embed src="' + Obj.dir + Obj.file + '" menu="' + Obj.menu + '" quality="' + Obj.quality + '" bgcolor="' + Obj.bgcolor + '" width="' + Obj.width + '" height="' + Obj.height + '"');
			document.write(' type="application/x-shockwave-flash" pluginspage="' + pluginsURL[Obj.language] + '" name="' + Obj.id + '"><\/embed><br>');
			} else {
				if (!(navigator.appVersion.indexOf('Win',0) != -1 && navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1 && !window.opera)) {
					altAction(Obj);
				}
			}
			document.write('<\/object>');
		}
	} else {
		altAction(Obj);
	}
	document.close();
}