<!--

var pluginspages = new Array(); 
pluginspages[0] = "https://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"; // English
pluginspages[1] = "https://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&Lang=Japanese"; // Japanese

var pluginVer = 0;

function pfAltAction(Obj) {
	if (Obj.nonflashSW == 1) location.href = Obj.nonFlashSRC;
	return Obj.nonFlashSRC;
}

function pfAltContent(Obj) {
	if (Obj.nonflashSW == 1) return "";
	return Obj.nonFlashSRC;
}

function pfFlashPlayerObject() {
	if(navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]){
		return navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	}
}

function putflash (Obj) {
	if (!Obj.dir) Obj.dir = '';
	if (!Obj.id) Obj.id = 'putflash';
	if (!Obj.requiredVer) Obj.requiredVer = 8;
	if (!Obj.bgcolor) Obj.bgcolor = "#33c2ff";
	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.swLiveConnect) Obj.swLiveConnect = "false";
	if (!Obj.menu) Obj.menu = "false";
	if (!Obj.disableCodebase) Obj.disableCodebase = 0;


	var plugin = pfFlashPlayerObject();
	if (plugin) {
//		pluginVer = parseInt(plugin.description.substring(plugin.description.indexOf(".") -1));
		pluginVer = parseInt(plugin.description.match(/\d+\.\d+/));
	} else {
		// for Win MSIE
		if(navigator.userAgent.indexOf("Mac",0) == -1){
			document.writeln('<scr' + 'ipt type="text/vbscript">');
			document.writeln('On Error Resume Next');
			document.writeln('Private swfEnableFlag');
			document.writeln('swfEnableFlag = false');
			document.writeln('swfEnableFlag = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + Obj.requiredVer + '"))');
			document.writeln('If swfEnableFlag Then');
			document.writeln('pluginVer = ' + Obj.requiredVer);
			document.writeln('End If');
			document.writeln('</scr' + 'ipt>');
		}
	}

	document.open();
	if (Obj.hedSRC) document.write(Obj.hedSRC);
	if (pluginVer < Obj.requiredVer){
		document.write(pfAltAction(Obj));
	} else {
 		document.write(pfGetObjectElement(Obj));
	}
	if (Obj.fotSRC) document.write(Obj.fotSRC);
	document.close();
}

function pfGetObjectElement(Obj){

	if (window.opera && Obj.opera_exec != 1) {
		return pfAltAction(Obj);
	}

	if (!Obj.file || !Obj.width || !Obj.height || !Obj.id) {
		return "";
	}

	var result = "";
	result += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';

	if(!Obj.disableCodebase){
		result += ' codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"';
	}
	result += ' id="' + Obj.id + '" width="' + Obj.width + '" height="' + Obj.height + '" name="' + Obj.id + '">';
	result += '<param name="movie" value="' + Obj.dir + Obj.file + '">';
	result += '<param name="quality" value="' + Obj.quality + '">';
	result += '<param name="wmode" value="transparent" />';
	result += '<param name="bgcolor" value="' + Obj.bgcolor + '">';
	result += '<param name="menu" value="' + Obj.menu + '"' + '>';
	
	result += '<param name="FlashVars" value="stay_Num=' + Obj.stayNum + '"' + '>';
	
	if (Obj.salign)    result += '<param name="salign" value="' + Obj.salign + '"' + '>';
	if (Obj.scale)     result += '<param name="scale" value="' + Obj.scale + '"' + '>';
	if (Obj.FlashVars) result += '<param name="FlashVars" value="' + Obj.FlashVars + '"' + '>';

	if ((navigator.appVersion.indexOf('Win',0) != -1 && navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1) && !window.opera){
		result += pfAltContent(Obj);
	} else {
		result += pfGetEmbedElement(Obj);
	}
	result += '</object>';
	return result;
}

function pfGetEmbedElement(Obj){

	if (Obj.moz_exec != 1 && (navigator.userAgent.indexOf("Gecko/") != -1)) return pfAltAction(Obj);

	if (Obj.macie4exec != 1 && (navigator.appVersion.indexOf('Mac',0) != -1)){
		if (navigator.appVersion.indexOf('MSIE 4.',0) != -1) return pfAltAction(Obj);
		if (navigator.appVersion.indexOf('MSIE 3.',0) != -1) return pfAltAction(Obj);
	}

	var ua = navigator.userAgent;
	var reviseFlag = false;
	if (ua.match(/Gecko\//)) {
		var key = 'rv:';
		var sRv = ua.substr(ua.indexOf(key) + key.length, 4);
		var fRv = parseFloat(sRv);
		reviseFlag = (fRv > 1.4 && (fRv < 1.7 || sRv == '1.7a'));
	}

	var result = "";
	result += '<embed src="' + Obj.dir + Obj.file + '"';
	result += ' menu="' + Obj.menu + '"';
	result += ' quality="' + Obj.quality + '"';
	result += ' wmode="transparent"';
	result += ' swLiveConnect="' + Obj.swLiveConnect + '"';
	result += ' bgcolor="' + Obj.bgcolor + '"';
	result += ' width="' + Obj.width + '"';
	result += ' height="' + Obj.height + '"';
	if (Obj.scale && !reviseFlag) result += ' scale="' + Obj.scale + '"';
	if (Obj.salign)               result += ' salign="' + Obj.salign + '"';
	if (Obj.scale && reviseFlag)  result += ' scale="' + Obj.scale + '"';
	if (Obj.FlashVars)            result += ' FlashVars="' + Obj.FlashVars + '"';
	result += ' type="application/x-shockwave-flash"';
	result += ' pluginspage="' + pluginspages[Obj.language] + '"';
	result += ' name="' + Obj.id + '"';

	result += ' FlashVars="stay_Num=' + Obj.stayNum + '"';

	result += '></embed><br>';
	return result;
}

//-->

