function selectShop(tag,dirlevel) {
	this.BaseID = 'SearchFrame';
	this.ParentTag = tag;
	this.ParentName = 'parent';
	this.ChildName = 'child';
	if(dirlevel == 0){
		this.ImageDir = './style/css/images/';
	} else if(dirlevel == 1){
		this.ImageDir = '../style/css/images/';
	}
	this.ImageOn = 'bullet_arrow_blue_down.gif';
	this.ImageOff = 'bullet_arrow_red.gif';
	this.BgColorOver = '#ffffff';
	this.BgColorOut = 'transparent';
	this.ColorOn = '#09c';
	this.ColorOff = '#000';

	this.Parents = [];

	this.Setup = function() {
		if(document.getElementById){
			Base = document.getElementById(BaseID);
			HeadingList = Base.getElementsByTagName(ParentTag);
			for(var i=0; i<HeadingList.length; i++){
				ParentID = ParentName + i;
				ChildID = ChildName + i;
				Parent = document.getElementById(ParentID);
				Child = document.getElementById(ChildID);
				this.Parents[i] = new this.ToggleSwitch(Parent,Child);
				handler = this.Parents[i].eventHandler;
				Parent.onclick = handler;
				Parent.onmouseover = handler;
				Parent.onmouseout = handler;
				Child.style.display = "none";
			}
		}
	}

	this.ToggleSwitch = function(block1,block2) {
		this.ShowFlg = false;
		this.SwitchBlock = block1;
		this.TargetBlock = block2;
		var me = this;
		this.eventHandler = function(e) {
			OnImage = 'url(' + ImageDir + ImageOn + ')';
			OffImage = 'url(' + ImageDir + ImageOff + ')';
			e = e||window.event;
			if (e.type == 'click') {
				if(me.ShowFlg){
					me.SwitchBlock.style.backgroundImage = OffImage;
					me.TargetBlock.style.display = "none";
					me.SwitchBlock.style.color = ColorOff;
				} else {
					me.TargetBlock.style.display = "block";
					me.SwitchBlock.style.backgroundImage = OnImage;
					me.SwitchBlock.style.color = ColorOn;
				}
				me.ShowFlg = !me.ShowFlg;
			} else if (e.type == 'mouseover') {
				me.SwitchBlock.style.backgroundColor = BgColorOver;
				me.SwitchBlock.style.cursor = "hand";
				me.SwitchBlock.style.cursor = "pointer";
			} else if (e.type == 'mouseout') {
				me.SwitchBlock.style.backgroundColor = BgColorOut;
				me.SwitchBlock.style.cursor = "default";
			}
		}
	}

	this.Setup();
}
