//グローバルナビ画像ON/OFF分岐

	//パス取得

	path = location.pathname;
	if(path.match("/goods/history/")){
		document.getElementById("subNavi09").setAttribute("id","active");
	}
	else if(path.match("/goods/guarantee/")){
		document.getElementById("subNavi10").setAttribute("id","active");
	}
	else if(path.match("/goods/products/lady.php")){
		document.getElementById("subNavi15").setAttribute("id","active");
	}
	else if(path.match("/goods/products/men.php")){
		document.getElementById("subNavi14").setAttribute("id","active");
	}
	else if(path.match("/goods/products/category.php")){
		document.getElementById("subNavi13").setAttribute("id","active");
	}
	else if(path.match("/goods/")){
		document.getElementById("subNavi11").setAttribute("id","active");
	}	
	
/*
	else if(path.match("/goods/")){
		document.getElementById("subNavi08").setAttribute("id","active");
	}
*/

/*
	getprms = new CLocationSearch(location.search);
	catval = getprms.item("category_id");
	if(path.match("/goods/")){
		if(path.match("/goods/$")){//商品検索TOP
			document.getElementById("subNavi01").setAttribute("id","active");
		}else if(path.match("/products/men.php") || (catval >= "21" && catval <= "28")){//Men's
			document.getElementById("subNavi02").setAttribute("id","active");
		}else if(path.match("/products/lady.php") || (catval >= "37" && catval <= "44")){//Lady's
			document.getElementById("subNavi03").setAttribute("id","active");
		}
	};
*/

function CLocationSearch(sSource) {
	
	/* 初期化処理 */
	var sAry = new Array();	/* アイテム配列を追加 */
	{
		var nCur = 0, nRet = 0;
		var sSearch = sSource.substr(1);
		var sName, sValue;
				
		nRet = sSearch.indexOf('=', nCur)		// 最初の'='を検索
		while(nRet >= 0) {
			// '='以前が変数名
			sName = sSearch.substring(nCur, nRet);
			nCur = nRet + 1;
			
			// 値を取り出す
			nRet = sSearch.indexOf('&', nCur);	// 変数の区切りを検索
			if (nRet == -1) nRet = sSearch.length + 1;		// なければ最後まで
			sValue = sSearch.substring(nCur, nRet);
			
			// 配列に格納
			sAry[sName] = sValue;
			
			// 次を検索
			nCur = nRet + 1;
			nRet = sSearch.indexOf('=', nCur);
		}
	}
	
	/* 値 */
	this.valueOf = function () {
		return sSource;
	}
	
	/* 値を取り出すメソッド */
	this.item = function (sVarname) {
		try {
			return sAry[sVarname];	//あれば返す
		} catch(e) {
			return '';				//なければ空文字を返す
		}
	}
	
	/* 要素数 */
	this.length   = function () {
		return sAry.length;
	}
	
	/* toString */
	this.toString = function () {
		return this.length + '';
	}
	
}

