var Environment = {
	Os :{
		isWin					:navigator.userAgent.indexOf("Win") != -1 ? true : false,
		isMac					:navigator.userAgent.indexOf("Mac") != -1 ? true  : false
	},
	Blowser :{
		isNs					:navigator.appName.indexOf("Netscape") !=  -1 ? true  : false,
		isNs4					:(document.layers) ? true  : false,
		isNs4_7				:navigator.userAgent.indexOf("4.7") !=   -1 ? true  : false,
		isNs6					:navigator.userAgent.indexOf("Netscape6") != -1 ? true  : false,
		isNs7					:navigator.userAgent.indexOf("Netscape/7") != -1 ? true  : false,
		isMoz					:navigator.userAgent.indexOf("Gecko") != -1 ? true  : false,
		isIe					:navigator.userAgent.indexOf("MSIE") != -1 ? true  : false,
		isIe4					:navigator.userAgent.indexOf("MSIE 4") !=  -1 ? true  : false,
		isIe5					:navigator.userAgent.indexOf("MSIE 5") !=  -1 ? true  : false,
		isIe6					:navigator.userAgent.indexOf("MSIE 6") != -1 ? true  : false,
		isIe7					:navigator.userAgent.indexOf("MSIE 7") != -1 ? true  : false,
		isOp					:navigator.userAgent.indexOf("Opera") !=  -1 ? true  : false,
		isSf					:navigator.userAgent.indexOf("Safari") !=  -1 ? true  : false
	},
	Dom : {
		isW3CDom				:(document.getElementById) ? true  : false,
		isMsDom				:(document.all) ? true  : false,
		isNsDom				:(document.layers) ? true  : false
	},
	Display : {
		width					:(screen.width),
		height				:(screen.height)
	},
	Location : {
		getQuery				:function (){if(location.href.split('?')[1]==null)return;var queryArray=location.href.split('?')[1].split('&');var queryObj=new Object();for(i=0;i<queryArray.length;i++){n=queryArray[i].split('=');queryObj[n[0]]=n[1];}return queryObj;},    
		isOnline				:(location.protocol=='http:'),
		isRefer				:(document.referrer) ? document.referrer :''
	},
	checkBlowser			:function () {return (this.isW3CDom)? true : false }
}

var Cookie = {
	checkEnabled			:function ()						{return (document.cookie)?1:0;},
	readCookie				:function (name)					{var cookieValue="";var search=name+"=";if(document.cookie.length>0){offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;cookieValue=unescape(document.cookie.substring(offset,end))}}return cookieValue;},
	writeCookie				:function (name,value,hours)	{var expire="";if(hours!=null){expire=new Date((new Date()).getTime()+hours*3600000);expire="; expires="+expire.toGMTString();}document.cookie=name+"="+escape(value)+expire;}
}

var Media = {
	Swf : {
		getVersion			:function (){var flashVersion=0;if(Environment.Blowser.isIe&&Environment.Os.isWin){eval('try{ flashVersion=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").FlashVersion();  }  catch(e){ flashVersion=0}');flashVersion=Math.floor(flashVersion/0x10000);}else{if(this.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;},
		printHtml			:function ()	{}
	}
}


function printSwf (_soundFlg) {
	if(Cookie.readCookie ("swfloaded")){visited = 1;} else{visited = 0;}
	Cookie.writeCookie ("swfloaded",1);
	soundFlg = (_soundFlg == "cesnaSoundOFF") ? 1:0
	if ((Media.Swf.getVersion () < 7) ) {
		document.write (
			'<h2><img src="images/main_fl_alt.jpg" width="920" height="330" border="0" alt="住友電工グループは5つの事業分野で、社会の期待に応える様々な製品を提供しています。住友電工グループの製品や技術がどのような所で活躍しているかをご紹介します。"></h2>'
		);
	} else {
		document.write (
			'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ' +
				'width="920" height="330" id="main" align="middle">' +
				'<param name="base" value="">' +
				'<param name="movie" value="top.swf">' +
				'<param name="bgcolor" value="#ffffff">' +
				'<param name="flashvars" value="visited=' +visited + '&'+ 'cesnaNoSound='+ soundFlg + '">' +
				'<param name="flashvars" value="cesnaNoSound=' +soundFlg +'">' +
				'<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ' +
					'base="" name="main" width="920" height="330" ' +
					'src="top.swf"' +
					'flashvars="visited=' +visited + '&'+ 'cesnaNoSound='+ soundFlg + '"' + 
				'><\/embed' +
			'><\/object><br>'
		);
	}
}


