/*
------------------------------------------------------
(C)2006-2007 skylink Co., Ltd
------------------------------------------------------
*/

/*
** ******************************************
** Global
** ******************************************
*/
MM_contentVersion = null;
MM_FlashCanPlay = false;


/*
** ******************************************
** Prototype
** ******************************************
*/
function getFlashVersion(PARAM_version) {
	MM_contentVersion = PARAM_version;
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i) {
			if (isNaN(parseInt(words[i])))
			continue;
			var MM_PluginVersion = words[i]; 
		}
		MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
		document.write('on error resume next \n');
		document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
		document.write('</SCR' + 'IPT\> \n');
	}
	return MM_FlashCanPlay;
}
	
function switchIcon1(){
	var MM_FlashCanPlay = getFlashVersion(6);
	if ( MM_FlashCanPlay ) {
		var str = '<a href="javascript:open_flash();"><img src="img/bt_open.gif" alt="OPEN" width="137" height="138" border="0" /></a>';
		document.write(str);
		return;
	} else {
		var str = '<a href="http://www.adobe.com/go/getflashplayer_jp" target="_blank"><img src="img/bt_open2.gif" alt="GET PLUGIN" width="137" height="138" border="0" /></a>';
		document.write(str);
		return;
	}
}
	
function switchIcon2(){
	var MM_FlashCanPlay = getFlashVersion(6);	
	if ( MM_FlashCanPlay ) {
		var str = '<img src="img/contents_7.gif" alt="on_flash" width="285" height="34" border="0" />';
		document.write(str);
		return;
	} else {
		var str = '<img src="img/contents_11.gif" alt="off_flash" width="285" height="34" border="0" />';
		document.write(str);
		return;
	}
}

