/*========== GLOBAL ==========*/

/*---------- browser ----------*/
var Win=(navigator.userAgent.indexOf("Win")!=-1);
var Mac=(navigator.userAgent.indexOf("Mac")!=-1);
var Explorer=(navigator.appName.indexOf("Explorer")!=-1);
var Netscape=(navigator.appName.indexOf("Netscape")!=-1);

if(Win && Explorer){
	document.write('<LINK rel="stylesheet" href="/control/css/wie.css" type="text/css">');
}else if(Win && Netscape){
	document.write('<LINK rel="stylesheet" href="/control/css/wnn.css" type="text/css">');
}else if(Mac){
	document.write('<LINK rel="stylesheet" href="/control/css/mac.css" type="text/css">');
}else{
	document.write('<LINK rel="stylesheet" href="/control/css/wie.css" type="text/css">');
}


/*---------- changeImage ----------*/

var common_pic_name=new Array();
/* header */
common_pic_name[0]="/pic/common/header_sitemap";
common_pic_name[1]="/pic/common/header_english";
common_pic_name[2]="/pic/common/header_html";
common_pic_name[3]="/pic/common/header_bt_construction";
/* menu */
common_pic_name[4]="/pic/common/menu_lineup";
common_pic_name[5]="/pic/common/menu_iedukuri";
common_pic_name[6]="/pic/common/menu_showroom";
common_pic_name[7]="/pic/common/menu_reformmagic";
common_pic_name[8]="/pic/common/menu_script";
common_pic_name[9]="/pic/common/menu_corporate";
common_pic_name[10]="/pic/common/menu_support";
/* footer */
common_pic_name[11]="/pic/common/footer_newsrelease";
common_pic_name[12]="/pic/common/footer_eco";
common_pic_name[13]="/pic/common/footer_group";
common_pic_name[14]="/pic/common/footer_use";
common_pic_name[15]="/pic/common/footer_privacy";
common_pic_name[16]="/pic/common/footer_copyright";

/* pagetop */
common_pic_name[17]="/pic/common/pagetop";
/* header追加 */
common_pic_name[18]="/pic/common/header_call";
/* header追加 */
common_pic_name[19]="/pic/common/header_chinese";
/* footer追加 */
common_pic_name[20]="/pic/common/footer_about_puroducts";
/* header追加 */
common_pic_name[21]="/pic/common/header_bt_customer";

var common_pic1=new Array();
var common_pic2=new Array();

for(var i=0; i<common_pic_name.length; i++){
	common_pic1[i]=new Image();
	common_pic1[i].src=common_pic_name[i]+".gif";
	common_pic2[i]=new Image();
	common_pic2[i].src=common_pic_name[i]+"_on.gif";
}

function common_mouse_in(imageno){
	document.images["img"+imageno].src=common_pic2[imageno].src;
}

function common_mouse_out(imageno){
	document.images["img"+imageno].src=common_pic1[imageno].src;
}

function pagetop_mouse_in(imageno){
	document.images["pagetop"+imageno].src=common_pic2[17].src;
}

function pagetop_mouse_out(imageno){
	document.images["pagetop"+imageno].src=common_pic1[17].src;
}


/*---------- redirect ----------*/
/*
<a href="#top" onClick="pagetop();return false;" onKeyPress="pagetop();return false;"><img src="#" alt="戻る"></a>
*/
function LinkSelectJump(sel) {
	var adrs = sel.options[sel.selectedIndex].value;
	if (adrs) {
		if (adrs.substr(0, 4)=='http') {
			window.open(adrs,"newwin","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
		}else {
			location.href = adrs;
		}
	}
}



/*---------- PageTop ----------*/
function pagetop () {
	var y = document.documentElement.scrollTop?document.documentElement.scrollTop:window.pageYOffset?window.pageYOffset:document.body.scrollTop?document.body.scrollTop:0;
	var sy = y-(y*0.2);
	if( 0 != y ){
		if( 2 < y ){
			window.scrollTo(0,sy);
			timerID = setTimeout("pagetop()",25);
		}else{
			window.scrollTo(0,0);
			clearTimeout(timerID);
		}
	}
}

/*========== FOOTER ==========*/

/*---------- select menu ----------*/
function pull_down_menu_footer()
{
	document.write('<SELECT name="sel_company" onChange="JavaScript:LinkSelectJump(this);">\n');
	document.write('<OPTION value="" selected>グループ各社\n');
	document.write('<OPTION value="">------------------------------------------\n');
	document.write('<OPTION value="http://www.inax.co.jp/">INAX\n');
	document.write('<OPTION value="http://www.vivahome.co.jp/">トステムビバ\n');
	document.write('<OPTION value="http://www.toex.co.jp/">東洋エクステリア\n');
	document.write('<OPTION value="http://www.suzuki-st.co.jp/">トステム鈴木シャッター\n');
	document.write('<OPTION value="http://www.nittan.com/main/">ニッタン\n');
	document.write('<OPTION value="http://www.toyosashkenzai.co.jp/">トーヨーサッシ建材商事\n');
	document.write('<OPTION value="http://www.jio-kensa.co.jp/">日本住宅保証検査機構\n');
	document.write('<OPTION value="http://www.j-shield.co.jp/">ジャパンホームシールド\n');
	document.write('<OPTION value="http://www.tmsc.co.jp">トステムマネジメントシステムズ\n');
	document.write('<OPTION value="http://www.homewellfc.com/">ホームウェル\n');
	document.write('<OPTION value="http://www.erajapan.co.jp/">イーアールエー・ジャパン\n');
	document.write('<OPTION value="http://www.jsfinance.co.jp/">住生活グループファイナンス\n');
	document.write('<OPTION value="http://www.it-is.co.jp/">ITインフォメーションシステムズ\n');
	document.write('<OPTION value="http://www.tostemju-ken.co.jp/">トステム住宅研究所\n');
	document.write('<OPTION value="http://www.eyefulhome.jp/">アイフルホームカンパニー\n');
	document.write('<OPTION value="http://www.fiace.jp/">フィアスホーム\n');
	document.write('<OPTION value="http://www.glhome.co.jp/">ジーエルホーム\n');
	document.write('<OPTION value="http://www.classis.jp/">クラシス\n');
	document.write('<OPTION value="http://www.tostemsd.co.jp/">トステムSD\n');
	document.write('<OPTION value="http://www.totaljuki.co.jp/">トータル住器\n');
	document.write('<OPTION value="http://www.asahitostem.co.jp/">旭トステム外装\n');
	document.write('<OPTION value="http://www.tostemfound.or.jp/">トステム建材産業振興財団\n');
	document.write('<OPTION value="http://www.jsgsl.co.jp/">トステムシニアライフカンパニー\n');
	document.write('<OPTION value="http://tostem-online.com/">トステムオンライン\n');
	document.write('<OPTION value="http://www.js-supply.co.jp/">住生活サプライ\n');	
	document.write('</SELECT>\n');
}


/*---------- layout html ----------*/
function create_footer()
{
	document.write('<div id="footer_20060420">\n');
	document.write('<table width="760" bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="0">\n');
	document.write('<tr>\n');
	document.write('<td>\n');
	document.write('<table width="760" border="0" cellspacing="0" cellpadding="0" class="border">\n');
	document.write('<tr bgcolor="#F4F3EE">\n');
	document.write('<td width="400" height="32">\n');
	document.write('<table border="0" cellpadding="0" cellspacing="0">\n');
	document.write('<tr valign="middle">\n');
	document.write('<td><img src="/pic/common/spacer.gif" width="17" height="1" alt=""></td>\n');
	document.write('<td><a href="/newsrelease/" onMouseOver="common_mouse_in(11);" onMouseOut="common_mouse_out(11)"><img src="/pic/common/footer_newsrelease.gif" width="98" height="22" border="0" alt="ニュースリリース" name="img11"></a></td>\n');
	document.write('<td><img src="/pic/common/spacer.gif" width="20" height="1" alt=""></td>\n');
	document.write('<td><a href="/group/" onMouseOver="common_mouse_in(13);" onMouseOut="common_mouse_out(13)"><img src="/pic/common/footer_group.gif" width="135" height="22" border="0" alt="住まいの関連リンク集" name="img13"></a></td>\n');
	document.write('</tr>\n');
	document.write('</table>\n');
	document.write('</td>\n');
	document.write('<td width="360" align="right">\n');
	document.write('<table width="360" border="0" cellspacing="0" cellpadding="0">\n');
	document.write('<tr>\n');
	document.write('<td width="280" align="right">\n');

	/* select menu */
	pull_down_menu_footer();

	document.write('</td>\n');
	document.write('<td width="80" align="center"><a href="http://www.jsgc.co.jp/" target="_blank"><img src="/pic/common/logo_jsgc.gif" width="41" height="25" border="0" alt="住生活グループ"></a></td>\n');
	document.write('</tr>\n');
	document.write('</table>\n');
	document.write('</td>\n');
	document.write('</tr>\n');
	document.write('</table>\n');
	document.write('</td>\n');
	document.write('</tr>\n');
	document.write('<tr>\n');
	document.write('<td>\n');
	document.write('<table width="760" border="0" cellpadding="0" cellspacing="0">\n');
	document.write('<tr valign="bottom">\n');
	document.write('<td width="358">\n');
	document.write('<a href="/misc/copyright.htm" onMouseOver="common_mouse_in(16);" onMouseOut="common_mouse_out(16)"><img src="/pic/common/footer_copyright.gif" width="339" height="20" border="0" alt="Copyright(C) 1996-2008 TOSTEM CORPORATION. ALL right reserved." name="img16"></a>\n');
	document.write('</td>\n');
	document.write('<td width="1"><img src="/pic/common/spacer.gif" width="1" height="20" alt=""></td>\n');
	document.write('<td width="401" align="right">\n');
	document.write('<a href="/about_products/" onMouseOver="common_mouse_in(20);" onMouseOut="common_mouse_out(20)"><img src="/pic/common/footer_about_puroducts.gif" width="126" height="22" border="0" alt="掲載の商品について" name="img20"></a><img src="/pic/common/spacer.gif" width="17" height="1" alt=""><a href="/misc/copyright.htm" onMouseOver="common_mouse_in(14);" onMouseOut="common_mouse_out(14)"><img src="/pic/common/footer_use.gif" width="141" height="20" border="0" alt="ご利用条件・リンクについて" name="img14"></a><img src="/pic/common/spacer.gif" width="20" height="1" alt=""><a href="/policy/" onMouseOver="common_mouse_in(15);" onMouseOut="common_mouse_out(15)"><img src="/pic/common/footer_privacy.gif" width="97" height="20" border="0" alt="プライバシーポリシー" name="img15"></a>\n');
	document.write('</td>\n');
	document.write('</tr>\n');
	document.write('</table>\n');
	document.write('</td>\n');
	document.write('</tr>\n');
	document.write('</table>\n');
	document.write('</div>\n');
}
