//ブランド一覧とカテゴリー一覧を不可視にしておく。
window.onload = function() {
	if (! document.getElementById) {
		return;
	}
	
	var brandNameList = document.getElementById('brandNameList');
	var categoryNameList = document.getElementById('categoryNameList');
	
	brandNameList.style.display = "none";
	categoryNameList.style.display = "none";
	
	brandNameList.heading = document.getElementById('brandH');	//見出し要素
	categoryNameList.heading = document.getElementById('categoryH');	//見出し要素
	
	//見出しの背景画像をチェンジ。(三角マーク)
	brandNameList.heading.showBg = "url('/images/skin/icon/triangle_down.png')";
	brandNameList.heading.hideBg = "url('/images/skin/icon/triangle_right.png')";
	brandNameList.heading.style.backgroundImage = brandNameList.heading.hideBg;
	
	categoryNameList.heading.showBg = "url(/images/skin/icon/triangle_down.png)";
	categoryNameList.heading.hideBg = "url(/images/skin/icon/triangle_right.png)";
	categoryNameList.heading.style.backgroundImage = categoryNameList.heading.hideBg;
}


//引数 idの要素を可視/不可視にする
function hideShowElement(id){
	var obj = document.getElementById(id);
	
	if ((! obj) || (! obj.style)) {
		return false;
	}
	
	if (obj.style.display == "none") {
		obj.style.display = "block";
		obj.heading.style.backgroundImage = obj.heading.showBg;
	} else {
		obj.style.display = "none";
		obj.heading.style.backgroundImage = obj.heading.hideBg;
	}
	
	return false;
}



