
//Browser Check
var browserType=new checkBrowserType();
var osType=new checkOsType();
function checkBrowserType(){
	this.IE=(navigator.userAgent.indexOf("MSIE")!=-1);
	this.Gecko=(navigator.userAgent.indexOf("Gecko")!=-1);
	this.IE6=(navigator.userAgent.indexOf("MSIE 6.")!=-1);
	this.IE5=(navigator.userAgent.indexOf("MSIE 5.")!=-1);
	this.NC71=(navigator.userAgent.indexOf("Netscape/7.1")!=-1);
	this.NC70=(navigator.userAgent.indexOf("Netscape/7.0")!=-1);
	this.NC6=(navigator.userAgent.indexOf("Netscape/6.")!=-1);
	this.NC7=(navigator.userAgent.indexOf("Netscape/7.")!=-1);
	this.NC4=(navigator.userAgent.indexOf("Netscape/4.")!=-1);
}
function checkOsType(){
	this.Win=(navigator.appVersion.indexOf("Win")!=-1);
	this.Mac=(navigator.appVersion.indexOf("Mac")!=-1);
	this.Unix=(navigator.appVersion.indexOf("X11")!=-1);
}


//Contents maxwidth minwith

function setContainerWidth() {
	var windowWidth = document.body.clientWidth;
	if(document.getElementById){
		if(windowWidth <= 760) {
			document.getElementById("wrapper").style.width = '760px';
		} else if(windowWidth >= 761) {
			document.all("wrapper").style.width = '97%';
		} else {
			document.getElementById("wrapper").style.width = 'auto';
		}
	}

	else if(document.all){
		if(windowWidth <= 760) {
			document.all("wrapper").style.width = '760px';
		} else if(windowWidth >= 761) {
			document.all("wrapper").style.width = '97%';
		} else {
			document.all("wrapper").style.width = 'auto';
		}
	}

}

//Contents maxwidth minwith Setting
if(browserType.IE){
	window.onload = setContainerWidth;
	window.onresize = setContainerWidth;
}

//Script For Change Image

// check Player Version

var MM_contentVersion = 6;
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]; 
	}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}

// play Flash Movie

function playIndexFlash (){
	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');
	}
	if ( MM_FlashCanPlay ) {
		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="100%" height="121px" id="bana" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="movie" value="http://help.timeline.nifty.com/parts/flash/top_flash.swf" />');
		document.write('<param name="quality" value="best" />');
		document.write('<param name="bgcolor" value="#ffffff" />');
		document.write('<embed src="http://help.timeline.nifty.com/parts/flash/top_flash.swf" quality="best" bgcolor="#ffffff" width="100%" height="121px" name="bana" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	} else{
		document.write('<p class="caution">このコンテンツをご覧になるにはAdobe Systems Incorporatedが配布している最新の Adobe Flash Player (無償)が必要です。<br />最新のPlayerをインストールすることにより閲覧が可能になります。以下のサイトにてご用意ください。<br /><a href=http://www.macromedia.com/go/getflash/ target="_blank">Adobe Systems Incorporated : Adobe Flash Player ダウンロードセンター</a></p>\n');
	}
}
//Script For Change Image
 	function initRollovers() {
 	        if (!document.getElementById) return
 	
 	        var aPreLoad = new Array();
 	        var sTempSrc;
 	        var aImages = document.getElementsByTagName('img');
 	
 	        for (var i = 0; i < aImages.length; i++) {             
 	                if (aImages[i].className == 'imgover') {
 	                        var src = aImages[i].getAttribute('src');
 	                        var ftype = src.substring(src.lastIndexOf('.'), src.length);
 	                        var hsrc = src.replace(ftype, '_on'+ftype);
 	
 	                        aImages[i].setAttribute('hsrc', hsrc);
 	                       
 	                        aPreLoad[i] = new Image();
 	                        aPreLoad[i].src = hsrc;
 	                       
 	                        aImages[i].onmouseover = function() {
 	                                sTempSrc = this.getAttribute('src');
 	                                this.setAttribute('src', this.getAttribute('hsrc'));
 	                        }       
 	                       
 	                        aImages[i].onmouseout = function() {
 	                                if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_on'+ftype, ftype);
 	                                this.setAttribute('src', sTempSrc);
 	                        }
 	                }
 	        }
 	}
 	
 	