/*初期表示*/
window.onload=function()	{
	// Google Analytics
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

	var header = document.getElementsByTagName("head")[0];
	var scriptTag = document.createElement("script");

	scriptTag.setAttribute("src", gaJsHost + "google-analytics.com/ga.js");
	scriptTag.setAttribute("type", "text/javascript");

	header.appendChild(scriptTag);

	try {
		var pageTracker = _gat._getTracker("UA-12053635-2");
		pageTracker._trackPageview();
	}	catch(err) {
		//
	}

	//画像とFlashの差し替え
	var ver = navigator.appVersion.substring(0,1);
	var flg = "i";

	if (navigator.appName == "Microsoft Internet Explorer") {
			try	{
				var tmp = new	ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").match(/([0-9]+)/);
				if (tmp[0] >= 6)	{	flg = "f";	}
			}	catch(err)	{
				//
			}
	}	else if ((navigator.appName == "Netscape") || (navigator.appName == "Opera"))	{
			if (ver >= "3")	{
				for (var i = 0; i < navigator.mimeTypes.length; i++) {
					if	(navigator.mimeTypes[i].type == "application/x-shockwave-flash"){
						flg = "f";
						break;
					}
				}
			}
	}

	if (flg == "f")	{

		for (i = 0; i < document.getElementsByTagName("span").length;	i++)	{

			if (document.getElementsByTagName("span").item(i).id.search(/flsh_/) > -1)	{
				//規定値の削除
				var obj = document.getElementById("flsh_" + i);

				while(obj.lastChild)	{
					obj.removeChild(obj.lastChild);
				}

				//Flashの追加
				var cld_0 = document.createElement("param");

				cld_0.setAttribute("name",	"movie"); 
				cld_0.setAttribute("value",	"img/iimono.swf");

				var cld_1 = document.createElement("param");

				cld_1.setAttribute("name",	"quality"); 
				cld_1.setAttribute("value",	"high");

				var cld_2 = document.createElement("embed");

				cld_2.setAttribute("src",	obj.getAttribute("title")); 
				cld_2.setAttribute("loop",	"false"); 
				cld_2.setAttribute("width",	obj.getAttribute("width"));
				cld_2.setAttribute("height",	obj.getAttribute("height"));
				cld_2.setAttribute("type",	"application/x-shockwave-flash");

				//ブラウザ別の処理
				if(navigator.appName == "Microsoft Internet Explorer"){
					obj.appendChild(cld_2);
				}	else	{
					var ele = document.createElement("object");

					ele.setAttribute("classid", "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000");

					ele.appendChild(cld_0);
					ele.appendChild(cld_1);
					ele.appendChild(cld_2);

					obj.appendChild(ele);
				}
			}
		}
	}
}

