sc_targetURL = location.pathname;

/****************************************
* PageGroup
* ページグルーピングロジックを記述します
* prop13-30 まで使用可能
*****************************************/
//s.prop13 = "";

/****************************************
* VOS同等　成果ページ番号
* 成果ページロード時にeventをセットします
*****************************************/

if(typeof(cmd_sc_events) != "undefined"
	&& cmd_sc_events != ""){
	s.events = cmd_sc_events;
}
else {
	if(location.search.match(/action=confirm/)){
		// 確認画面
	}
	else if(document.URL.match(/secure\..*\//)
				&& (sc_targetURL.match(/\/[0-9]{5}\/004/)
				|| sc_targetURL.match(/\/[0-9]{5}\/005/)
				|| sc_targetURL.match(/\/[0-9]{5}\/006/)
				|| sc_targetURL.match(/\/[0-9]{5}\/007/)
				|| sc_targetURL.match(/\/[0-9]{5}\/008/)
				|| sc_targetURL.match(/\/[0-9]{5}\/009/)
				|| sc_targetURL.match(/\/[0-9]{5}\/0[1-9][0-9]/)
				|| sc_targetURL.match(/\/compare\/[0-9]+/))
	){
		// 資料請求
		if(location.search.match(/action=fin/)){
			// 完了
			s.events="event5";
		}
		else{
			// 入力
			s.events="event8";
		}
	}
	else if( sc_targetURL.match(/\/cgi-bin\/kent_yoyaku_send.cgi/) ||
			sc_targetURL.match(/\/cgi-bin\/kent_yoyaku_send_cm.cgi/) ||
			sc_targetURL.match(/\/cgi-bin\/km_cmd\/kent_yoyaku_send.cgi/)){
			s.events="event3";	//きっかけ予約完了
	}
	else if(sc_targetURL.match(/\/cgi-bin\/ment_yoyaku_send.cgi/) ||
			 sc_targetURL.match(/\/cgi-bin\/ment_yoyaku_send_cm.cgi/) ||
			 sc_targetURL.match(/\/cgi-bin\/km_cmd\/ment_yoyaku_send.cgi/) ||
			 (
				(	document.URL.match(/secure.keikotomanabu.net\//) ||
					document.URL.match(/secure.sagaseru-eikaiwa.com\//) ||
					document.URL.match(/secure.isize.com\//)
				)
			 	&& location.search.match(/action=fin/))){
		s.events="event4";	//無料体験予約完了
	}
	else if(sc_targetURL.match(/\/cmd\/kik.html/)){
		s.events="event6";	//きっかけ予約入力
	}
	else if( document.URL.match(/secure.keikotomanabu.net\//) ||
			document.URL.match(/secure.sagaseru-eikaiwa.com\//) ||
			document.URL.match(/secure.isize.com\//)){
		s.events="event7";	//無料体験予約入力
	}
}

if (typeof(trace_p) == "undefined"){
	sc_isTracep = false;
}else{
	sc_isTracep = true;
}

if (sc_isTracep){
	sc_trace_p = trace_p.toLowerCase();
	if(	sc_trace_p =="bgl00101" ||
		sc_trace_p =="bgs00101"
	){
		s.events = "prodView,event2";
	}
}


/****************************************
* URL Parameter
* URLパラメータから取得する値をここに記述します
* prop31-40 まで使用可能
*****************************************/
//s.prop31="";

/****************************************
* 成果ページカテゴリー
* 成果ページが複数ある場合に、成果ページのカテゴリーをセット
* 例）ユーザ登録ページ、申込みページ 等
*****************************************/
if( sc_targetURL.match(/\/cgi-bin\/kent_yoyaku_send_cm.cgi/) ||
	sc_targetURL.match(/\/cgi-bin\/ment_yoyaku_send_cm.cgi/) ||
	sc_targetURL.match(/\/cgi-bin\/cart_seikyu_send_cm.cgi/)){
	s.eVar6="SS_CM";
}else{
	s.eVar6="Normal";
}

/****************************************
* CD取得
*****************************************/
function scGetDocumentName(url,delimiter){
	url = url.replace('.html','');
	var arryPathList = url.split(delimiter);
	var PathLength =arryPathList.length;
	var rtDocName = arryPathList[PathLength-1];
	return rtDocName;
}

function scGetParam(url,delimiter,param){
	var rtParam = "";
	var arryParamList = url.split(delimiter);
	var pattern =  new RegExp('^' + param);

	for(var i=0;i<arryParamList.length;i++){
		if(arryParamList[i].match(pattern)){
			rtParam = arryParamList[i].replace(param,'');
			break;
		}
	}
	return rtParam;
}

s.prop13=scGetParam(scGetDocumentName(sc_targetURL),'_','PC');
s.prop14=scGetParam(scGetDocumentName(sc_targetURL),'_','RC');

sc_KEN_ST = s.c_r('KEN_ST');
if(sc_KEN_ST){
	s.prop15 = sc_KEN_ST.split(':')[1];
}

s.prop16=scGetParam(scGetDocumentName(sc_targetURL),'_','DC');
s.prop17=scGetParam(scGetDocumentName(sc_targetURL),'_','GC');
s.prop18=scGetParam(scGetDocumentName(sc_targetURL),'_','ZC');
s.prop19=scGetParam(scGetDocumentName(sc_targetURL),'_','CC');

s.eVar10=s.prop13;
s.eVar11=s.prop14;
s.eVar12=s.prop15;
s.eVar13=s.prop16;
s.eVar14=s.prop17;
s.eVar15=s.prop18;
s.eVar16=s.prop19;

/****************************************
* transactionID取得
*****************************************/
if (typeof(sc_transactionID) == "undefined"){
	sc_isTID = false;
}else{
	sc_isTID = true;
}
if(sc_isTID){
	s.transactionID = sc_transactionID;
	s.s.eVar2 = s.transactionID;
}

