/* Font-size Script Start */
/*
========== ::: 初期設定 ::: ==========
*/

// 値の単位を設定（必ずダブルクオートかクオートで括る）
var fontSizeUnit = "%";

// 一回の操作で変化させる値を設定（ダブルクオートやクオートで括らない）
var perOrder = 10;
var maxOrder = 180;
var minOrder = 50;
// 初期状態の値を設定（ダブルクオートやクオートで括らない）
var defaultSize = 90;

// クッキーの名前（必ずダブルクオートかクオートで括る）
var ckName = "FSCc";

// クッキーの有効期限（日）（ダブルクオートやクオートで括らない）
var ckDays = 2;

// クッキーのパス（必ずダブルクオートかクオートで括る。指定が不要の場合は"/"にする）
var ckPath = "/"


/*
========== ::: ページ読み込み時の値を設定 ::: ==========
*/

// クッキー読み出し


var fsCK = GetCookie( ckName );

if ( fsCK == null ){
 var currentSize = defaultSize;          //クッキーが無ければ現在の値を初期状態の値に設定
}
else{
 var currentSize = eval( fsCK );          //クッキーがあれば現在の値をクッキーの値に設定
}

if(fsCK == null) SetCookie( ckName , defaultSize );
$(function(){
if(fsCK == null) SetCookieBody( GetCookie(ckName) );
});
/*
========== ::: head内にstyle要素を出力 ::: ==========
*/


/*===================================
 [関数 fsc]
 引数CMDに渡される値に応じて
 変更後の値を算出しクッキーに書き込む。
====================================*/

function fsc( CMD ){

 // 拡大：現時点の値に一回の操作で変化させる値を加えて操作後の値"newSize"に代入
 var newSize = defaultSize;
 if ( CMD == "larger" ){
   newSize = Number( Number( GetCookie(ckName) ) + perOrder );
   if(newSize > maxOrder) newSize = maxOrder;
   SetCookie( ckName , newSize );          //クッキー書き込み
 }

 // 縮小：現時点の値から一回の操作で変化させる値を引き操作後の値に代入
 // 現時点のサイズの値が一回の操作で変化させる値と同じならそのまま操作後の値に代入
 if ( CMD == "smaller" ){
   if ( currentSize != perOrder ){
     newSize = Number( GetCookie(ckName) - perOrder );
   }
   else{
     newSize = Number( currentSize );
   }
   if(newSize < Number(minOrder)){
       newSize = Number(minOrder);
   }
   SetCookie( ckName , newSize );
 }
 // 元に戻す：操作後の値を初期値にする
 if ( CMD == "default" ){
   //DeleteCookie( ckName );          //クッキー削除
   SetCookie( ckName , defaultSize );
 }
 // ページの再読み込み
 // 再読み込みをすることで変更後の値を反映したstyle要素が出力される
 // location.reload();
 SetCookieBody( GetCookie(ckName) );
}

// _______________________________________ end of function fsc() ___


/*===================================
 [関数 SetCookie]
 クッキーに値を書き込む
====================================*/
function SetCookie( name , value ){
 var dobj = new Date();
 dobj.setTime(dobj.getTime() + 24 * 60 * 60 * ckDays * 1000);
 var expiryDate = dobj.toGMTString();
 document.cookie = name + '=' + escape(value) + ';expires=' + expiryDate + ';path=' + ckPath;
}

/*===================================
 [関数 GetCookie]
 クッキーを取得する
====================================*/
function GetCookie (name){
 var arg  = name + "=";
 var alen = arg.length;
 var clen = document.cookie.length;
 var i = 0;
 while (i < clen){
   var j = i + alen;
   if (document.cookie.substring(i, j) == arg)
   return getCookieVal (j);
   i = document.cookie.indexOf(" ", i) + 1;
   if (i == 0) break;
 }
 return null;
}

/*===================================
 [関数 getCookieVal]
 クッキーの値を抽出する
====================================*/
function getCookieVal (offset){
 var endstr = document.cookie.indexOf (";", offset);
 if (endstr == -1)
 endstr = document.cookie.length;
 return unescape(document.cookie.substring(offset,endstr));
}

/*===================================
 [関数 DeleteCookie]
 クッキーを削除する
====================================*/
function DeleteCookie(name){
 if (GetCookie(name)){
   document.cookie = name + '=' +
   '; expires=Thu, 01-Jan-70 00:00:01 GMT;path='+ckPath;
 }
}

/*===================================
 [ 関数 : SetCookieBody ]
 BODY, INPUT要素にクッキーを指定。
====================================*/
function SetCookieBody( data ){
       document.body.style.cssText = "font-size:"+data+"%;";
       // console.log(document.body.style.cssText);
       // document.forms[0].style.cssText = "font-size:"+data+"%;";
       // document.forms[0].q.style.cssText = "font-size:"+100+"%;";
       /***********************************************************
               * native code
               * 使用したい要素をスタイルに....
               *
       ***********************************************************/
       // Form の中のスタイルを変更！
       var googles =document.forms.parentNode; 
       if(typeof googles!="undefined" && typeof googles.className!="undefined" && googles.className != "search"){
	       if(typeof document.forms.length != "undefined" && document.forms.length > 0){
	               for(var i=0;i<document.forms.length;i++){
	                       document.forms[i].style.cssText = "font-size:"+data+"%;";
	                       if(typeof document.forms[i].elements.length != "undefined" && document.forms[i].elements.length > 0){
	                               for(var k=0;k<document.forms[i].elements.length;k++){
	                                       if(typeof document.forms[i].elements[k].name != "undefined" && document.forms[i].elements[k].name != "sitesearch"){//ナレッジ文字拡大させたくない判定。。
	                                       		document.forms[i].elements[k].style.cssText = "font-size:"+100+"%;";
	                                       }
	                               }
	                       }
	               }
	       }
       }
       // Table判定
       var table = document.getElementsByTagName("table");
       if(typeof table!="undefined" && table.length>0){
               for(var i=0;i<table.length;i++){
                       table[i].style.cssText = "font-size:"+data+"%;clear:both;";// Tableタグの後ろに必ずclear:both;を追記。
                       var td=table[i].getElementsByTagName("td");
                       var th=table[i].getElementsByTagName("th");
                       if(td.length > 0){
                               for(var k=0;k<td.length;k++){
                                       td[k].style.cssText = "font-size:100%;";
                               }
                       }
                       if(th.length>0){
                               for(var k=0;k<th.length;k++){
                                       th[k].style.cssText = "font-size:100%;";
                               }
                       }
               }
       }
}


/* Font-size Script End */
var nw = {
	name : "Nexway Javascript Global Setting",
	date : "2010-02-26",
	form : {},
	seminar:{
		locations:function(){
			// セミナー申し込みボタンクエリ作成
			arg = arguments[0];
			var query = "?nxs=1&seminar=1";
			// alert( arg.url.split("?") );
			var urlArray = arg.url.split("?");
			var url = urlArray[0];
			var urlQuery = urlArray[1];
			for(i in arg.nxs){
				if( i != "start" && i != "end" ){
					query += "&" + i + "=" + arg.nxs[i];
				}
				else{
					for( k in arg.nxs[i] ){
						query += "&" + i + k + "=" + arg.nxs[i][k];
					}
				}
			}
			if( urlQuery != "" ) query += "&" + urlQuery;
			// document.write( url + query );
			location.href = url + query;
		},
		createElements:function(){
			var q = nw.parseQuery();
			var a = [];
			for(i in q){
				if(typeof q[i] != "undefined"){
					var input = document.createElement("input");
					input.name = "seminar_"+i;
					input.type = "hidden";
					input.value = q[i];
					a.push(input);
				}
			}
			return a;
		}
	},
	parseQuery:function(){
		var ser = location.search.replace("?", "");
		var q = ser.split("&");
		var val = {};
		for(var i=0;i<q.length;i++){
			var s = q[i].split("=");
			val[s[0]] = s[1];
		}
		return val;
	},
	get:{
		id:function(){
			var d = arguments[0];// ID ;
			return document.getElementById( d );
		},
		google:{
			search:{
				changeAction:function(){
					var id = arguments[0];// ID ;
					var d = nw.get.id(id);
					if(d){
						var action = d.action;
						action = ( location.protocol =="http:" ) ? action : action.replace("http:", "https:");
						d.action = action;
					}
				}
			}
		}
	}
};
var tOut = "";

function showHv(name, x) {
	var d=document.getElementById(x);
	if(d){
		if(d.style.display==""){
			d.style.display="none";
		}
		if(d.style.display=="none"){
			d.style.display="block";
		}
		
	}
	clearTimeout(tOut);
}

function hideHv(name,x) {
 	var d=document.getElementById(x);
	if(d){
		if(d.style.display==""){
			// d.style.display="none";
		}
		if(d.style.display=="block"){
			tOut=setTimeout(
					function(){d.style.display="none";}, 25);
		}
	}
} 

function Display(no){
	var menuNum = 6;
	var selectNum = no.charAt(2);
	for (i = 0; i < menuNum; i++) {
			if(i == selectNum){
				document.getElementById("no"+i).className = "current";
				document.getElementById("SW"+i).style.display = "block";
			}else{
				document.getElementById("no"+i).className = null;
				document.getElementById("SW"+i).style.display = "none";
				}
	}
} 

function Numb(n){
	$(".bn"+n).click(function(){$("#dv"+n).css("display","block");});	
	$(".closeBtn a").click(function(){$("#dv"+n).css("display","none");return false;});
}

function faq(a){
	var s = a.getElementsByTagName('span')[0];
	var u = a.parentNode.getElementsByTagName('ul')[0];
	var l =  a.parentNode;
	if(u.style.display =="none" || u.style.display ==""){
		$(u ).slideDown("slow");
		s.className="Q2";
		l.className="li2";
	}
	else{
		$(u ).slideUp();
		s.className="Q1";
		l.className="li1 ";
	}
}
function faqClose(a){
	var l = a.parentNode;
	var s = a.parentNode.parentNode.parentNode.getElementsByTagName('span')[0];
	
	if(a){
		$(a ).slideUp();
		l.className="li1";
		s.className="Q1";
		
	}
}
function kadai(a){	
	var u = a.parentNode.getElementsByTagName('ul')[0];
	if(u.getElementsByTagName('li').length > 0){
		if($( u ).is(":hidden")){
			$(u ).slideDown("slow");
			a.className="current";
		}
		else{
			$(u ).slideUp();
			a.className="";
		}
	}
}
// conversionChk
function conversionChk(pageID){
	id = pageID;
	ebispageTracker(id);
	return true;
}
/* Cookie */
/*
========== ::: 初期設定 ::: ==========
*/

// 値の単位を設定（必ずダブルクオートかクオートで括る）
var fontSizeUnit = "%";

// 一回の操作で変化させる値を設定（ダブルクオートやクオートで括らない）
var perOrder = 10;
var maxOrder = 180;
var minOrder = 50;
// 初期状態の値を設定（ダブルクオートやクオートで括らない）
var defaultSize = 90;

// クッキーの名前（必ずダブルクオートかクオートで括る）
var ckName = "FSCc";

// クッキーの有効期限（日）（ダブルクオートやクオートで括らない）
var ckDays = 0.1;

// クッキーのパス（必ずダブルクオートかクオートで括る。指定が不要の場合は"/"にする）
var ckPath = "/"
var cTimes24 = 24;
var cTimes = 60;
var cTimesSec = 60;
var cTimesMSec = 1000;
/*===================================
 [関数 SetCookie]
 クッキーに値を書き込む
====================================*/
function SetCookie( name , value ){
 var dobj = new Date();
 	
 if( typeof cookieTime != "undefined" ){
 	dobj.setTime(dobj.getTime() + cTimes);
 }
 else{
 	dobj.setTime(dobj.getTime() + 24 * 60 * 60 * ckDays * 1000);
 }
 var expiryDate = dobj.toGMTString();
 // if(!document.all) console.log(expiryDate);
 document.cookie = name + '=' + escape(value) + ';expires=' + expiryDate + ';path=' + ckPath;
}

/*===================================
 [関数 GetCookie]
 クッキーを取得する
====================================*/
function GetCookie (name){
 var arg  = name + "=";
 var alen = arg.length;
 var clen = document.cookie.length;
 var i = 0;
 while (i < clen){
   var j = i + alen;
   if (document.cookie.substring(i, j) == arg)
   return getCookieVal (j);
   i = document.cookie.indexOf(" ", i) + 1;
   if (i == 0) break;
 }
 return null;
}

/*===================================
 [関数 getCookieVal]
 クッキーの値を抽出する
====================================*/
function getCookieVal (offset){
 var endstr = document.cookie.indexOf (";", offset);
 if (endstr == -1)
 endstr = document.cookie.length;
 return unescape(document.cookie.substring(offset,endstr));
}

/*===================================
 [関数 DeleteCookie]
 クッキーを削除する
====================================*/
function DeleteCookie(name){
 if (GetCookie(name)){
   document.cookie = name + '=' +
   '; expires=Thu, 01-Jan-70 00:00:01 GMT;path='+ckPath;
 }
}

/* Debug Cookie Value */
function debug_Cookie(){
	SetCookie("sfentry", "1");
}
// debug_Cookie();
/* Debug Cookie Value */
/* Block Enter Key */
function BlockEnter(evt){
	evt = (evt) ? evt : event; 
	var charCode=(evt.charCode) ? evt.charCode : 
		((evt.which) ? evt.which : evt.keyCode);
	if ( Number(charCode) == 13 || Number(charCode) == 3) {
		return false;
	} else {
		return true;
	}
}
function attachBlockEnter(formid) {
	//var d = document.getElementById(formid);
	//alert(document.forms.length);
	var form = document.forms;
	for(var i=0;i<form.length;i++){
		var d = form[i];
		if(d){
			var elements = d.elements;
			for (var j=0; j < elements.length; j++) {
				var e = elements[j];	
				if (e.type != "submit"){
					e.onkeypress=BlockEnter;
				}
			}
		}
	}
}
function inboundDay(formid, itemName){
	var d = document.getElementById(formid);
	if(d){
		var day = new Date();
		var elements = d.elements;
		for (var j=0; j < elements.length; j++) {
			var e = elements[j];	
			if (e.type == "hidden" && e.name == itemName){
				e.value = day.toLocaleString();
			}
		}
	}
}
var sf = {
	track:{
		timestamp:function(){
			var date = new Date();
			var now = {
				local : date.toLocaleString(),
				gmt : date.toGMTString(),
				utc : date.toUTCString(),
				yyyy : date.getFullYear(),
				mm : (date.getMonth() +1),
				dd : date.getDate(),
				H : date.getHours(),
				m : date.getMinutes(),
				s : date.getSeconds(),
				dates:function(){
					var arg = arguments[0];
					var mm,dd,H,m,s;
					if(arg.mm < 10){
						mm = "0" + arg.mm;
					}else{
						mm = arg.mm;
					}
					if(arg.dd < 10){
						dd = "0" + arg.dd;
					}else{
						dd = arg.dd;
					}
					if(arg.H < 10){
						H = "0" + arg.H;
					}else{
						H = arg.H;
					}
					if(arg.m < 10){
						m = "0" + arg.m;
					}else{
						m = arg.m;
					}
					if(arg.s < 10){
						s = "0" + arg.s;
					}else{
						s = arg.s;
					}
					return (arg.yyyy + "" + mm + "" + dd + "" + H + "" + m + "" + s);
				}
			};
			return now;
		},
		code:function(){
			var ar = arguments[0];
			var links = ar.object.href;
			ar.object.href = "#";
			if(ar.mode != "debug"){
				// Tracking Code thanksページ挿入 
				/*
					SiteCatalyst
				 	Google Page Taracker
				 	AdEbis
				*/
				/* Tracking Code 変更 2010.07.20 
				if(typeof ar.s != "undefined") sf.track.sc(ar.s);
				// Google Page Tracker
				if(typeof pageTracker != "undefined" && typeof pageTracker._trackPageview != "undefined"){
					pageTracker._trackPageview( links );
				}
				if(typeof ar.eb != "undefined") sf.track.eb(ar.eb);
				*/
				setTimeout(function(){
					location.href = links;
				}, 1500);
			}
			else{
				var str = "DebugMode : Preview\n";
				ar.s.s_account = s_account;
				ar.s.s_code = s.t();
				if(typeof ar.s != "undefined") sf.track.sc(ar.s);
				if(typeof pageTracker != "undefined" && typeof pageTracker._trackPageview != "undefined"){
					pageTracker._trackPageview( links );
				}
				if(typeof ar.eb != "undefined") sf.track.eb(ar.eb);
				str += "------------------- Site Catalyst<br>\n";
				for(i in ar.s){
					if( typeof ar.s[i] != "undefined" && typeof ar.s[i] == "string" && ar.s[i] != "" ){
						str += "<strong>" + i + "</strong>:" + ar.s[i] + "<br>\n";
					}
				}
				str += "実行関数(Site Catalyst):"+ sf.track.sc +"<br><br>\n";
				
				str += "------------------- AdEbis<br>\n";
				var now = sf.track.timestamp();
				ar.eb.ebisMember = now.dates(now);
				for(i in ar.eb){
					str += "<strong>" + i + "</strong>:" + ar.eb[i] + "<br>\n";
				}
				str += "実行関数(AdEbis):"+ sf.track.eb +"<br><br>\n";
				str += "------------------- Google<br>\n";
				str += "<strong>Google</strong>:" + links + "<br>\n";
				str += "実行関数(Google):"+ pageTracker._trackPageview +"<br><br>\n";
				/* 関数の実行 */
				
				/* 関数の実行 */
				var wo = window.open("","Nexway Debug","width=400,height=400,location=yes,scrollbars=yes,resizable=yes");
				wo.document.open();
				wo.document.write("<html>");
				wo.document.write("<body>");
				wo.document.write( str );
				wo.document.write('<a href="'+links+'">ダウンロードファイルへ移動します。</a>');
				wo.document.write("</body>");
				wo.document.write("</html>");
				wo.document.close();
			}
		},
		sc:function(){
			var ar = arguments[0];
			var s = s_gi(s_account);
			var now = sf.track.timestamp();
			s.linkTrackVars = ar.linkTrackVars;
			s.linkTrackEvents = ar.linkTrackEvents;
			s.prop1 = ar.prop1;
			s.eVars1 = ar.eVars1;
			s.eVars2 = now.dates(now);
			if( typeof ar.eVars3 != "undefined" ) s.eVars3 = ar.eVars3;
			if( typeof ar.eVars4 != "undefined" ) s.eVars4 = ar.eVars4;
			if( typeof ar.eVars5 != "undefined" ) s.eVars5 = ar.eVars5;
			s.events = ar.events;
			s.tl(this, 'o', '');
		},
		eb:ebispageTracker
	},
	conversion:{
		check:function(){
			var arg = arguments[0];
			var timestamps = window.currentTime.dates( window.currentTime );
			/* SiteCatalyst */
			for(var i in arg.object){
				if( i.indexOf("SC_") != -1){
					if(typeof arg.object[i]!="undefined"){
						var sc = arg.object[i].cloneNode(true);
						arg.object.removeChild(arg.object[i]);
						for(var k in arg.s){
							if(i.indexOf(k) != -1){
								if( k=="eVar2" ){
									sc.value = "";
								}
								else{
									sc.value = arg.s[k];
								}
							}
						}
						arg.object.appendChild( sc );
					}
				}
			}
			/* SiteCatalyst */
			// SF TimeStamp ////////////////////////////////////////////////////////////////////////////////
			for(var i=0;i<arg.object.length;i++){
				if( typeof arg.object[i] != "undefined" && typeof arg.object[i].id != "undefined" && arg.object[i].id == "sf_timestamp" ){
					var sc = arg.object[i].cloneNode(true);
					arg.object.removeChild( arg.object[i] );
					sc.id = "sf_timestamp";
					sc.value = timestamps
					arg.object.appendChild(sc);
				}
 			}
 			////////////////////////////////////////////////////////////////////////////////////////////////
			/* Ebis */
			/*
			arg.object.EB_host.value = arg.eb.host;
			arg.object.EB_arg.value = "pc3UMHpd";
			arg.object.EB_pageID.value = arg.eb.ebisPageID;
			*/
			/* EB_host */
			var eb = arg.object.EB_host.cloneNode(true);
			arg.object.removeChild(arg.object.EB_host);
			eb.value = arg.eb.host;
			arg.object.appendChild(eb);
			/* EB_arg */
			var eb = arg.object.EB_arg.cloneNode(true);
			arg.object.removeChild(arg.object.EB_arg);
			eb.value = arg.eb.argument;
			arg.object.appendChild(eb);
			/* EB_ebisPageID */
			var eb = arg.object.EB_pageID.cloneNode(true);
			arg.object.removeChild(arg.object.EB_pageID);
			eb.value = arg.eb.ebisPageID;
			arg.object.appendChild(eb);
			/* EB_ebisMember */
			var eb = document.createElement("input");
			eb.name = "EB_ebisMember";
			eb.type = "hidden";
			eb.value = timestamps;
			arg.object.appendChild(eb);
			
			/* /Ebis */
			
			return true;
			// arg.object.submit();
		}
	}
};
/* AdEbis */
/*
	変数一覧
	var eb = {
		host : "ebis server host",
		argument : "任意",
		ebisPageID : "任意"
	}
	資料テンプレート内に記述
*/
function ebispageTracker(){
	var ar = arguments[0];
	var now = sf.track.timestamp();
	// ar.argument = "pc3UMHpd";
	ar.ebisMember = now.dates(now);
	document.images['ebis_tag'].src = "https://"+ar.host+"?argument="+ ar.argument +"&ebisPageID=" + ar.ebisPageID + "&ebisMember=" + ar.ebisMember;
	return false;
}
/* /AdEbis */
// 現在時刻の取得 - 一意
window.currentTime = sf.track.timestamp();// SC, AdEbis
/* onload script event化 */
var q = nw.parseQuery();
if(typeof q.rg != "undefined" && q.rg == 1){
	if(typeof q.timestamp != "undefined"){
		window.currentTime.timestamp = q.timestamp;
	}
	else{
		window.currentTime.timestamp = window.currentTime.dates( window.currentTime );
	}
}
window.onload = function(){
	
	if(typeof q.seminar!="undefined" && q.seminar == 1){
		// alert(q.title);
		if(typeof document.forms != "undefined" && document.forms.length > 0){
			var c = nw.seminar.createElements();
			for(var i=0;i<document.forms.length;i++){
				for(var k=0;k<c.length;k++){
					document.forms[i].appendChild( c[k] );
				}
			}
		}
	}
	
	for(var i=0;i<8;i++){
		Numb(i);
	}
	// Cookie判定
	var cName = "sfentry";// Cookie名称
	var sfc = "sfcount";// Cookie名称
	var c = GetCookie(cName);
	
	var sb = {
		name:"sb",
		classes:"select"
	};
	//　フォームを隠します。
	var d = document.getElementById("iq");
	if(d) d.style.display = "none";
	var sBar = document.getElementById(sb.name);
	// debug mode cookie
	// SetCookie( cName , 1 );
	if(c==1){
		if( typeof cookieTime!="undefined" ){cTimes = cookieTime;}
		SetCookie( cName , 1 );
		// ダウンロードボタン表示
		var d = document.getElementById("bDM");
		if(d){
			// $(d).css("display", "block");
			d.style.display = "block";
		}
		if(sBar){
			var sBars = sBar.getElementsByTagName("span")[sBar.getElementsByTagName("span").length-1];
			var a = sBars.getElementsByTagName("a")[0];
			a.className = sb.classes;
		}
		// cookie counter
		var cc = GetCookie(sfc);
		var sfcount = 1;
		if(typeof cc=="undefined" || !cc) SetCookie( sfc , sfcount );
		if(cc > 1){
			if(sBar) sBar.style.display = "none";
		}
		var cc = GetCookie(sfc);
		// if(!document.all) console.log(cc);
		if(cc >= 1){
			var cc = Number(cc)+1;
			SetCookie( sfc , cc );
		}
	}
	else{
		// フォーム表示
		var d = document.getElementById("iq");
		if(d) d.style.display = "block";
		if(sBar){
			var sBars = sBar.getElementsByTagName("span")[0];
			var a = sBars.getElementsByTagName("a")[0];
			a.className = sb.classes;
		}
	}
	if( nw.form.view == 1 ){
		/* 要素:ユーザ表示登録 - するの時 */
		// ダウンロードボタン表示
		var d = document.getElementById("bDM");
		if(d) d.style.display = "block";
		// フォーム非表示
		var d = document.getElementById("iq");
		if(d) d.style.display = "none";
		$(sBar).css("display", "none");
	}
	attachBlockEnter('fModule');
	inboundDay('fModule', '00N10000000HFmm');
	// google site search SSL対応(action url)
	nw.get.google.search.changeAction( "cse-search-box" );
	// EbisPageTracker
	// onload custom timestamp ( AdEbis )
	if( typeof eb != "undefined" ){
		eb.ebisMember = window.currentTime.dates( window.currentTime );
		if(!eb.ebisPageID) eb.ebisPageID = "AL_ASK";
		var img = document.createElement("img");
		/* code sample
			https://ac.ebis.ne.jp/log.php?argument=pc3UMHpd&ebisPageID=AL_ASK&ebisMember=&ebisAmount=&ebisOther1=&ebisOther2=&ebisOther3=&ebisOther4=&ebisOther5=
		
		img.src = location.protocol + "//" + eb.host + "/log.php?argument=" + eb.argument + "&ebisPageID=" + eb.ebisPageID + "&ebisMember=" + eb.ebisMember + "&ebisAmount=&ebisOther1=&ebisOther2=&ebisOther3=&ebisOther4=&ebisOther5=";
		*/
		img.src = "https://" + eb.host + "/log.php?argument=" + eb.argument + "&ebisPageID=" + eb.ebisPageID + "&ebisMember=" + eb.ebisMember + "&ebisAmount=&ebisOther1=&ebisOther2=&ebisOther3=&ebisOther4=&ebisOther5=";
		img.width = 0;
		img.height = 0;
		img.alt = "";
		img.id = "ebisPageTrackerOnload";
		// document.body.appendChild( img );
		// bodyタグ挿入
	}
	// EbisPageTracker
	//##################################################################################################
	// 動画コンテンツ表示のとき
	$(document).ready(function(){
		var btnClassName = ".bM";
		var d = document.getElementById("cmov");
		if(d){
			var iframes = d.getElementsByTagName("iframe")[0];
		}
		if( d && typeof iframes != "undefined" ){
			var name = "#" + iframes.id;
			var sc = eval(d.getElementsByTagName("script")[0].innerHTML);
			$(btnClassName).colorbox({width:bv_width, height:bv_height, inline:true, href:name});
		}
		
		// $(".subList").css("display","none");
		$(".rightMenu > ul > li > a").each(
			function(){
				if(document.title.indexOf($(this).text())>-1){
					
				}
				for( var i=0;i<$(this).siblings().get().length;i++ ){
					var subL = $(this).siblings().get(i);
					if(subL.className == "subList"){
						if($(subL).css("display")!=""){
							$(this).attr("href", "javascript:void(0);");
							$(this).click(
								function(){
									// var ul = $(this).siblings().get(0);
									var ul = $(subL).get(0);
									if( $(ul).css("display") == "none" ){
										// $(ul).slideDown();
									}
									else{
										// $(ul).slideUp();
									}
								}
							);
						}
					}
					var cList = $(this).parent().get();
					// if(!document.all) console.log( $(cList).attr("class") + $(subL).css("display") );
					if($(cList).attr("class") == "current"){
						if($(subL).css("display")=="none"){
							var ul = $(subL).get(0);
							// $(ul).slideDown();
						}
					}
				}
			}
		);
	});
	
}

