var strPath = location.pathname;
var strLastString = strPath.charAt(strPath.length-1);

if( strLastString == "/" ) {
	strPath = strPath + "index.html";
}

var strPageName = strPath;	// ページ名  
var strChannel  = "";	// カテゴリ  
var strPageType = "";	// 404エラー専用 
s.eVar1	= "";	// コンバージョン1　メーカー
s.eVar2	= "";	// コンバージョン2　排気量
s.eVar3	= "";	// コンバージョン3　郵便番号
s.eVar4	= "";	// コンバージョン4　車種名
s.eVar5	= "";	// コンバージョン5　ボディカラー
s.eVar6	= "";	// コンバージョン6　走行距離
s.eVar7	= "";	// コンバージョン7　年式
s.eVar8	= "";	// コンバージョン8　生年月日

var strTitle = document.title;	// ページタイトル  

// Error [404エラー画面]  
if( strTitle.indexOf("404 Not Found",0) == 0 ) {
	strPageType = "errorPage";

// Error [404以外のエラー画面] 
} else if( strTitle.indexOf("400 Bad Request",0) == 0 || strTitle.indexOf("408 Request Time-out",0) == 0 || 
	strTitle.indexOf("500 Internal Server Error",0) == 0 || strTitle.indexOf("503 Service Unavailable",0) == 0 ) {

// バイク買取_TOP [top(htdocs/index.html)]  
} else if( strPath.indexOf("/index.html",0) == 0 ) {
	strChannel = "バイク買取_TOP";
	s.events = "event4";

// バイク買取_ランディング [top以外の受け画面(エリア,ポイント,プロモ など)]  
} else if( strPath.indexOf("/area/",0) == 0 || strPath.indexOf("/point/",0) == 0 || strPath.indexOf("/promo/",0) == 0 || 
			strPath.indexOf("/index2.html",0) == 0 ) {
	strChannel = "バイク買取_ランディング";  

// バイク買取_コンテンツ [上記以外の画面]  
} else {
	
	// 対象のSTEP  
	if( strPath.indexOf("/step/bkt-detail/rsShowDetail",0) == 0 ) {
		strChannel = "バイク買取_コンテンツ";  
	
	// STEP以外  
	} else if( strPath.indexOf("/step/",0) == -1 ) {
		strChannel = "バイク買取_コンテンツ";  
	
	// STEP内  
	} else {
		strChannel  = "バイク買取_Stepフロー";
		blnStep = true;
		
		// バイク買取_Step  
		if(strPath.indexOf("answerStep0",0) != -1){
			strPageName = "バイク買取_AnswerStep0";
		}else if(strPath.indexOf("showStep0",0) != -1){
			strPageName = "バイク買取_ShowStep0";
			s.events = "event10:"+ document.answerForm.requestId.value;
		}else if(strPath.indexOf("answerstep1",0) != -1){
			strPageName = "バイク買取_AnswerStep1";
		}else if(strPath.indexOf("showStep1",0) != -1){
			strPageName = "バイク買取_ShowStep1";
			s.events = "event11:"+ document.answerForm.requestId.value;
		}else if(strPath.indexOf("showAreaError",0) != -1){
			strPageName = "バイク買取_ShowAreaError";
		}else if(strPath.indexOf("showConfirm",0) != -1){
			strPageName = "バイク買取_ShowConfirm";
			s.events = "event18:"+ document.answerForm.requestId.value;
			
			s.eVar1 = document.answerForm.answer_Q_maker_name.value;
			s.eVar2 = document.answerForm.answer_Q_engine_cc.value;	
			s.eVar3 = document.answerForm.answer_Q_zip_A_1.value + document.answerForm.answer_Q_zip_A_2.value;
			s.eVar4 = document.answerForm.answer_Q_shashu_name.value;
			s.eVar5 = document.answerForm.answer_Q_bc_base_id.value;
			s.eVar6 = document.answerForm.answer_Q_run_distant_id.value;
			s.eVar7 = document.answerForm.answer_Q_model_year.value;
			s.eVar8 = (document.answerForm.birth_day.value).substring(0, 4);
		}else if(strPath.indexOf("showThanks",0) != -1){
			strPageName = "バイク買取_ShowThanks";
			
			try {
				s.events = "event19:"+ document.answerForm.requestId.value;
			}catch(e){				
				try {
					s.events = "event19:"+ document.answerForm.ri.value;
				}catch(e){
					s.events = "event19";
				}
			}			
		}
	}
}

if( strPageType != "" ) {
	s.pageType=strPageType;
	var s_code=s.t();if(s_code)document.write(s_code);
} else if( strChannel != "" ) {
	s.pageName=strPageName;
	s.eVar49 = s.pageName;
	s.channel=strChannel;
	var s_code=s.t();if(s_code)document.write(s_code);
}