//時計の設定

var version		= 7;
var req_ver		= 7;
var flash_ok	= false;


function MimeTypeCheck(mimetype){
	return (navigator.mimeTypes && navigator.mimeTypes[mimetype]) ? navigator.mimeTypes[mimetype].enabledPlugin : 0;
}

function Setup(Language, Vsec, Vmin, Vhrs, Vweek, Vday, Vmon, Vyear, iWidth, iHeight){
this.version	= 0;
this.plugin		= MimeTypeCheck("application/x-shockwave-flash");

if (this.plugin) {
var str = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < str.length; ++i) {
if (!isNaN(parseInt(str[i]))) this.version = str[i];
}
}

else {
this.version = Math.floor(new ActiveXObject("ShockwaveFlash.ShockwaveFlash").FlashVersion() / 0x10000)
}
		
if (this.version >= req_ver){
document.getElementById('clock_wrapper').innerHTML =
"<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='" + iWidth + "' height='" + iHeight + "' codebase='//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0'>"
+ "<param name='movie' value='/net/dm/clock/" + Language + "/clock.swf'>"
+ "<param name='quality' value='high'>"
+ "<param name='menu' value='false'>"
+ "<param name='wmode' value='opaque'>"
+ "<param name='FlashVars' value='sec="+ Vsec +"&min="+ Vmin +"&hrs="+ Vhrs +"&we7="+ Vweek +"&day="+ Vday +"&mon="+ Vmon +"&yea="+ Vyear +"'>"
+ "<embed src='/net/dm/clock/" + Language +"/clock.swf' quality='high' width='" + iWidth + "' height='" + iHeight + "' FlashVars='sec="+ Vsec +"&min="+ Vmin +"&hrs="+ Vhrs +"&we7="+ Vweek +"&day="+ Vday +"&mon="+ Vmon +"&yea="+ Vyear +"' menu='false' wmode='opaque' pluginspage='//www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'></embed></object>"
;


} else {
document.getElementById('clock_wrapper').innerHTML =
'<img src="/net/dm/clock/'+Language+'/need-flash.gif"><a href="http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash&Lang=Japanese"><img src="/net/dm/clock/global/get_flash_player.gif"></a>';
}
}