function menuHeadImg(){
	document.write('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 CLASS="head_spc"><TR VALIGN=top><TD><A HREF="/top.html"><IMG BORDER=0 WIDTH=355 HEIGHT=74 SRC="http://img.host2.jp/tit/head_l.gif" ALT=""></A></TD><TD ALIGN=right><IMG BORDER=0 WIDTH=600 HEIGHT=74 SRC="http://img.host2.jp/tit/head_r.gif" ALT=""></TD></TR></TABLE>');
}

function menuHead(){
	var shp = new Array({type:'link',tit:'お店リスト',url:'/shop/index.html'},{type:'link',tit:'グループ紹介',url:'/shop_grp/index.html'});
	shp_menu = new TMLib.menu('menu_head_shp', {type:'sub',direct:'v',style:'menu_head_sub_sty'},shp);

	var hdItem = new Array(
{type:'link',tit:'TOP',url:'/top.html'},
{type:'sub',tit:'お店リスト',url:'/shop/index.html',sub_id:'menu_head_shp'},
{type:'link',tit:'クローズアップ',url:'/closeup/index.html'},
{type:'link',tit:'動画',url:'/shop_mov/index.html'},
{type:'link',tit:'新着',url:'/history/index.html'},
{type:'link',tit:'トピックス',url:'/topics/index.html'},
{type:'link',tit:'グラビア',url:'/gravure/index.html'},
{type:'link',tit:'独占企画',url:'/special/index.html'},
{type:'link',tit:'プレゼント',url:'/present/index.html'},
{type:'link',tit:'割引特典',url:'/shop_info/index.html'},
{type:'link',tit:'イベント',url:'/event/index.html'},
{type:'link',tit:'ホスト検索',url:'/cgi-bin/search/staff.cgi'},
{type:'link',tit:'ナンバー',url:'/number/index.html'},
{type:'link',tit:'ランキング',url:'/ranking/index.html'},
{type:'link',tit:'掲示板',url:'http://bbs01.host2.jp/host2/'},
{type:'link',tit:'ブログ',url:'/rss/index.html'},
{type:'link',tit:'求人',url:'/shop/rc.html'}
);
	h_menu = new TMLib.menu('menu_head', {style:'menu_head_sty'},hdItem);
}

function menuFoot(){
	document.write('<A HREF="/top.html">トップページ</A> | <A HREF="/cgi-bin/jump.cgi?url=www.host2.jp/cts/kaisya/index.html">会社概要</A> | <A HREF="/cgi-bin/jump.cgi?url=www.host2.jp/cts/keisai/index.html">ご掲載に関して</A> | <A HREF="/cgi-bin/jump.cgi?url=www.host2.jp/cts/qa/index.html">ヘルプ</A> | <A HREF="#top">ページのトップへ</A>');
}

function menuTop(){
	document.write('<img src="/img/tit/top_sns.gif">');
	document.write('<table style="background:#FFF url(/img/hostcommu2.gif) no-repeat;width:723px;height:230px;"><tr><form action="http://sns.host2.jp/" method="post"><td style="width:330px;"></td>');
	document.write('<td style="width:218px;">');
	document.write('<input type="hidden" name="m" value="pc">');
	document.write('<input type="hidden" name="a" value="do_o_login">');
	document.write('<input id="username" onblur="SetChgColor(this, 0, true);" title=半角英数100文字まで  style="IME-MODE:disabled;position:relative;left:0px;top:33px;width:170px;" onfocus="SetChgColor(this, 1);" maxLength="100" name="username" tabindex="1"><br>');
	document.write('<input id="password" onblur="SetChgColor(this, 0, true);" title=半角英数12文字まで style="IME-MODE:disabled;position:relative;top:52px;left:0px;width:170px;" onfocus="SetChgColor(this, 1);" type="password" name="password" tabindex="2"><br>');
	document.write('<input type="checkbox" name="is_save" id="is_save" value="1" tabindex="3" style="position:relative;top:52px;left:-25px;"><label for="is_save" style="font-size:10px;position:relative;top:52px;left:-20px;">次回から自動的にログイン</label><br>');
	document.write('<a href="http://sns.host2.jp/?m=pc&a=page_o_password_query" tabindex="6" style="font-size:10px;position:relative;top:60px;left:-23px;">パスワードを忘れた方はこちらへ</a>');
	document.write('</td><td style="width:175px;">');
	document.write('<input id="button_login" type="image" alt="ほすこみゅ ログイン" src="/img/skin/dummy.gif" name="submit" style="width:156px;height:32px;position:relative;top:43px;left:0px;" tabindex="4">');
	document.write('<a href="http://sns.host2.jp/?m=pc&a=page_o_public_invite" tabindex="5" style=""><img src="/img/skin/dummy.gif" style="width:156px;height:75px;border:none;position:relative;top:50px;left:0px;"></a>');
	document.write('</td></form></tr></table>');
}

function menuArea(url,row,add_f){
	var cnt=0,str='',cls;wid=Math.round(100/row);
	var lst = new Array();
	for(key in area){ lst[area[key].jun]='<A HREF="'+url+area[key].no+add_f+'.html">'+area[key].name+'</A>('+area[key].cnt+')' }
	for(key=0;key<lst.length;key++){
		if(!lst[key]){ continue; }
		cnt++;
		if(cnt % row == 1){ str += '</TR><TR>' }
		if(cnt % row == 0){ cls = 'btn_r' } else{ cls = 'btn' }
		str += '<TD WIDTH="'+wid+'%"><DIV CLASS="'+cls+'"><IMG BORDER=0 WIDTH=8 HEIGHT=11 SRC="/img/btn/mark1.gif">'+lst[key]+'</DIV></TD>';
	}
	document.write('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%" CLASS="btn_area">'+str+'</TABLE>');
}
function menuTopArea(){
	var str='';
	str+='掲載店数：'+totalShop+'<BR>';
	str+='掲載人数：'+totalStaff+'<BR>';
	str+='トピックス：'+totalTopics+'<BR>';
	str+='ブログ：'+totalRss+'<BR>';
	str+='ムービー：'+totalMov+'<BR><BR>';

	str+='sample<BR>地域名と掲載数: <B>'+area[1].name+'('+area[1].cnt+')</B><BR>';

	document.write(str);
}

function menuShopArea(){
	var str='';
	document.write(str);
}

function menuRanking(){
	var str='';
	str += '<DIV CLASS="btn_ranking"><A HREF="/ranking/day.html">デイリーランキング</A></DIV><DIV CLASS="btn_ranking"><A HREF="/ranking/week.html">ウィークリーランキング</A></DIV><DIV CLASS="btn_ranking"><A HREF="/ranking/month.html">マンスリーランキング</A></DIV>';
	document.write(str);
}

function createMenu(id,def,ary,sp){
	var r,type,btn_tab=new Array({type:'nb'});
	if(sp){ btn_tab.push({type:'nb2'}); }
	for(r in ary){
		if(ary[r].url){ type='link'; } else{ type="non" }
		btn_tab.push({type:type,tit:'<DIV CLASS="tb_1"><IMG></DIV><DIV CLASS="tb_2"><IMG></DIV><DIV CLASS="tb_3"><IMG></DIV><DIV CLASS="tb_4"><IMG></DIV><DIV CLASS="tb_c">'+ary[r].tit+'</DIV>',url:ary[r].url});
		btn_tab.push({type:'nb'});
	}
	btn_tab.push({type:'spc'});
	document.write('<IMG BORDER=0 WIDTH=1 HEIGHT=4 SRC="/img/spc.gif">');
	ret=new TMLib.menu(id,{style:'menu_tab'},btn_tab);
	if(def){ ret.selectMenu(def); }
	return(ret);
}

function createMenuPage(max,def,file){
	var btn_tab,pg=Math.ceil(max/15),lp,lp2,n;
	menu_pg=new Array();
	for(lp=1;lp<=pg;lp++){
		btn_tab=new Array({type:'nb'});
		if(lp>1){ for(lp2=1;lp2<lp;lp2++){ btn_tab.push({type:'nb2'}) } }
		for(lp2=1;lp2<=15;lp2++){
			n=(lp-1)*15+lp2;
			if(n>max){ break; }
			btn_tab.push({type:'link',tit:'<DIV CLASS="tb_1"><IMG></DIV><DIV CLASS="tb_2"><IMG></DIV><DIV CLASS="tb_3"><IMG></DIV><DIV CLASS="tb_4"><IMG></DIV><DIV CLASS="tb_c">'+n+'</DIV>',url:file+n+'.html'});
			btn_tab.push({type:'nb'});
		}
		btn_tab.push({type:'spc'});
		document.write('<IMG BORDER=0 WIDTH=1 HEIGHT=4 SRC="/img/spc.gif">');
		menu_pg[lp]=new TMLib.menu('menu_page-'+lp,{style:'menu_tab_pg'},btn_tab);
		if((lp-1)*15<def && lp*15>=def){
			n=def % 15; if(n==0){ n=15 }
			menu_pg[lp].selectMenu(n);
		}
	}
}

function createSearchPage(max,def,file,ret){
	var btn_tab,pg=Math.ceil(max/15),lp,lp2,n;
	menu_pg=new Array();
	for(lp=1;lp<=pg;lp++){
		btn_tab=new Array({type:'nb'});
		if(lp>1){ for(lp2=1;lp2<lp;lp2++){ btn_tab.push({type:'nb2'}) } }
		if(lp==1){
			btn_tab.push({type:'link',tit:'<DIV CLASS="tb_1"><IMG></DIV><DIV CLASS="tb_2"><IMG></DIV><DIV CLASS="tb_3"><IMG></DIV><DIV CLASS="tb_4"><IMG></DIV><DIV CLASS="tb_c_no">リストへ</DIV>',url:ret});
			btn_tab.push({type:'nb'});
		}
		for(lp2=1;lp2<=15;lp2++){
			n=(lp-1)*15+lp2;
			if(n>max){ break; }
			btn_tab.push({type:'link',tit:'<DIV CLASS="tb_1"><IMG></DIV><DIV CLASS="tb_2"><IMG></DIV><DIV CLASS="tb_3"><IMG></DIV><DIV CLASS="tb_4"><IMG></DIV><DIV CLASS="tb_c">'+n+'</DIV>',url:file+n});
			btn_tab.push({type:'nb'});
		}
		btn_tab.push({type:'spc'});
		document.write('<IMG BORDER=0 WIDTH=1 HEIGHT=4 SRC="/img/spc.gif">');
		menu_pg[lp]=new TMLib.menu('menu_page-'+lp,{style:'menu_tab_sh'},btn_tab);
		if((lp-1)*15<def && lp*15>=def){
			n=def % 15;
			if(n==0){ n=15; }
			if(lp==1){ n++; }
			menu_pg[lp].selectMenu(n);
		}
	}
}

function winPresent(no){
	window.open("/cgi-bin/form/present.cgi?no="+no, "recruit","width=610,height=520,top=30,left=100,scrollbars=no,resizable=yes,menubar=no,location=no,directories=no,status=yes");
}

//------------------------------- カラー変動処理用
function ChangeColor(thisPAS,bgCL,bdCL) {
    if (!document.all && document.getElementById) { //-- NN6以上
        thisPAS.style.backgroundColor = bgCL;
//        thisPAS.style.borderColor = bdCL;
    } else if(document.all) {                       //-- IE4.x以上
        thisPAS.style.backgroundColor = bgCL;
//        thisPAS.style.borderColor = bdCL;
    }
}

function SetChgColor(thisPAS,num, override) {
    if(override && thisPAS.className.indexOf("error") > -1){
        num =9;
    }

    switch (num) {
    case 0:         // onBlur 離れた時
        ChangeColor(thisPAS,"#FFFFFF","#CCCCCC");
        break;
    case 1:         // onFocus フォーカスが与えられた時
        ChangeColor(thisPAS,"#fee7f1","#ffffff");
        break;
    case 9:         // エラー
        ChangeColor(thisPAS,"#FFCC99","#ffffff");
        break;
    }
}

