﻿
/* ------------------------------------------

	info : js読み込み用
	name : import.js

------------------------------------------ */

new function(){
	
	/* IE判定 */
	var isMSIE = /*@cc_on!@*/false; //ie判定
	var isMSIE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true : false; //ie6判定
	var isMSIE9 = (navigator.userAgent.indexOf("MSIE 9")>=0) ? true : false; //ie9判定
	
	/* IEバージョンによって振り分け */
	if(isMSIE6){
		
		//IE6はスペシャルページにご案内
		document.location = "/ie6/";
	
	}else if(isMSIE == true && isMSIE9 == false){
		
		//IE7-8はhtml5仕様に
		include( 'http://html5shim.googlecode.com/svn/trunk/html5.js' );
		include( 'http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js' );
		//IE Hack
		includeCSS( '/css/ie_hack.css' )
	}	
	
	
	
	/* smartPhone,tab 判定 */
	var judge = 0;
	if(navigator.userAgent.indexOf('iPhone') != -1) { judge = 1; }
	if(navigator.userAgent.indexOf('iPad') != -1){ judge = 1; }
	if(navigator.userAgent.indexOf('Android') != -1){ judge = 1; }
	if( judge==1 ){
		includeCSS( '/css/ip.css' );
	}
	

	
	
	/* common */
	include('/js/ga.js');
	include('/js/scrollsmoothly.js');
	include('/js/canv.js');
	
	
	
	
	
	/* インクルード js */
	function include( fileJSName ) {
		var inc_head = '<scr'+'ipt type="text/javascript" src="';
		var inc_foot = '"></script>';
		document.write( inc_head + fileJSName + inc_foot );
	}
	
	/* インクルード css */
	function includeCSS( fileCSSName ) {
		var incCSS_head = '<link rel="stylesheet" href="';
		var incCSS_foot = '" type="text/css" charset="utf-8">';
		document.write( incCSS_head + fileCSSName + incCSS_foot );
	}
	
	
}

