function category_toggle(anchor_obj, id,type,cno2,cno3){
	var force_toggle_type = 0;
	if(type==3){
		force_toggle_type = 1;
		type = 1;
	}else if (type==4){
		force_toggle_type = 2;
		type = 1;
	}
	var target_id = (type==1 || type==2)  ? "category_"+id : id;
	var target = $(target_id);
	if(force_toggle_type == 1){
		target.style.display = 'block';
	} else if(force_toggle_type == 1){
		target.style.display = 'none';
	}else{
		target.style.display = (target.style.display == 'none') ? 'block' : 'none';
	}
	anchor_obj.innerHTML = (target.style.display == 'none') 
		? '<img src="http://s.pimg.jp/image/common/icon_plus.gif" alt="サブカテゴリを開く" title="サブカテゴリを開く" width="11" height="11"/>' 
		: '<img src="http://s.pimg.jp/image/common/icon_minus.gif" alt="サブカテゴリを閉じる" title="サブカテゴリを閉じる" width="11" height="11"/>';
	if(target.innerHTML == '') {
		var url;
		if(type==1){
			url = '/movie/category_link/?rm=subcat&pno='+id;
		} else if(type==2){
			///url = '/category_link/?rm=subcat&pno='+id+'&cno2='+(cno2||'')+'&cno3='+(cno3||'');
			url = '/category_link/?rm=subcat&pno='+id+'&cno2='+(cno2||'');
		} else {
			url = '/html/top/' + id + '.html';
		}
//		new Ajax.Updater(target,url,{method: 'get'});
		new Ajax.Request(url,{
			method: 'get',
			onSuccess:function(req){
				target.innerHTML = req.responseText;
				if(cno2) category_toggle(document.getElementById("current_category2_anchor"),"category_list_"+cno2);
				if(cno2 && !cno3) document.getElementById("category2_name_anchor_"+cno2).style.background = 'orange';
				if(cno3) document.getElementById("category3_name_anchor_"+cno3).style.background = 'orange';
			}
		});
	}
}
function movie_category_toggle_all(anchor_obj,class_postfix) {
	var type;
	if(anchor_obj.innerHTML=='全て閉じる'){
		anchor_obj.innerHTML = '全て開く';
		type = 4;
	}else {
		anchor_obj.innerHTML = '全て閉じる';
		type = 3;
	}
	var ar = document.getElementsByClassName("category_anchor_class_"+class_postfix);
	for(var i=0;i<ar.length;i++){
		category_toggle(ar[i],ar[i].id.replace("category_anchor_",""),type)
	}
}

function biztype_toggle(id) {
	biztype = document.getElementById("biztype_" + id).style;
	if(biztype.display == 'none') {
		biztype.display = "block";
	}
	else {
		biztype.display = 'none';
	}
}

