/*#########################
 TOP Flash
#########################*/

function RunFlash(flaFlg){
	var version='0.0.0';
	if(navigator.plugins && navigator.mimeTypes['application/x-shockwave-flash']){
		var plugin=navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin;
		// the code below is used in SWFObject
		//var plugin=navigator.plugins['Shockwave Flash'];
		if (plugin && plugin.description) {
			// convert the description like 'Shockwave Flash 9.0 r28' into version string like '9.0.8';
			// regex is provided by SWFObject
			version=plugin.description.replace(/^[A-Za-z\s]+/, '').replace(/(\s+r|\s+b[0-9]+)/, ".");
		}
	} else { // in the case of Win IE
		var x='';
		try {
			// for ver.7 and later
			var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
			x=axo.GetVariable("$version");
		} catch(e) {
			try {
				// for ver.6
				axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				x="WIN 6,0,21,0";
				/*
				* GetVariable() crashes player version 6.0.22-29, and
				* players which have those versions throws when access 
				* to AllowScriptAccess
				*/
				axo.AllowScriptAccess="always";
				x=axo.GetVariable("$version");
			} catch(e) {
				if (!x.match(/^WIN/)) {
					try {
						// for 4.x,5.x
						axo=null;
						axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
						// version 3 player throws when you call GetVariale().
						x=axo.GetVariable("$version");
					} catch(e) {
						if (axo) {
							// for 3.x
							x="WIN 3,0,18,0";
						} else {
							try {
								// for 2.x
								axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
								x="WIN 2,0,0,11";
							} catch(e) {
								x="WIN 0,0,0,0";
							}
						}
					}
				}
			}
		}
		// convert ActiveX version string to our version string like '9.0.28'
		version=x.replace(/^WIN /,'').replace(/,[0-9]+$/,'').replace(/,/g,'.');
	}

	if (version.match(/^[0-7].[0-9]+\.[0-9]+$/)) {
		if(flaFlg == "1"){
			document.write('<img src="/lithApService/img/top/top.jpg" width="750" height="265" border="0" alt="トップ" usemap="#topMap" />\n');
			document.write('<map name="topMap" id="topMap">\n');
			document.write('  <area shape="rect" coords="4,1,558,200" href="javascript:chgCtgry(0)" />\n');
			document.write('  <area shape="rect" coords="0,205,108,253" href="javascript:chgCtgry(1)" />\n');
			document.write('  <area shape="rect" coords="111,205,205,253" href="javascript:chgCtgry(2)" />\n');
			document.write('  <area shape="rect" coords="207,205,327,253" href="javascript:chgCtgry(3)" />\n');
			document.write('  <area shape="rect" coords="330,205,439,253" href="javascript:chgCtgry(4)" />\n');
			document.write('  <area shape="rect" coords="443,205,558,252" href="javascript:chgCtgry(5)" />\n');
			document.write('  <area shape="rect" coords="576,20,748,69" href="/lithApService/index_item.php?pg=sign_40" />\n');
			document.write('  <area shape="rect" coords="576,76,747,125" href="/lithApService/index_item.php?pg=sign_01" />\n');
			document.write('  <area shape="rect" coords="575,130,746,181" href="/lithApService/index_camp.php?pg=new_webuploader" />\n');
			document.write('  <area shape="rect" coords="575,185,747,236" href="/lithApService/index_news.php?pg=detail&news_id=2010060101" />\n');
			document.write('</map>\n');
		}else{
			document.write('<a href="/lithApService/index_news.php?pg=detail&news_id=2010070101"><img src="/lithApService/img/top/lisco.gif" width="150" height="275" border="0" alt="プライスダウン情報"></a>\n');
		}
	}else{
		if(flaFlg == "1"){
			document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="265">\n');
			document.write('<param name=movie value="/lithApService/img/top/top3.swf"> <param name=quality value=high><param name="SCALE" value="exactfit">\n');
			document.write('<embed src="/lithApService/img/top/top3.swf" quality=high pluginspage="http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="265" scale="exactfit">\n');
			document.write('</embed>\n');
			document.write('</object>\n');
		}else{
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="150" height="275" id="lisco" align="middle">\n');
			document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
			document.write('<param name="allowFullScreen" value="false" />\n');
			document.write('<param name="movie" value="/lithApService/img/top/lisco.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" />	<embed src="/lithApService/img/top/lisco.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="150" height="275" name="lisco" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer_jp" />\n');
			document.write('</object>\n');
		}
	}
}


function RunFlashMap(){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="560" height="350">\n');
	document.write('<param name=movie value="/lithApService/img/shop/shopmap.swf"> <param name=quality value=high><param name="SCALE" value="exactfit">\n');
	document.write('<embed src="/lithApService/img/shop/shopmap.swf" quality=high pluginspage="http://www.macromedia.com/jp/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100%" height="350" scale="exactfit">\n');
	document.write('</embed>\n');
	document.write('</object>\n');
}

