// var http_request=new httpRequest(); // xmlhttp.jsで生成
var url_pref_ssl="https://secure.tokyo-horei.co.jp";
var url_pref_www="http://www.tokyo-horei.co.jp";
var url_pref_toho="http://toho.tokyo-horei.co.jp";
var cookie_params={
	"cart":{
		"path"    : "/",
		"domain"  : "tokyo-horei.co.jp"
	}
};



function loadFoot_ga(){
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	document.write('<script src="/inc/ga3.js" type="text/javascript"></script>');
}
var JSON;
function loadFoot_scripts(){
	if(! JSON) document.write('<script src="/inc/json.js" type="text/javascript"></script>');
	document.write('<script src="/inc/category_list.js.php" type="text/javascript" charset="euc-jp"></script>');
	document.write('<script src="/inc/dropdownbox.js" type="text/javascript"></script>');
}


var headMessageBox={};
/*
headMessageBox.short_html='<span style="color:#66F;background-color:#FFF;border:0px none;padding:2px 5px;text-decoration:underline;"><!--定期メンテナンスのため-->3月8日(月)午前0時〜6時の間、クレジットカードでのご注文ができなくなります(振込用紙でのご注文は可能です)…</span>';
headMessageBox.long_html='●三菱UFJニコス株式会社様の定期メンテナンスのため、3月8日(月)午前0時〜6時の間、クレジットカードでのご注文ができなくなります（振込用紙でのご注文は通常通り承っております）。ご不便をおかけいたしますがよろしくお願い申し上げます。</div>';
headMessageBox.short_html='<span style="color:#66F;background-color:#FFF;border:0px none;padding:2px 5px;text-decoration:underline;">弊社システムメンテナンスのため6月7日(土)午前9時〜午後5時までホームページをご利用いただけません…</span>';
headMessageBox.long_html='システムメンテナンスのため<span style="font-weight:bold;">6月7日(土)午前9時〜午後5時</span>までの間ホームページをご利用いただけません。ご不便をおかけいたしますがよろしくお願い申し上げます。';
headMessageBox.short_html='<span style="color:#66F;background-color:#FFF;border:0px none;padding:2px 5px;text-decoration:underline;">電気設備工事のため6月20日(日)午前8時〜午後5時までホームページをご利用いただけません…</span>';
headMessageBox.long_html='電気設備工事のため<span style="font-weight:bold;">6月20日(日)午前8時〜午後5時</span>までの間ホームページをご利用いただけません。ご不便をおかけいたしますがよろしくお願い申し上げます。';

headMessageBox.short_html='<span style="color:#66F;background-color:#FFF;border:0px none;padding:2px 5px;text-decoration:underline;">９月19日（土）〜９月23日（水）の期間、弊社休業に伴い、受注・発送業務が停止いたします。…</span>';
headMessageBox.long_html='●弊社休業に伴い、受注・発送業務が停止いたします。お客様にはご迷惑をお掛けいたしますが、何卒ご了承くださいますようお願い申し上げます。<div style="padding-left:3em;"><strong>[休業期間]</strong><br>９月19日（土）〜９月23日（水）<br><strong>[受注・発送について]</strong><br>電話／ＦＡＸによるお申込み：18日お申込み：24日出荷<br>ＷＥＢによるお申込み（18日11時までにお申込み分）：当日出荷<br>ＷＥＢによるお申込み（18日11時〜23日お申込み分）：24日以降、順次出荷</div>';
headMessageBox.short_html='<span style="color:#66F;background-color:#FFF;border:0px none;padding:2px 5px;text-decoration:underline;">12月29日（火）〜１月５日（火）の期間、弊社休業に伴い、受注・発送業務が停止いたします。…</span>';
headMessageBox.long_html='●弊社休業に伴い、受注・発送業務が停止いたします。お客様にはご迷惑をお掛けいたしますが、何卒ご了承くださいますようお願い申し上げます。<div style="padding-left:3em;"><strong>[休業期間]</strong><br>12月30日（水）〜１月５日（火）<br><strong>[受注・発送について]</strong><br>電話／ＦＡＸによるお申込み（12月29日10時までにお申込み分）：当日出荷<br>電話／ＦＡＸによるお申込み（12月29日10時〜１月５日お申込み分）：１月６日以降、順次出荷<br>ＷＥＢによるお申込み（12月29日11時までにお申込み分）：当日出荷<br>ＷＥＢによるお申込み（12月29日11時〜１月５日お申込み分）：１月６日以降、順次出荷</div>';
headMessageBox.short_html='<span style="color:#66F;background-color:#FFF;border:0px none;padding:2px 5px;text-decoration:underline;">ゴールデンウィーク期間中のご注文・発送業務について。…</span>';
headMessageBox.long_html='ゴールデンウィーク期間中のご注文・発送業務について。…<br>●弊社休業に伴い、受注・発送業務が停止いたします。お客様にはご迷惑をお掛けいたしますが、何卒ご了承くださいますようお願い申し上げます。<div style="padding-left:3em;"><strong>[休業期間]</strong><br>５月１日（土）〜５月５日（水）<br><strong>[受注・発送について]</strong><br>電話／ＦＡＸによるお申込み：４月30日お申込み：５月６日以降、順次出荷<br>ＷＥＢによるお申込み（４月30日午前11時までにお申込み分）：当日出荷<br>ＷＥＢによるお申込み（４月30日11時〜５月５日お申込み分）：５月６日以降、順次出荷</div>';
*/


headMessageBox.startDate = new Date(2010, 7-1,14);         //2010-06-12
headMessageBox.endDate   = new Date(2010, 8-1,2, 10, 0, 0);//2010-06-20 09:00
headMessageBox.default_size="hide";//show or hide

headMessageBox.short_html='<span style="color:#66F;background-color:#FFF;border:0px none;padding:2px 5px;text-decoration:underline;">７月30日（金）弊社棚卸に伴い、発送業務が停止いたします。…</span><br><span style="color:#66F;background-color:#FFF;border:0px none;padding:2px 5px;text-decoration:underline;">8月2日(月)午前1時〜9時の間、クレジットカードでのご注文ができなくなります(振込用紙でのご注文は可能です)…</span>';
headMessageBox.long_html='●弊社棚卸に伴い、発送業務が停止いたします。お客様にはご迷惑をお掛けいたしますが、何卒ご了承くださいますようお願い申し上げます。<div style="padding-left:3em;">平成22年７月29日（木）午前11時以降のご注文につきましては、平成22年８月２日以降順次発送いたします。</div>●システムメンテナンスのため、8月2日(月)午前1時〜9時の間、クレジットカードでのご注文ができなくなります（振込用紙でのご注文は通常通り承っております）。お客様にはご迷惑をお掛けいたしますが、何卒ご了承くださいますようお願い申し上げます。';


//----------
headMessageBox.short_html_div=function(display){
	return '<div id="messagebox_short" style="display:'+display+';cursor:pointer;margin:0px 5px;font-size:9pt;" '+
		' onclick="headMessageBox.short_message_onclick();">';
};
headMessageBox.long_html_div=function(display){
	return '<div id="messagebox_all" style="cursor:pointer;display:'+display+
		';font-size:10pt;line-height:1.5;border:1px solid #F00; background-color:#FFF; color:#F00; text-align:left;margin:0px 3px;padding:2px 5px;" '+
		' onclick="headMessageBox.long_message_onclick();">';
};
headMessageBox.getHTML=function(){
	var mb_cookie=getCookie('messageboxshowhide');
	if( mb_cookie=="" && headMessageBox.default_size=="hide" ) mb_cookie="hide";
	var nd=new Date();
	if(nd.getTime()>headMessageBox.startDate.getTime() && nd.getTime()<=headMessageBox.endDate.getTime()){
		if(mb_cookie=='hide'){
			return headMessageBox.short_html_div("block")+headMessageBox.short_html+"</div>"+
				headMessageBox.long_html_div("none")+headMessageBox.long_html+"</div>";
		}else{
			return headMessageBox.short_html_div("none")+headMessageBox.short_html+"</div>"+
				headMessageBox.long_html_div("block")+headMessageBox.long_html+"</div>";
		}
	}else{
		return "";
	}
};
headMessageBox.short_message_onclick=function(){
	var mb_s=document.getElementById('messagebox_short');
	var mb_a=document.getElementById('messagebox_all');
	if(mb_s && mb_a){
		mb_s.style.display='none';
		mb_a.style.display='block';
		document.cookie='messageboxshowhide=show;'+(headMessageBox.endDate?' expires='+headMessageBox.endDate.toGMTString()+';':'')+
			' path=/; domain='+cookie_params.cart.domain;
	}
};
headMessageBox.long_message_onclick=function(){
	var mb_s=document.getElementById('messagebox_short');
	var mb_a=document.getElementById('messagebox_all');
	if(mb_s && mb_a){
		mb_s.style.display='block';
		mb_a.style.display='none';
		document.cookie='messageboxshowhide=hide;'+(headMessageBox.endDate?' expires='+headMessageBox.endDate.toGMTString()+';':'')+
			' path=/; domain='+cookie_params.cart.domain;
	}
};


var member_info;
function process_member_info(){
	var new_member_info=JSON.parse(http_request.xmlHttp.responseText);
	if(new_member_info){
		if(!member_info)member_info={};
		for(var new_info in new_member_info){
			member_info[new_info]=new_member_info[new_info];
			process_member_info[new_info]();
		}
	}
}
process_member_info.disableT=false;
process_member_info.refresh=function(){
	var req="";
	if(arguments.length==0){
		if(process_member_info.disableT){
			req="m,c,mes";
		}else{
			req="all";
		}
	}else{
		for(var i=0; i<arguments.length; i++){
			switch(arguments[i]){
			case "member_info": req+=",m"  ;break;
			case "cart"       : req+=",c"  ;break;
			case "message"    : req+=",mes";break;
			case "t"          : req+=",t"  ;break;
			}
		}
		//req=arguments.join(",");
	}
	http_request.request(
		"POST",
		'/shop/info.php',
		process_member_info,
		'href='+encodeURIComponent(location.href)+
			'&referer='+encodeURIComponent(document.referrer)+
			'&user_agent='+encodeURIComponent(window.navigator.userAgent)+
			'&user_agent_appname='+encodeURIComponent(window.navigator.appName)+
			'&user_agent_appversion='+encodeURIComponent(window.navigator.appVersion)+
			'&user_agent_platform='+encodeURIComponent(window.navigator.platform)+
			'&req='+encodeURIComponent(req)
	);
}
process_member_info.member_info=function(){
	if(!member_info || !member_info['member_info'])return;

	var mi=member_info['member_info'];
	if( mi['kaiin_reg']=='0')
		document.getElementById('not_kaiin_reg').style.display = "block";
	member_name=mi['member_name'];
	if(mi["point_y"] && mi["point_y"]>0)
		member_name+="("+mi["point_y"]+"ポイント)";
	//print_name_param(mi['member_name']);
	print_name_param(member_name);
	for(var i=0; i<process_member_info.member_info.onload.length; i++){
		process_member_info.member_info.onload[i]();
	}
}
process_member_info.member_info.onload=[];
process_member_info.cart=function(){
	if(!member_info || !member_info['cart'])return;
	refresh_count_cart();
	var cartbox=document.getElementById('cartbox');
	if( cartbox )document.body.removeChild(cartbox);
	if(member_info['cart'].length<=0)return;

	var buf=[];
	buf[buf.length]='<table class="head_cart_list">';
	for(var i=0;i<member_info['cart'].length ;i++){
		var ccart=member_info['cart'][i];
		buf[buf.length]='<tr class="head_cart_list">';
		buf[buf.length]='<td class="head_cart_list"><a href="/shop/g.php?'+ccart['codeid']+'">';
		buf[buf.length]=ccart['subtitle1']+'<strong>'+ccart['name']+'</strong>'+ccart['subtitle2']+'</a></td>';
		buf[buf.length]='<td class="head_cart_list" align="right">';
		buf[buf.length]=
			(ccart['kake']!=100?
				Math.floor(ccart['price']*ccart['kake']/100)+'円(定価 '+ccart['price']+'円)':
				ccart['price']+'円'
			)+'</td>';
		buf[buf.length]='</tr>';
	}
	buf[buf.length]='</table>';

	var cartbase=document.getElementById("cartbox_base");
	if(cartbase){
		cartbox=document.createElement('div');
		var site_style=site.get_style();
		cartbox.id='cartbox';
		cartbox.innerHTML=buf.join('');
		cartbox.style.display="none";
		cartbox.style.backgroundColor=site_style['color4'];
		cartbox.style.borderColor=site_style['color2'];
		document.body.appendChild(cartbox);
		var elems=document.getElementsByClassName('head_cart_list');
		for(var i=0; i<elems.length; i++){
			elems[i].style.backgroundColor=site_style['color4'];
			elems[i].style.borderColor=site_style['color2'];
		}
		new Toho.DropdownBox(cartbase,cartbox,200);
	}

	for(var i=0; i<process_member_info.cart.onload.length; i++){
		process_member_info.cart.onload[i]();
	}
}
process_member_info.cart.onload=[];
process_member_info.message=function(){
	if(!member_info || !member_info['message'] || member_info['message'].length<=0)return;

	var elem=document.getElementById('member_message_box');
	if(elem){
		var site_style=site.get_style();
		elem.innerHTML=
			'<div style="margin:0px 3px;border:1px solid '+site_style['color2']+'; background-color:'+site_style['color4']+';">'+
				'<div style="text-align:center;color:#F00;font-weight:bold;font-size:9pt;border:solid '+
					site_style['color2']+';border-width:0px 0px 1px; background-color:'+site_style['color4']+';">≪お知らせ≫</div>'+
				'<div style="text-align:center;font-size:9pt; background-color:#FFF;padding:5px 0px;">'+member_info['message'][0]+'</div>'+
				'<div style="text-align:center;font-size:9pt; background-color:#FFF;padding:2px 0px">'+
					'<span style="cursor:pointer;border:1px solid #000; background-color:'+site_style['color4']+'; padding:2px;" id="close_member_message_box">閉じる</span>'+
				'</div>'+
			'</div>';
		elem=document.getElementById('close_member_message_box');
		if(!elem)return;
		elem.onclick=function(){
			http_request.request("GET",'/shop/hide_message.php',empty_function);
			var elem=document.getElementById('member_message_box');
			if(!elem)return;
			elem.innerHTML="";
		}
	}
}
function keep_session(req){
	var interval_msec=10*60*1000;
	if(req)http_request.request("GET",'/shop/keep_session.php',empty_function);
	setTimeout("keep_session(true)",interval_msec);
}


// ----------------------------------------------------------
//
// function init()
// 個々のページで初期化時にコードを実行したい場合は
// init.list.push(関数)
// とする。
//
// ----------------------------------------------------------
function empty_function(){}
function init(){
	if( init.list ){
		for(var i=0; i<init.list.length; i++) init.list[i]();
		delete init.list;
	}
}
if(!init.list)init.list=[];
var member_name; // 会員名。
init.list.push(
	process_member_info.refresh,
	function(){
		MM_preloadImages('/imgs_c/ico_topagetop_o.gif');
	},
	/*
	function(){
		// strMessageBox
		var mb_s=document.getElementById('messagebox_short');
		var mb_a=document.getElementById('messagebox_all');
		var mb_cookie=getCookie('messageboxshowhide');
		if(mb_s && mb_a){
			mb_s.onclick=function(){
				mb_s.style.display='none';
				mb_a.style.display='block';
				document.cookie='messageboxshowhide=show; path=/; domain='+cookie_params.cart.domain;
			};
			mb_a.onclick=function(){
				mb_s.style.display='block';
				mb_a.style.display='none';
				document.cookie='messageboxshowhide=hide; path=/; domain='+cookie_params.cart.domain;
			};
			if(mb_cookie=='hide'){
				mb_s.style.display='block';
			}else{
				mb_a.style.display='block';
			}
		}
	},
	*/
	keep_session
);
// ----------------------------------------------------------
//
// init
//
// ----------------------------------------------------------
function send_error_mail(msg,subject){
	function dmp_obj(elem,name,p,s,u,lim){ //elem,element name,prefix string,suffix string,prefix(add)string,recursive limit
		var r="";
		if( ! lim )lim=5;
		if( lim<=0 ) return p+name+"="+elem.toString()+"(limit)"+s;
		if( typeof(elem)=="object" ){
			for(c in elem)r+=dmp_obj(elem[c],c,u+p,s,u,lim-1);
			return r;
		}else{
			if( typeof(elem)=="function" )
				return p+name+"=function.."+s
			else
				return p+name+"="+elem.toString()+s;
		}
	}
	subject='&subject='+encodeURIComponent('[HP WARN: '+location.hostname+']'+(subject?' '+subject:''));
	http_request.request(
		"POST",
		'/shop/alert.php',
		empty_function,
		"msg="+encodeURIComponent(
			msg+"\n"+
			"location=\n"+dmp_obj(location,"location","","\n"," ",5)+"\n"
			+"referrer="+document.referrer
		)+subject
	);
}
window.onerror=function(msg,url,linenum){
	if( ! window.navigator.userAgent.match( / MSIE 5\.5;/ ) ){
		send_error_mail(
			"message : "+msg
			+"\nURL     : "+url
			+"\nlinenum : "+linenum
			+"\nwindow.navigator.appName="+window.navigator.appName
			+"\nwindow.navigator.appVersion="+window.navigator.appVersion
			+"\nwindow.navigator.userAgent="+window.navigator.userAgent+"\n"
			,"[js error]");
	}
}


function autologin_confirm(){
	if( document.login_form_frame.autologin.checked ){
		return confirm(
			'このパソコンで弊社ＨＰにアクセスすると自動的にログインするように設定します。\n'+
			'※他人と共有するパソコンでは自動ログインに設定しないで下さい。\n\n'+
			'自動ログインに設定しますか？');
	}else{
		return true;
	}
}




var site_styles={
	'www':{
		'color0':'#0000cc',    //最上部の太線
		'image0':'logo.gif',   //社名ロゴ
		'color1':'#ccddff',    //ロゴ右側の網（検索表示）
		'color2':'#3366ff',    //サイト左側の網
		'color3':'#99ccff',    //サイト表示の網（エリア左側の網）
		'color4':'#eef8ff',    //エリア表示の網
		'IDXname':'tokyohorei' //namazu で使用する検索インデックス名
	},
	'toho':{
		'color0':'#339933',      //最上部の太線
		'image0':'logotoho.gif', //社名ロゴ
		'color1':'#ddffcc',      //ロゴ右側の網（検索表示）
		'color2':'#33cc66',      //サイト左側の網
		'color3':'#99ee66',      //サイト表示の網（エリア左側の網）
		'color4':'#eeffcc',      //エリア表示の網
		'IDXname':'indextoho'    //namazu で使用する検索インデックス名
	},
	'default':{
		'color0':'#660000',    //最上部の太線
		'image0':'logo.gif',   //社名ロゴ
		'color1':'#eeeecc',    //ロゴ右側の網（検索表示）
		'color2':'#aa8833',    //サイト左側の網
		'color3':'#eedd99',    //サイト表示の網（エリア左側の網）
		'color4':'#f8f8cc',    //エリア表示の網
		'IDXname':'tokyohorei' //namazu で使用する検索インデックス名
	}
}


// 表示するサブサイトメニューの初期値を設定する。
//東京法令サイト	showHide('www')
//とうほうサイト	showHide('toho')
//お買物かご		showHide('shop')
//お問い合わせ		showHide('support')
//会社案内			showHide('company')
//会員				showHide('kaiin')
function showHide(site_kind) {
	if(!document.getElementById) return;
	if(! site_kind || site_kind==""){
		site_kind=site.kind;
	}else if(! site.is_available("sitekind",site_kind) ){
		send_error_mail("in showHide: param site_kind is not available: site_kind="+site_kind);
		site_kind=site.kind;
	}
	var site_style=site.get_style();


	var elem=document.getElementById('site_www_td'); if(elem)elem.style.backgroundColor='transparent';
	elem=document.getElementById('site_toho_td'); if(elem)elem.style.backgroundColor='transparent';
	elem=document.getElementById('site_shop_td'); if(elem)elem.style.backgroundColor='transparent';
	elem=document.getElementById('site_support_td'); if(elem)elem.style.backgroundColor='transparent';
	elem=document.getElementById('site_company_td'); if(elem)elem.style.backgroundColor='transparent';
	elem=document.getElementById('site_kaiin_td'); if(elem)elem.style.backgroundColor='transparent';
	elem=document.getElementById('site_'+site_kind+'_td'); if(elem)elem.style.backgroundColor=site_style['color4'];

	elem=document.getElementById('site_www'); if(elem)elem.style.display = "none";
	elem=document.getElementById('site_toho'); if(elem)elem.style.display = "none";
	elem=document.getElementById('site_shop'); if(elem)elem.style.display = "none";
	elem=document.getElementById('site_support'); if(elem)elem.style.display = "none";
	elem=document.getElementById('site_company'); if(elem)elem.style.display = "none";
	elem=document.getElementById('site_kaiin'); if(elem)elem.style.display = "none";
	elem=document.getElementById('site_'+site_kind); if(elem)elem.style.display = "block";

/*
	document.getElementById('site_www_td').style.backgroundColor='transparent';
	document.getElementById('site_toho_td').style.backgroundColor='transparent';
	document.getElementById('site_shop_td').style.backgroundColor='transparent';
	document.getElementById('site_support_td').style.backgroundColor='transparent';
	document.getElementById('site_company_td').style.backgroundColor='transparent';
	document.getElementById('site_kaiin_td').style.backgroundColor='transparent';
	document.getElementById('site_'+site_kind+'_td').style.backgroundColor=site_style['color4'];

	document.getElementById('site_www').style.display = "none";
	document.getElementById('site_toho').style.display = "none";
	document.getElementById('site_shop').style.display = "none";
	document.getElementById('site_support').style.display = "none";
	document.getElementById('site_company').style.display = "none";
	document.getElementById('site_kaiin').style.display = "none";
	document.getElementById('site_'+site_kind).style.display = "block";
*/
}


// ----------------------------------------------------------
//
//      function LoadMenus()
//
// ----------------------------------------------------------
// site.loadMenus を使用する。
// site.loadMenus(
//    {
//        "kind"         : "www", // (www|toho|shop|support|company)
//        "groupid"      : 1,     //
//        "show_kindmenu": true   // false ならば、東京法令の名称(画像)のみを表示し、ページ移動用メニューを表示しない。
//    }
// );
// site.loadMenus(param) は以下と等価
// site.set_params(param);
// site.show_menu();
// site.toggle_tab();
function LoadMenus(){
	var site_style=site.get_style();
	var htmlout=[];

htmlout.push('<div id="pagetop" name="pagetop" class="ctrl_screen">');

// ロゴと検索エリア ---------
if( ! site.is_visible("kindmenu") ){
	htmlout.push('<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">'+"\n");
	htmlout.push('	<TR>'+"\n");
	htmlout.push('		<TD colspan=2 bgcolor="'+site_style['color0']+'"><a name="top"><IMG src="/imgs_c/spacer.gif" width="1" height="4"></a></TD>'+"\n");
	htmlout.push('	</TR>'+"\n");
	htmlout.push('	<TR bgcolor="#ffffff">'+"\n");
	htmlout.push('		<TD width="216" style="padding-left:16px;"><IMG src="/imgs_c/'+site_style['image0']+'" width="184" height="26" alt="東京法令出版株式会社" hspace="16"></TD>'+"\n");
	htmlout.push('		<TD bgcolor="'+site_style['color1']+'"><IMG src="/imgs_c/spacer.gif" width="16" height="1"></TD>'+"\n");
	htmlout.push('	</TR>'+"\n");
	htmlout.push('</TABLE>'+"\n");
}else{
htmlout.push('<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD colspan=2 bgcolor="'+site_style['color0']+'"><a name="top"><IMG src="/imgs_c/spacer.gif" width="1" height="4"></a></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('	<TR bgcolor="#ffffff">'+"\n");

	if(site.name=="toho"){
		htmlout.push('		<TD width="216" style="padding-left:16px;"><a href="/"><IMG src="/imgs_c/'+site_style['image0']+'" border="0" width="184" height="26" alt="とうほう"></a></TD>'+"\n");
	}else{
		htmlout.push('		<TD width="216" style="padding-left:16px;"><a href="'+url_pref_www+'/"><IMG src="/imgs_c/'+site_style['image0']+'" border="0" width="184" height="26" alt="東京法令出版株式会社"></a></TD>'+"\n");
	}

htmlout.push('		<TD width="90%">'+"\n");


	if(location.protocol =="https:"){
htmlout.push('<div class="font9" align=right>'+"\n");
htmlout.push('<IMG src="/imgs_c/spacer.gif" width="4" height="36" align="middle">このページは暗号化通信(SSL)を使用しています。'+"\n");
//htmlout.push('<script src=https://seal.verisign.com/getseal?host_name=secure.tokyo-horei.co.jp&size=S&use_flash=NO&use_transparent=YES&lang=ja></script>');
htmlout.push('</div>'+"\n");
	}else if( site.is_visible('searchbar') ){
htmlout.push('			<TABLE border="0" cellspacing="0" cellpadding="2" align="right">'+"\n");
htmlout.push('			<FORM name="srchform" onsubmit="return setkeywd()" action="" method="GET">'+"\n");
htmlout.push('				<TR>'+"\n");
htmlout.push('					<TD height="36"><IMG src="/imgs_c/search.gif" width="64" height="32" vspace=2></TD>'+"\n");
htmlout.push('					<TD class="font9"><INPUT name="inline" type="text" class="menuselector" size="30" value="">'+"\n");
htmlout.push('					<INPUT name="submit" type="submit" class="menuselector" onclick="return document.srchform.selitem.value=1" value="キーワード">'+"\n");
htmlout.push('					<INPUT name="submit" type="submit" class="menuselector" onclick="return document.srchform.selitem.value=2" value="書籍名">'+"\n");
htmlout.push('					<INPUT name="submit" type="submit" class="menuselector" onclick="return document.srchform.selitem.value=3" value="著者名">'+"\n");
htmlout.push('					<INPUT name="submit" type="submit" class="menuselector" onclick="return document.srchform.selitem.value=4" value="内容紹介">&nbsp;'+"\n");
htmlout.push('					<INPUT type="hidden" name="selitem">'+"\n");
htmlout.push('					<INPUT type="hidden" name="query">'+"\n");
htmlout.push('					<INPUT type="hidden" name="reference" value="off">'+"\n");
htmlout.push('					<INPUT type="hidden" name="whence" value="0">'+"\n");
htmlout.push('					<INPUT type="hidden" name="idxname" value="'+site_style['IDXname']+'">'+"\n");
htmlout.push('					<INPUT type="hidden" name="category" value="*">'+"\n");
htmlout.push('					<INPUT type="hidden" name="maxR" value="10">'+"\n");
htmlout.push('					<INPUT type="hidden" name="offset" value="0">'+"\n");
htmlout.push('					<INPUT type="hidden" name="booktitle">'+"\n");
htmlout.push('					<INPUT type="hidden" name="author">'+"\n");
htmlout.push('					<INPUT type="hidden" name="contents">'+"\n");
htmlout.push('					<INPUT type="hidden" name="searchgroupid" value="'+((site.groupid<50)?'0':'50')+'">'+"\n");
htmlout.push('					<INPUT type="hidden" name="groupID" value="'+((site.groupid<50)?'0':'50')+'"></TD>'+"\n");
htmlout.push('				</TR>'+"\n");
htmlout.push('			</FORM>'+"\n");
htmlout.push('			</TABLE>'+"\n");
	}else{
htmlout.push('<div class="font9" align=right>'+"\n");
htmlout.push('<IMG src="/imgs_c/spacer.gif" width="4" height="36" align="middle">'+"\n");
htmlout.push('</div>'+"\n");
	}


htmlout.push('		</TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD width="216" bgcolor="#ffffff"><IMG src="/imgs_c/spacer.gif" width="1" height="1"></TD>'+"\n");
htmlout.push('		<TD bgcolor="'+site_style['color2']+'"><IMG src="/imgs_c/spacer.gif" width="1" height="1"></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");

// 会員関連エリア ---------
htmlout.push('<div style="padding-left:16px;">'+"\n");
htmlout.push('<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD height="24" class="headmenu" id="member_name" bgcolor="#ffffff" nowrap="nowrap"></TD>'+"\n");
htmlout.push('		<TD>');
htmlout.push('<TABLE align="right" border="0" cellspacing="0" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD style="width:180px"><IMG src="/imgs_c/net_lib.gif" width="180" height="20" border="0"></TD>'+"\n");
htmlout.push('		<TD>'+"\n");

htmlout.push('<div id="sign0">'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD>'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+'/company/members/index.php">会員について</A></TD>'+"\n");
htmlout.push('		<TD nowrap="nowrap"><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/register.php?groupID='+((site.groupid<50)?'0':'50')+'">新規登録</A></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('		</TD>'+"\n");

	if( site.is_visible('loginform') ){ // ログイン画面では、表示しない。<input name="id"> と <input name="id" id="id"> が同時に存在すると document.getElementById('id').focus() が効かなくなるので。
htmlout.push('		<TD>'+"\n");
htmlout.push('<TABLE border="0" cellspacing="0" cellpadding="0" bgcolor="'+site_style['color1']+'">'+"\n");
htmlout.push('	<FORM method="POST" name="login_form_frame" action="'+url_pref_ssl+'/shop_s/login.php">'+"\n");
//htmlout.push('	<FORM method="POST" name="login_form_frame" action="'+url_pref_ssl+'/shop_s/login.php" onsubmit="return autologin_confirm()">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/ent_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<td class="headmenu" nowrap="nowrap">会員ID:</td>'+"\n");
htmlout.push('		<td><input name="id" size="8" style="ime-mode:disabled"></td>'+"\n");
htmlout.push('		<td class="headmenu" nowrap="nowrap">パスワード:</td>'+"\n");
htmlout.push('		<td><input type="password" name="password" size="8" style="ime-mode:disabled"></td>'+"\n");
//htmlout.push('		<td class="headmenu"><input type="submit" class="menuselector" value="ログイン"></td>'+"\n");
htmlout.push('		<td class="headmenu"><input type="image" onclick="return autologin_confirm();document.login_form_frame.submit()" src="/imgs_c/btn_login.gif" width="60" height="20" alt="ログイン"></td>'+"\n");
htmlout.push('		<td class="headmenu"> <input id="c1" type="checkbox" value="1" name="autologin"></td>'+"\n");
htmlout.push('		<td class="headmenu" nowrap="nowrap"><label for="c1">自動ログインする</label></td>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('	</FORM>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('		</TD>'+"\n");
	}

htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('</div>'+"\n");

htmlout.push('<div id="sign1">'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD>'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0" id="not_kaiin_reg" style="display:none;">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+'/company/members/index.php">会員について</A></TD>'+"\n");
htmlout.push('		<TD nowrap="nowrap"><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/register.php?groupID='+((site.groupid<50)?'0':'50')+'">新規登録</A></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('		</TD>'+"\n");
/*
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+'/company/members/index.php">会員について</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/member-info.php">登録内容の確認／変更</A></TD>'+"\n");
//htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/edit-member.php">登録内容の変更</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/remove-member.php">登録の削除</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/order-list.php?groupID='+((site.groupid<50)?'0':'50')+'">購入履歴</A></TD>'+"\n");
*/
htmlout.push('		<TD class="headmenu"><A href="'+'/shop/logout.php"><IMG src="/imgs_c/btn_logout.gif" width="60" height="20" border="0" alt="ログアウト"></A></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('</div>'+"\n");

htmlout.push('		</TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('		</TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('</div>'+"\n");


// メニューエリア ---------
htmlout.push('<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">'+"\n");
//htmlout.push('	<TR>'+"\n");
//htmlout.push('		<TD colspan=3 bgcolor="'+site_style['color2']+'"><IMG src="/imgs_c/spacer.gif" width="1" height="2"></TD>'+"\n");
//htmlout.push('	</TR>'+"\n");
htmlout.push('	<form name="form1">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD width="16" bgcolor="#ffffff" style="border-bottom: 2px solid '+site_style['color2']+';"><IMG src="/imgs_c/spacer.gif" width="16" height="8"></TD>'+"\n");
htmlout.push('		<TD bgcolor="#ffffff" valign="bottom">'+"\n");
htmlout.push('<TABLE border="0" cellspacing="0" cellpadding="2" bgcolor="'+site_style['color3']+'">'+"\n");
htmlout.push('	<TR>'+"\n");

htmlout.push('		<TD nowrap id="site_kaiin_td" class="headmenu" style="border-left: 2px solid '+site_style['color2']+';border-right: 2px solid '+site_style['color2']+';border-top: 2px solid '+site_style['color2']+';">&nbsp;<a href="'+(site.groupid<50?site.url_pref['www']:site.url_pref['toho'])+'/netlibrary/" onmouseover="showHide(\'kaiin\')">▼');
if(member_name && member_name!=''){
	htmlout.push('<span>会員のページ</span>');
}else{
	htmlout.push('<span>会員について</span>');
}
htmlout.push('</a>&nbsp;</TD>'+"\n");

htmlout.push('		<TD nowrap id="site_www_td" class="headmenu" style="/*border-left: 2px solid; '+site_style['color2']+'*/;border-right: 2px solid '+site_style['color2']+';border-top: 2px solid '+site_style['color2']+';">&nbsp;<a href="'+url_pref_www+'/" onmouseover="showHide(\'www\')">▼東京法令のサイト</a>&nbsp;</TD>'+"\n");
htmlout.push('		<TD nowrap id="site_toho_td" class="headmenu" style="border-right: 2px solid '+site_style['color2']+';border-top: 2px solid '+site_style['color2']+';">&nbsp;<a href="'+url_pref_toho+'/" onmouseover="showHide(\'toho\')">▼とうほうのサイト</a>&nbsp;</TD>'+"\n");
htmlout.push('		<TD nowrap id="site_shop_td" class="headmenu" style="border-right: 2px solid '+site_style['color2']+';border-top: 2px solid '+site_style['color2']+';">&nbsp;<a href="'+site.get_default_url_pref()+'/shop/cart.php" onmouseover="showHide(\'shop\')">▼お買物かご</a>&nbsp;</TD>'+"\n");
htmlout.push('		<TD nowrap id="site_support_td" class="headmenu" style="border-right: 2px solid '+site_style['color2']+';border-top: 2px solid '+site_style['color2']+';">&nbsp;<a href="'+url_pref_ssl+'/company_s/voiceform_s.php?groupID='+((site.groupid<50)?'0':'50')+'" onmouseover="showHide(\'support\')">▼お問い合わせ</a>&nbsp;</TD>'+"\n");
htmlout.push('		<TD nowrap id="site_company_td" class="headmenu" style="border-right: 2px solid '+site_style['color2']+';border-top: 2px solid '+site_style['color2']+';">&nbsp;<a href="'+site.get_default_url_pref()+'/company/" onmouseover="showHide(\'company\')">▼会社案内</a>&nbsp;</TD>'+"\n");
htmlout.push('		<TD class="headmenu" bgcolor="#ffffff" style="border-bottom: 2px solid '+site_style['color2']+';">&nbsp;</TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('		</TD>'+"\n");
htmlout.push('		<TD nowrap class="headmenu" width="90%" align="right" bgcolor="#ffffff" style="border-bottom: 2px solid '+site_style['color2']+';">&nbsp;'+"\n");
htmlout.push('<select name="menu" class="menuselector" id="menu" onChange="MM_jumpMenuGo(\'menu\',\'top\',0)" style="float:right">'+"\n");
htmlout.push('<option value="" selected>▼ヘルプ（お選びください）</option>'+"\n");
	var help_querystring='?groupID='+((site.groupid<50)?'0':'50')+'&sitekind='+site.kind;
htmlout.push('<option value="'+site.get_default_url_pref()+'/company/help/kensaku.html'+help_querystring+'">サイト内検索の方法</option>'+"\n");
htmlout.push('<option value="'+site.get_default_url_pref()+'/company/help/autologin.html'+help_querystring+'">自動ログインとログアウト</option>'+"\n");
htmlout.push('<option value="'+site.get_default_url_pref()+'/company/help/password.html'+help_querystring+'">会員ID・パスワードを忘れたとき</option>'+"\n");
htmlout.push('<option value="'+site.get_default_url_pref()+'/company/help/noanswer.html'+help_querystring+'">お問い合わせに返事がないとき</option>'+"\n");
htmlout.push('<option value="'+site.get_default_url_pref()+'/company/help/subscribe.html'+help_querystring+'">雑誌の定期購読について</option>'+"\n");
htmlout.push('<option value="'+site.get_default_url_pref()+'/company/rss/index.html'+help_querystring+'">最新商品情報RSSについて</option>'+"\n");
//htmlout.push('<option value="" selected>▼サイトマップ</option>'+"\n");
//htmlout.push('<option value="'+url_pref_www+'/shop/sitemap.php?groupID=1">警察・司法</option>'+"\n");
//htmlout.push('<option value="'+url_pref_www+'/shop/sitemap.php?groupID=2">消防・防災</option>'+"\n");
//htmlout.push('<option value="'+url_pref_www+'/shop/sitemap.php?groupID=4">省庁・自治体</option>'+"\n");
//htmlout.push('<option value="'+url_pref_www+'/shop/sitemap.php?groupID=3">資格・試験</option>'+"\n");
//htmlout.push('<option value="'+url_pref_toho+'/shop/sitemap.php?groupID=51">高校生の広場</option>'+"\n");
//htmlout.push('<option value="'+url_pref_toho+'/shop/sitemap.php?groupID=52">中学生の広場</option>'+"\n");
//htmlout.push('<option value="'+url_pref_toho+'/shop/sitemap.php?groupID=66">先生の広場</option>'+"\n");
//htmlout.push('<option value="'+url_pref_toho+'/shop/sitemap.php?groupID=64">学校図書教材</option>'+"\n");
//htmlout.push('<option value="'+url_pref_toho+'/shop/sitemap.php?groupID=55">教養・教育</option>'+"\n");
htmlout.push('</select>'+"\n");
htmlout.push('&nbsp;</TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('	</form>'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD width="16" bgcolor="'+site_style['color4']+'"><IMG src="/imgs_c/spacer.gif" width="16" height="20"></TD>'+"\n");
htmlout.push('		<TD colspan=2 bgcolor="'+site_style['color4']+'">'+"\n");


htmlout.push('<div id="site_kaiin">'+"\n");
htmlout.push('<div id="site_kaiin_login" style="display:none;">'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+'/company/members/index.php">会員について</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/member-info.php">登録内容の確認</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/edit-member.php">登録内容の変更</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/remove-member.php">登録の削除</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/order-list.php?groupID='+((site.groupid<50)?'0':'50')+'">購入履歴</A></TD>'+"\n");

htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/teiki/index.php">定期購読ガイド</A></TD>'+"\n");

//ポイントガイド追加07-11-08:ko-wada
//htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
//htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/x_point.php">ポイントガイド</A></TD>'+"\n");

htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('</div>'+"\n");

htmlout.push('<div id="site_kaiin_notlogin">'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+'/company/members/index.php">入会のご案内</A></TD>'+"\n");
htmlout.push('		<TD nowrap="nowrap"><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/register.php?groupID='+((site.groupid<50)?'0':'50')+'">新規登録</A></TD>'+"\n");
//htmlout.push('		<TD nowrap="nowrap"><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="2"></TD>'+"\n");
//htmlout.push('		<TD class="headmenu" nowrap="nowrap"><A href="'+url_pref_ssl+'/shop_s/req_id_password.php?groupID='+((site.groupid<50)?'0':'50')+'">会員ID・パスワードを忘れた</A></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('</div>'+"\n");
htmlout.push('</div>'+"\n");


htmlout.push('<div id="site_www">'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_policeman"><A href="'+url_pref_www+'/policeman/">警察・司法</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_fireman"><A href="'+url_pref_www+'/fireman/">消防・防災</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_official"><A href="'+url_pref_www+'/official/">省庁・自治体</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_chiikibosai"><A href="'+url_pref_www+'/chiikibosai/">地域防災</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_career"><A href="'+url_pref_www+'/career/">資格・試験</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");

htmlout.push('		<TD class="headmenu" id="headmenu_kyouyou"><A href="'+url_pref_www+'/shop/index.php/5/">教養</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_keihatu"><A href="'+url_pref_www+'/shop/index.php/6/">啓発資料</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");

htmlout.push('		<TD class="headmenu"><A href="'+url_pref_www+'/tuushin/">通信教育</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><A href="'+url_pref_www+'/company/rss/index.html?sitekind=www">最新商品情報サービス</A></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('</div>'+"\n");

htmlout.push('<div id="site_toho">'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_koukou"><A href="'+url_pref_toho+'/koukou/">高校生の広場</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_chugaku"><A href="'+url_pref_toho+'/chugaku/">中学生の広場</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_teachers"><A href="'+url_pref_toho+'/teachers/">先生の広場</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_gakusan"><A href="'+url_pref_toho+'/gakusan/">学校図書教材</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu" id="headmenu_culture"><A href="'+url_pref_toho+'/culture/">教養・教育</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");

htmlout.push('		<TD class="headmenu" id="headmenu_seitonoanzen"><A href="'+url_pref_toho+'/shop/index.php/58/">生徒の安全</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");

htmlout.push('		<TD class="headmenu"><A href="'+url_pref_toho+'/company/rss/index.html?sitekind=toho">最新商品情報サービス</A></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('</div>'+"\n");

htmlout.push('<div id="site_shop">'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD class="headmenu" id="cartbox_base"><a href="'+url_pref_www+'/shop/cart.php">現在の商品点数　[ <STRONG id="count_cart_text">'+count_cart()+'</STRONG> ]</a></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><a href="'+site.get_default_url_pref()+'/shop/comments.php?groupID='+((site.groupid<50)?'0':'50')+'">ご注文の方法</a></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><a href="/shop/postage.html">商品の発送について</a></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><a href="'+site.get_default_url_pref()+'/company/help/subscribe.html?sitekind=shop&groupID='+((site.groupid<50)?'0':'50')+'">雑誌の定期購読について</a></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><a href="'+site.get_default_url_pref()+'/shop/aboutus.php?groupID='+((site.groupid<50)?'0':'50')+'">特定商取引法販売表示</a></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('</div>'+"\n");

htmlout.push('<div id="site_support">'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><A href="'+url_pref_ssl+'/company_s/voiceform_s.php?groupID='+((site.groupid<50)?'0':'50')+'">お問い合わせやご相談を承ります。</A></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('</div>'+"\n");

htmlout.push('<div id="site_company">'+"\n");
htmlout.push('<TABLE border="0" cellspacing="2" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><A href="'+site.get_default_url_pref()+'/company/">会社概要</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><A href="'+site.get_default_url_pref()+'/company/privacy/">個人情報保護</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><A href="'+site.get_default_url_pref()+'/company/kankyo/">環境方針</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><A href="'+site.get_default_url_pref()+'/company/bosyu/">社員募集</A></TD>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><A href="'+site.get_default_url_pref()+'/company/policy/">サイトポリシー</A></TD>'+"\n");

//雑誌への広告掲載について追加080318 ko-wada
htmlout.push('		<TD><IMG src="/imgs_c/arrow_box.gif" width="12" height="12" border="0" hspace="4"></TD>'+"\n");
htmlout.push('		<TD class="headmenu"><A href="'+site.get_default_url_pref()+'/company/advertisement/">雑誌への広告掲載について</A></TD>'+"\n");

htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");
htmlout.push('</div>'+"\n");

htmlout.push('		</TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");

}
htmlout.push('<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD bgcolor="'+site_style['color2']+'"><IMG src="/imgs_c/spacer.gif" width="1" height="1"></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('	<TR>'+"\n");
htmlout.push('		<TD><IMG src="/imgs_c/spacer.gif" width="1" height="4"></TD>'+"\n");
htmlout.push('	</TR>'+"\n");
htmlout.push('</TABLE>'+"\n");


	//htmlout.push(strMessageBox());
	htmlout.push(headMessageBox.getHTML());
	htmlout.push('<div id="member_message_box"></div>');

	//2005-09-09 tanaka
	htmlout.push('</div>');
	//2005-09-09 tanaka


	document.write(htmlout.join(""));


	print_name_param(member_name?member_name:'');

	//if( document.getElementById) {
	//	if( member_name && member_name!="" ){
	//		if(document.getElementById('sign0'))document.getElementById('sign0').style.display = "none";
	//		if(document.getElementById('sign1'))document.getElementById('sign1').style.display = "block";
	//		print_name_param(member_name);
	//	}else{
	//		if(document.getElementById('sign0'))document.getElementById('sign0').style.display = "block";
	//		if(document.getElementById('sign1'))document.getElementById('sign1').style.display = "none";
	//	}
	//}
}
// ----------------------------------------------------------
//
//      function LoadMenus()
//
// ----------------------------------------------------------



// マウスオーバー画像処理（汎用）
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
 if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
 for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
 if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
 if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
 var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}



// サイト内検索の設定
function setkeywd() {
	var keywd=document.srchform.inline.value;
	if (! keywd ) return false;
	//document.srchform.inline.value="";
	switch(document.srchform.selitem.value){
	case '2': //case "booktitle"
		document.srchform.booktitle.value = keywd;
		document.srchform.action="/shop/goods_list.php";
		break;
	case '3': //case "author"
		document.srchform.author.value = keywd;
		document.srchform.action="/shop/goods_list.php";
		break;
	case '4': //case "contents"
		document.srchform.contents.value = keywd;
		document.srchform.action="/shop/goods_list.php";
		break;
	case '1': //case "query"
	default:
		document.srchform.query.value = keywd;
		document.srchform.action="/cgi-bin/namazu.cgi";
	}
}

function getCookie(key,  tmp1, tmp2, xx1, xx2, xx3) {
    tmp1 = " " + document.cookie + ";";
    xx1 = xx2 = 0;
    len = tmp1.length;
    while (xx1 < len) {
        xx2 = tmp1.indexOf(";", xx1);
        tmp2 = tmp1.substring(xx1 + 1, xx2);
        xx3 = tmp2.indexOf("=");
        if (tmp2.substring(0, xx3) == key) {
            return(unescape(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));
        }
        xx1 = xx2 + 1;
    }
    return("");
}

function print_name(){
	if( ! document.getElementById )return;
	var obj=document.getElementById('member_name');
	if( obj )
		print_name_param(http_request.xmlHttp.responseText);
}

function print_name_param(mn_param){
	if( ! document.getElementById )return;
	var obj=document.getElementById('member_name');
	if( obj ){
		if( mn_param && mn_param!="" ){
			obj.innerHTML='<a href="'+url_pref_ssl+'/shop_s/member-info.php?groupID='+((site.groupid<50)?'0':'50')+'">'+mn_param+"</a>";
			obj.style.fontSize='15px';
			obj.style.textAlign='center';
			obj.style.display='block';
			document.getElementById('sign0').style.display = "none";
			document.getElementById('sign1').style.display = "block";
			document.getElementById('site_kaiin_login').style.display = "block";
			document.getElementById('site_kaiin_notlogin').style.display = "none";
			(document.getElementById('site_kaiin_td').getElementsByTagName('span'))[0].innerHTML='会員のページ';
		}else{
			obj.innerHTML='';
			document.getElementById('sign0').style.display = "block";
			document.getElementById('sign1').style.display = "none";
			document.getElementById('site_kaiin_login').style.display = "none";
			document.getElementById('site_kaiin_notlogin').style.display = "block";
			(document.getElementById('site_kaiin_td').getElementsByTagName('span'))[0].innerHTML='会員について';
		}
	}
	obj=document.getElementById('site_kaiin_login');
	if(obj){
		if( mn_param && mn_param!="" ){
		}else{
		}
	}
}


// ページ Body の末尾に挿入する。
// ポップアップウインドウの場合は、LoadFoot('x')を使用。[close]を表示する。
// 通常のページは、LoadFoot()を使用。Copyrightを表示する。
function LoadFoot(PopWin) {
	var params={};
	if(PopWin && PopWin=='x'){
		params['popup']=true;
	}
	LoadFoot2(params);
}
function LoadFoot2(params) {
	/*
		params={
			'popup'     :(true|false), // default=false
			'hide_gotop':(true|false)  // default=false
		}
	*/
	if(!params) params={};
	var htmlout=[];
	htmlout.push('<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">');
	htmlout.push('	<TR>');
	htmlout.push('		<TD colspan="2"><IMG src="/imgs_c/spacer.gif" width="1" height="5"></TD>');
	htmlout.push('	</TR>');
	if(!params['hide_gotop']){
		htmlout.push('	<TR>');
// サマーバーゲン〜2006.08.31
		htmlout.push('		<td></td>');
/*
		htmlout.push('		<TD align="left"><TABLE border="0" cellspacing="0" cellpadding="0"><tr>');
		htmlout.push('		<TD class="headmenu">&nbsp;');
		htmlout.push('		<IMG src="/company/members/image_bargain/arrow_list.gif" width="13" height="13" border="0"></TD>');
		htmlout.push('		<TD class="headmenu"><A href="'+(site.name=='toho'?url_pref_toho:url_pref_www)+'/company/members/2006summer.html">');
		htmlout.push('		サマーバーゲンは終了しました。</A></TD>');
		htmlout.push('		</tr></TABLE></TD>');
*/
//
		htmlout.push('		<TD align="right"><A href="#top" onmouseover="MM_swapImage(\'bt_totop1\',\'\',\'/imgs_c/ico_topagetop_o.gif\',1)" onmouseout="MM_swapImgRestore()">');
		htmlout.push('		<IMG src="/imgs_c/ico_topagetop.gif" alt="このページのTOPへ戻る" name="bt_totop1" width="136" height="16" border="0" id="bt_totop1" style="float:right">');
		htmlout.push('		</A>&nbsp;</TD>');
		htmlout.push('	</TR>');
	}
	htmlout.push('	<TR>');
	htmlout.push('		<TD colspan="2" background="/imgs_c/foothrbg.gif"><IMG src="/imgs_c/spacer.gif" width="1" height="5"></TD>');
	htmlout.push('	</TR>');
	htmlout.push('	<TR>');
	if(params['popup']){
		htmlout.push('		<TD colspan="2" align="center"><A href="javascript:window.close();"><IMG src="/imgs_c/closewin.gif" width="50" height="15" border="0"></A></TD>');
	}else{
		htmlout.push(
			'<TD colspan="2" class="footer" style="text-align:center">Copyright (C) '
			/*,(((new Date).getFullYear()==2009)?"2009":"2008") */
			,"2010"
			,' TOKYO HOREI PUBLISHING CO.,LTD. All rights reserved.</TD>');
	}
	htmlout.push('	</TR>');
	htmlout.push('	<TR>');
	htmlout.push('		<TD colspan="2"><IMG src="/imgs_c/spacer.gif" width="1" height="5"></TD>');
	htmlout.push('	</TR>');
	htmlout.push('</TABLE>');


	document.write(htmlout.join(""));
	
	loadFoot_scripts();
	loadFoot_ga();
}


// 任意ページのヘッドを、受け取ったパラメータに従って表示するには、
// noanswer.html?sitekind=toho&groupID=50
// ヘッド表示の優先順位は default < location.search(?sitekind=toho&groupID=50) < site.loadMenus(param) の順



// 買物かご内の商品点数を表示する。
function count_cart(){
	strs=getCookie('carts');
	return (strs)?strs:0;
}
function refresh_count_cart(){
	var count_cart_text=document.getElementById("count_cart_text");
	if(count_cart_text) count_cart_text.innerHTML=count_cart();
}
function CountCart(){
	document.write(count_cart());
}

function cart_add(id,is_yoyaku) {
	//if(urchinTracker)urchinTracker('/cart_add_used'+location.pathname);
	if(pageTracker)pageTracker._trackPageview('/cart_add_used'+location.pathname);

	if(is_yoyaku){
		location.href=url_pref_ssl+"/yoyaku/yoyaku.php?kind="+id;
	}else{
		location.href="/shop/cart.php?oprmode=add&targetcode="+id;
		return;
		document.carts.oprmode.value="add";
		document.carts.targetcode.value=id;
		document.carts.action="/shop/cart.php";
		document.carts.target="_top";
		//document.carts.method="POST";
		document.carts.method="GET";
		document.carts.submit();
	}
}
function cart_add_post(id,is_yoyaku) {
	//if(urchinTracker)urchinTracker('/cart_add_used'+location.pathname);
	if(pageTracker)pageTracker._trackPageview('/cart_add_used'+location.pathname);

	if(is_yoyaku){
		location.href=url_pref_ssl+"/yoyaku/yoyaku.php?kind="+id;
	}else{
		var form=document.createElement("form");
		form.setAttribute("method","post");
		form.setAttribute("target","_top");
		form.setAttribute("action","/shop/cart.php");

		var input_op=document.createElement("input");
		input_op.setAttribute("type","hidden");
		input_op.setAttribute("name","oprmode");
		input_op.setAttribute("value","add");
		form.appendChild(input_op);

		var input_tc=document.createElement("input");
		input_tc.setAttribute("type","hidden");
		input_tc.setAttribute("name","targetcode");
		input_tc.setAttribute("value",id);
		form.appendChild(input_tc);

		document.body.appendChild(form);
		form.submit();
	}
}

function calc_offset(obj,attr){
	var res=0;
	while(obj){
		res+=obj[attr];
		obj=obj.offsetParent;
	}
	return res;
}


if( ! document.getElementsByClassName ){
	document.getElementsByClassName = function(className) {
		var children = document.getElementsByTagName('*') || document.all;
		var elements = new Array();
		for (var i = 0; i < children.length; i++) {
			var child = children[i];
			var classNames = child.className.split(' ');
			for (var j = 0; j < classNames.length; j++) {
				if (classNames[j] == className) {
					elements.push(child);
					break;
				}
			}
		}
		return elements;
	}
}
if(! Function.prototype.bind){
	Function.prototype.bind = function(object) {
		var __method = this;
		return function() {
			__method.apply(object, arguments);
		}
	}
}


function querystring2hash(q){
	if(q.substr(0,1)=="?")q=q.substr(1,q.length-1);
	var arr=q.split('&');
	var r={};
	for(var i=0;i<arr.length;i++){
		var kv=arr[i].split('=');
		r[kv[0]]=kv[1];
	}
	return r;
}

function Site(){
	this.url_pref={
		"www"           : url_pref_www,
		"toho"          : url_pref_toho,
		"ssl"           : url_pref_ssl,
		"current"       : location.protocol+"//"+location.host
	};
	this.available={
		"kind":{"www":true,"toho":true,"shop":true,"support":true,"company":true,"kaiin":true},
		"name":{"www":true,"toho":true,"secure":true}
	}

	// query_string(this.search)
	if( location.search )
		this.search=querystring2hash(location.search)
	else
		this.search={};

	// name=(www|toho|secure)
	switch( this.url_pref.current ){
	case this.url_pref.toho: this.name="toho"   ; break;
	case this.url_pref.ssl : this.name="secure" ; break;
	case this.url_pref.www :
	default                : this.name="www"    ;
	}

	// kind=(www|toho|shop|support|company|kaiin)
	if( this.search.sitekind && ! this.is_available("sitekind",this.search.sitekind) ){
		send_error_mail("search.sitekind is not available:site.search.sitekind="+this.search.sitekind);
	}
	if( this.search.sitekind && this.is_available("sitekind",this.search.sitekind) ){
		this.kind=this.search.sitekind;
	}else{
		this.kind=(this.name=="toho")?"toho":"www";
		if( location.pathname.substring(0,12)=='/netlibrary/' ){
			this.kind="kaiin";
		}else if( location.pathname.substring(0,27)=='/company_s/voiceform_s.php' ){
			this.kind="support";
		}else if( location.pathname.substring(0,9)=='/company/' ){
			this.kind="company";
		}else if( location.pathname.substring(0,11)=='/company_s/' ){
			this.kind="company";
		}else if( location.pathname.substring(0,14)=='/shop/cart.php' ){
			this.kind="shop";
		}else if( location.pathname.substring(0,19)=='/shop_s/edit-member' ){
			this.kind="kaiin";
		}else if( location.pathname.substring(0,19)=='/shop_s/edit_member' ){
			this.kind="kaiin";
		}else if( location.pathname.substring(0,21)=='/shop_s/remove-member' ){
			this.kind="kaiin";
		}else if( location.pathname.substring(0,20)=='/shop_s/register.php' ){
			this.kind="kaiin";
		}else if( location.pathname.substring(0,17)=='/shop_s/login.php' ){
			this.kind="kaiin";
		}else if( location.pathname.substring(0,8)=='/shop_s/' ){
			this.kind="shop";
		}
	}

	// groupid
	if( this.search.groupID ){
		this.groupid=this.search.groupID;
	}else{
		this.groupid=(this.name=="toho")?50:0;
	}

	// show_kindmenu
	this.show_kindmenu=true;

	// show_loginform
	this.show_loginform=null;

	// show_searchbar
	this.show_searchbar=null;
}
Site.prototype={
	"loadMenus":function(params){
		if( params ) this.set_params(params);
		this.show_menu();
		this.toggle_tab();
	},
	"set_params":function(params){//kind,groupid,show_kindmenu,show_loginform,show_searchbar
		for(param in params) this[param]=params[param];
	},
	"show_menu":LoadMenus,
	"show_pagefoot":function(params){LoadFoot2(params);},
	"toggle_tab":showHide,
	"is_visible":function(type){
		switch(type){
		case "searchbar":
			return (this.show_searchbar!=null)?(this.show_searchbar):(this.kind=="www" || this.kind=="toho" || this.kind=="kaiin");
		case "kindmenu":
			return this.show_kindmenu;
		case "loginform":
			return (this.show_loginform!=null)?(this.show_loginform):(location.pathname!='/shop_s/login.php');
		default:
			return true;
		}
	},
	"is_available":function(type,value){
		switch(type){
		case "sitekind": return this.available.kind[value];
		default: return true;
		}
	},
	"get_default_url_pref":function(){
		if( location.protocol+"//"+location.host==url_pref_ssl ){
			return (this.groupid<50)?this.url_pref.www:this.url_pref.toho;
		}else{
			return "";
		}
	},
	"get_style_kind":function(kind){
		if( kind=='kaiin' ){
			return this.name=='toho'?
				'toho':
				(this.name=='secure'?'default':'www');
		}else{
			return (site_styles[kind])?kind:'default';
		}
	},
	"get_style":function(kind){
		if(! kind || kind=="")kind=this.kind;
		return site_styles[ this.get_style_kind(kind) ];
		/*
		if( kind=='kaiin' ){
			return this.name=='toho'?site_styles['toho']:(this.name=='secure'?site_styles['default']:site_styles['www']);
		}else{
			return (site_styles[kind])?site_styles[kind]:site_styles['default'];
		}
		*/
	}
}
var site=new Site;
