var strPath	= location.pathname;
var strUrl	= location.href.split("?");

var strPageName = strUrl[0];	/* s.pageName */
var strChannel  = "";			/* s.channel */ 

if( strPageName.charAt(strPageName.length-1) == "/" && strPath.length == 1 ) {
	strPath		= strPath + "index.html";
	strPageName = strPageName + "index.html";
}

var strTitle = document.title;  
var blnCatalystFlg = true;

// error 404
if( strTitle.indexOf("404 Not Found",0) >= 0 ) {
	blnCatalystFlg = false;
	s.pageType = "errorPage";
	var s_code=s.t();if(s_code)document.write(s_code);

// error 400 408 500 503
} 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 ) {
	blnCatalystFlg = false;
	
// top
} else if( strPath.indexOf("/index.html",0) == 0 ) {
	s.events = "event4";

// item_search
} else if( strPath.indexOf("/item_search/",0) >= 0 ) {
	s.events = "event5";
	
	var strParam = strPath.split("rootCategoryId,")[1];
	s.eVar1 = strParam.split("/")[0];
	
	if( strPath.indexOf("/rootCategoryId,1/",0) >= 0 ) {
		strChannel = "キッチン";
	} else if( strPath.indexOf("/rootCategoryId,2/",0) >= 0 ) {
		strChannel = "ユニットバス";
	} else if( strPath.indexOf("/rootCategoryId,3/",0) >= 0 ) {
		strChannel = "洗面化粧台";	
	} else if( strPath.indexOf("/rootCategoryId,4/",0) >= 0 ) {
		strChannel = "トイレ";
	} else if( strPath.indexOf("/rootCategoryId,5/",0) >= 0 ) {
		strChannel = "室内商品";
	} else if( strPath.indexOf("/rootCategoryId,6/",0) >= 0 ) {
		strChannel = "室外商品";
	}

// item_detail
} else if( strPath.indexOf("/item_detail/",0) >= 0 ) {
	s.events = "event6";

	var strParam = strPath.split("itemId,")[1];
	s.eVar2 = strParam.split("/")[0];

// forward_cart_index
} else if( strPath.indexOf("/forward_cart_index/",0) >= 0 ) {
	s.events = "event7";

// item_list
} else if( strPath.indexOf("/item_list/",0) >= 0 ) {
	s.events = "event8";

// forward_login
} else if( strPath.indexOf("/forward_login/",0) >= 0 ) {
	s.events = "event9";

// forward_mypage_index
} else if( strPath.indexOf("/forward_mypage_index/",0) >= 0 ) {
	s.events = "event10";
	
// mypage_entry_form
} else if( strPath.indexOf("/mypage_entry_form/",0) >= 0 ) {
	s.events = "event11";

// others 
} else {

}

if( blnCatalystFlg ) {
	s.pageName = strPageName;
	s.channel = strChannel;	
	var s_code=s.t();if(s_code)document.write(s_code);
}
