// JavaScript Document


//initUserEnv
function initUserEnv(){
	this.isWin		= navigator.userAgent.indexOf("Win") != -1 ? true : false;
	this.isMac		= navigator.userAgent.indexOf("Mac") != -1 ? true : false;
	this.isNs		= navigator.appName.indexOf("Netscape") != -1 ? true : false;
	this.isNs4		= (document.layers) ? true : false;
	this.isNs4_7	= navigator.userAgent.indexOf("4.7") != -1 ? true : false;
	this.isNs6		= navigator.userAgent.indexOf("Netscape6") != -1 ? true : false;
	this.isNs7		= navigator.userAgent.indexOf("Netscape/7") != -1 ? true : false;
	this.isMoz		= navigator.userAgent.indexOf("Gecko") != -1 ? true : false;
	this.isIe		= navigator.userAgent.indexOf("MSIE") != -1 ? true : false;
	this.isIe4		= navigator.userAgent.indexOf("MSIE 4") != -1 ? true : false;
	this.isIe5		= navigator.userAgent.indexOf("MSIE 5") != -1 ? true : false;
	this.isIe6		= navigator.userAgent.indexOf("MSIE 6") != -1 ? true : false;
	this.isOp		= navigator.userAgent.indexOf("Opera") != -1 ? true : false;
	this.isW3CDom	= (document.getElementById) ? true : false;
	this.isMsDom	= (document.all) ? true : false;
	this.isNsDom	= (document.layers) ? true : false;
	this.isDom		= (this.isW3CDom || this.isMsDom || this.isNsDom) ? true : false;
	return this;
}
var userEnv = new initUserEnv();


//checkBlowser
function checkBlowser(){
	return (userEnv.isW3CDom)? 1:0;
}

//getFlashPlayerVersion
function getSwfVersion(){
	var flashVersion = 0;
	if (userEnv.isIe && userEnv.isWin) {
		try{flashVersion= new ActiveXObject("ShockwaveFlash.ShockwaveFlash").FlashVersion();}catch(e){flashVersion=0};
		flashVersion = Math.floor (flashVersion / 0x10000);
	} else {
		if (userEnv.isNs && !navigator.plugins) {
			flashVersion = 0;
		} else {
			var s = "application/x-shockwave-flash";
			if (navigator.mimeTypes && navigator.mimeTypes[s] && navigator.mimeTypes[s].enabledPlugin) {
				flashVersion=navigator.plugins["Shockwave Flash"].description.match (/\d+/);
			} else {
				flashVersion = 0;
			}
		}
	}
	return flashVersion;
}


function showSwf(swf){
	if(getSwfVersion () <= 7){
		
document.write('<table border="0" cellpadding="0" cellspacing="0">');
document.write('<tr>');
document.write('<td rowspan="4"><img src="/shopping/img/noflash01.jpg" alt="" width="730" height="323" border="0" usemap="#Map"></td>');
document.write('<td><a href="/shopping/type/shoppingpark/"><img src="/shopping/img/nofla_bt01.gif" alt="三井ショッピングパーク" width="180" height="101"></a></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td><a href="/shopping/type/outletpark/"><img src="/shopping/img/nofla_bt02.gif" alt="三井アウトレットパーク" width="180" height="100"></a></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td><a href="/shopping/type/urban_facility/index.html"><img src="/shopping/img/nofla_bt03.gif" alt="都市型商業施設" width="180" height="100"></a></td>');
document.write('</tr>');
document.write('<tr>');
document.write('<td><a href="/shopping/type/index.html"><img src="/shopping/img/nofla_bt04.gif" alt="ショッピングセンターのタイプ" width="180" height="22"></a></td>');
document.write('</tr>');
document.write('</table>');
document.write('<map name="Map" id="Map">');
document.write('<area shape="rect" coords="495,277,616,294" href="/project/toyosu/lalaport_toyosu/index.html">');
document.write('<area shape="rect" coords="558,254,722,273" href="/shopping/type/shoppingpark/index.html">');
document.write('<area shape="rect" coords="627,277,722,294" href="/redirect/toyosu_lalaport.php" target="_blank">');
document.write('</map>');

		
	}else{
	
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="910" height="324" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="movie" value="' + swf + '" />');
		document.write('<param name="menu" value="false" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="bgcolor" value="#ffffff" />');
		document.write('<embed src="' + swf + '" quality="high" bgcolor="#ffffff" width="910" height="324" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	}
}

//カテゴリトップ project area内バナーで使用
function showSwf02(swf){
	if(getSwfVersion () <= 7){
document.write('<a href="/project/branch/kansai/marine_pia_kobe/index.html"><img src="/common/img/photo_kobe.jpg" alt="三井アウトレットパーク マリンピア神戸" width="160" height="120" border="0"></a>');
	
	}else{
	
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="160" height="120" id="slideshow_mini" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="movie" value="' + swf + '" />');
		document.write('<param name="menu" value="false" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="bgcolor" value="#ffffff" />');
		document.write('<embed src="' + swf + '" quality="high" bgcolor="#ffffff" width="160" height="120" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	}
}