﻿// JavaScript Document



var headMenuPicJP = new Array(	"images/header/jp_header_menu_home_hover.jpg",
								"images/header/jp_header_menu_inq_hover.jpg",
								"images/header/jp_header_menu_jp_hover.jpg");

var headMenuPicEN = new Array(	"images/header/en_header_menu_home_hover.jpg",
								"images/header/en_header_menu_inq_hover.jpg",
								"images/header/en_header_menu_jp_hover.jpg");

var mainMenuPicJP = new Array( "images/content/index/jp_main_menu_about_hover.jpg",
								"images/content/index/jp_main_menu_aluminum_hover.jpg",				  								"images/content/index/jp_main_menu_equip_hover.jpg",
								"images/content/index/jp_main_menu_facility_hover.jpg",
								"images/content/index/jp_main_menu_product_hover.jpg",
								"images/content/index/jp_main_menu_news_hover.jpg",
								"images/content/index/jp_main_menu_inq_hover.jpg",
								"images/content/index/jp_main_menu_recruit_hover.jpg");

var mainMenuPicEN = new Array( "images/content/index/en_main_menu_about_hover.jpg",
								"images/content/index/en_main_menu_aluminum_hover.jpg",				  								"images/content/index/en_main_menu_equip_hover.jpg",
								"images/content/index/en_main_menu_facility_hover.jpg",
								"images/content/index/en_main_menu_product_hover.jpg",
								"images/content/index/en_main_menu_news_hover.jpg",
								"images/content/index/jp_main_menu_inq_hover.jpg",
								"images/content/index/jp_main_menu_recruit_hover.jpg");

var linkMenuPicJP = new Array( "images/content/index/blog_btn_hover.jpg",
								"images/content/index/facebook_hover.jpg",	
								"images/content/index/shisakuNet_hover.jpg",
								"images/content/index/nc_network_hover.jpg");
								
var linkMenuPicEN = new Array( "images/content/index/blog_btn_hover.jpg",
								"images/content/index/facebook_hover.jpg",	
								"images/content/index/shisakuNet_hover.jpg",
								"images/content/index/nc_network_hover.jpg");
							
var moreVideoPicJP = new Array( "images/content/index/more_video_factory_hover.jpg",
								"images/content/index/more_video_alumi_hover.jpg",	
								"images/content/index/more_video_it_hover.jpg",
								"images/content/index/more_video_frame_hover.jpg",
								"images/content/index/more_video_datsu_hover.jpg",
								"images/content/index/more_video_5men_hover.jpg");

var moreVideoPicEN = new Array( "images/content/index/more_video_factory_hover.jpg",
								"images/content/index/more_video_alumi_hover.jpg",	
								"images/content/index/more_video_it_hover.jpg",
								"images/content/index/more_video_frame_hover.jpg",
								"images/content/index/more_video_datsu_hover.jpg",
								"images/content/index/more_video_5men_hover.jpg");


var aboutMenuPicJP = new Array( "images/content/about/jp_about_menu_message_hover.jpg",
								"images/content/about/jp_about_menu_general_hover.jpg",				  		
								"images/content/about/jp_about_menu_history_hover.jpg",
								"images/content/about/jp_about_menu_access_hover.jpg");

var aboutMenuPicEN = new Array( "images/content/about/en_about_menu_message_hover.jpg",
								"images/content/about/en_about_menu_general_hover.jpg",				  		
								"images/content/about/en_about_menu_history_hover.jpg",
								"images/content/about/en_about_menu_access_hover.jpg");
var arrowBtnJP = new Array(   	'images/content/about/history_arow_left_hover.jpg',				 
								'images/content/about/history_arow_right_hover.jpg'
								);
		
var itemsBtnJP = new Array(   	'images/content/product/FRAME_banner_hover.jpg'
								);	
var itemsBtnEN = new Array(   	'images/content/product/FRAME_banner_hover.jpg'
								);		

var facilityTabJP = new Array(   	'images/content/facility/box_tab_left_hover.jpg',
'images/content/facility/box_tab_mid1_hover.jpg',
'images/content/facility/box_tab_mid2_hover.jpg',
'images/content/facility/box_tab_mid3_hover.jpg',
'images/content/facility/box_tab_mid4_hover.jpg',
'images/content/facility/box_tab_mid5_hover.jpg',
'images/content/facility/box_tab_mid6_hover.jpg',
'images/content/facility/box_tab_mid7_hover.jpg',
'images/content/facility/box_tab_right_hover.jpg'
								);	
			
var facilityTabEN = new Array(   	'images/content/facility/box_tab_left_hover.jpg',
'images/content/facility/box_tab_mid1_hover.jpg',
'images/content/facility/box_tab_mid2_hover.jpg',
'images/content/facility/box_tab_mid3_hover.jpg',
'images/content/facility/box_tab_mid4_hover.jpg',
'images/content/facility/box_tab_mid5_hover.jpg',
'images/content/facility/box_tab_mid6_hover.jpg',
'images/content/facility/box_tab_mid7_hover.jpg',
'images/content/facility/box_tab_right_hover.jpg'
								);	


var productTabJP = new Array(   	'images/content/facility/pro_box_tab_left_hover.jpg',
'images/content/facility/pro_box_tab_mid1_hover.jpg',
'images/content/facility/pro_box_tab_mid2_hover.jpg',
'images/content/facility/pro_box_tab_mid3_hover.jpg',
'images/content/facility/pro_box_tab_mid4_hover.jpg',
'images/content/facility/pro_box_tab_mid5_hover.jpg',
'images/content/facility/pro_box_tab_mid6_hover.jpg',
'images/content/facility/pro_box_tab_mid7_hover.jpg',
'images/content/facility/pro_box_tab_right_hover.jpg'
								);	
			
var productTabEN = new Array(   	'images/content/facility/box_tab_left_hover.jpg',
'images/content/facility/pro_box_tab_mid1_hover.jpg',
'images/content/facility/pro_box_tab_mid2_hover.jpg',
'images/content/facility/pro_box_tab_mid3_hover.jpg',
'images/content/facility/pro_box_tab_mid4_hover.jpg',
'images/content/facility/pro_box_tab_mid5_hover.jpg',
'images/content/facility/pro_box_tab_mid6_hover.jpg',
'images/content/facility/pro_box_tab_mid7_hover.jpg',
'images/content/facility/pro_box_tab_right_hover.jpg'
								);


var featureMenuJP = new Array( 'images/content/feature/feature_btn_left_1_hover.jpg',
'images/content/feature/feature_btn_left_2_hover.jpg',
'images/content/feature/feature_btn_left_3_hover.jpg',
'images/content/feature/feature_btn_left_4_hover.jpg',
'images/content/feature/feature_btn_right_1_hover.jpg',
'images/content/feature/feature_btn_right_2_hover.jpg',
'images/content/feature/feature_btn_right_3_hover.jpg','images/content/feature/feature_btn_right_4_hover.jpg'
								);
								
var featureMenuEN = new Array( 'images/content/feature/feature_btn_left_1_hover.jpg',
'images/content/feature/feature_btn_left_2_hover.jpg',
'images/content/feature/feature_btn_left_3_hover.jpg',
'images/content/feature/feature_btn_left_4_hover.jpg',
'images/content/feature/feature_btn_right_1_hover.jpg',
'images/content/feature/feature_btn_right_2_hover.jpg',
'images/content/feature/feature_btn_right_3_hover.jpg','images/content/feature/feature_btn_right_4_hover.jpg'
								);
					
var facilityMenuJP = new Array(
"images/content/facility/fac_menu_product_hover.jpg",
"images/content/facility/fac_menu_facility_hover.jpg",
"images/content/facility/fac_menu_hilltop_hover.jpg");

var facilityMenuEN = new Array(
"images/content/facility/fac_menu_product_hover.jpg",
"images/content/facility/fac_menu_facility_hover.jpg",
"images/content/facility/fac_menu_hilltop_hover.jpg");

var reqMenuPicJP 	=new Array(
"images/content/request/jp_req_menu_producer_hover.jpg",
"images/content/request/jp_req_menu_service_hover.jpg",
"images/content/request/jp_req_menu_QandA_hover.jpg"
);

var reqMenuPicEN 	=new Array(
"images/content/request/jp_req_menu_producer_hover.jpg",
"images/content/request/jp_req_menu_service_hover.jpg",
"images/content/request/jp_req_menu_QandA_hover.jpg"
);
					
var MenuPic	 	= new Array();
MenuPic[ 0] 	= headMenuPicJP;
MenuPic[ 1] 	= headMenuPicEN;
MenuPic[ 2] 	= mainMenuPicJP;
MenuPic[ 3] 	= mainMenuPicEN;
MenuPic[ 4] 	= linkMenuPicJP;
MenuPic[ 5] 	= linkMenuPicEN;
MenuPic[ 6] 	= moreVideoPicJP;
MenuPic[ 7] 	= moreVideoPicEN;
MenuPic[ 8] 	= aboutMenuPicJP;
MenuPic[ 9] 	= aboutMenuPicEN;
MenuPic[10]		= arrowBtnJP;
MenuPic[11]		= arrowBtnJP;
MenuPic[12]		= itemsBtnJP;
MenuPic[13]		= itemsBtnEN;
MenuPic[14]		= facilityTabJP;
MenuPic[15]		= facilityTabEN;
MenuPic[16]		= featureMenuJP;
MenuPic[17]		= featureMenuEN;
MenuPic[18]		= facilityMenuJP;
MenuPic[19]		= facilityMenuEN;
MenuPic[20] 	= reqMenuPicJP;
MenuPic[21] 	= reqMenuPicEN;
MenuPic[22] 	= productTabJP;
MenuPic[23] 	= productTabEN;

var org_pic;



var videoTitleJP = new Array(	"<p><br />バーチャル工場見学</p>",
								"<p><br />アルミ加工のプロフェッショナル集団</p>",
								"<p><br />常識を覆したＩＴ鉄工所</p>",
								"<p><br />フルハイビジョン<br>映像コミュニケーションシステム</p>",
								"<p><br />脱・鉄工所のすすめ</p>",
								"<p><br />5軸加工機</p>");

var videoTitleEN = new Array(	"<p><br />バーチャル工場見学</p>",
								"<p><br />アルミ加工のプロフェッショナル集団</p>",
								"<p><br />常識を覆したＩＴ鉄工所</p>",
								"<p><br />フルハイビジョン映像<br>コミュニケーションシステム 「FRAME」</p>",
								"<p><br />脱・鉄工所のすすめ</p>",
								"<p><br />5軸加工機</p>");
								
var yotubeVideoJP = new Array(	'<iframe width="499" height="299" src="http://www.youtube.com/embed/YRoBzYwS0Tg" frameborder="0" allowfullscreen></iframe>',
								'<iframe width="499" height="299" src="http://www.youtube.com/embed/nSNqU_PPftg" frameborder="0" allowfullscreen></iframe>',
								'<iframe width="499" height="299" src="http://www.youtube.com/embed/_B0KTYxNzbQ" frameborder="0" allowfullscreen></iframe>',
								'<iframe width="499" height="299" src="http://www.youtube.com/embed/tCPO2roKAwI" frameborder="0" allowfullscreen></iframe>',
								'<iframe width="499" height="299" src="http://www.youtube.com/embed/zPSqKCSNBXw" frameborder="0" allowfullscreen></iframe>',
								'<iframe width="499" height="299" src="http://www.youtube.com/embed/ymXmthbYFiM" frameborder="0" allowfullscreen></iframe>');

var yotubeVideoEN = new Array(	'<iframe width="499" height="299" src="http://www.youtube.com/embed/YRoBzYwS0Tg" frameborder="0" allowfullscreen></iframe>',
								'<iframe width="499" height="299" src="http://www.youtube.com/embed/nSNqU_PPftg" frameborder="0" allowfullscreen></iframe>',
								'<iframe width="499" height="299" src="http://www.youtube.com/embed/_B0KTYxNzbQ" frameborder="0" allowfullscreen></iframe>',
								'<iframe width="499" height="299" src="http://www.youtube.com/embed/tCPO2roKAwI" frameborder="0" allowfullscreen></iframe>',
								'<iframe width="499" height="299" src="http://www.youtube.com/embed/zPSqKCSNBXw" frameborder="0" allowfullscreen></iframe>',
								'<iframe width="499" height="299" src="http://www.youtube.com/embed/ymXmthbYFiM" frameborder="0" allowfullscreen></iframe>');


var MenuStr	 	= new Array();
MenuStr[ 0] 	= videoTitleJP;
MenuStr[ 1] 	= videoTitleEN;
MenuStr[ 2] 	= yotubeVideoJP;
MenuStr[ 3] 	= yotubeVideoEN;

var org_innerHTML ="";
var org_youtube   ="";



function changeHeadMenuPic(l_id, num, state, add){
		
	var id 		= document.getElementById( l_id);
	
	if( state == 1){
		
	// onMouseOver
		org_pic 	= id.src; //元の画像名を保持
		id.src 		= MenuPic[ (lang + add)][ num];　// 画像の入替え
	}else if( state == 0){
	// onMouseOut
		id.src		= org_pic;　// 元の画像に戻す
	}
}



function changeMenuStr(l_id, num, state, add){
		
	var id 		= document.getElementById( l_id);
	
	
	if( state == 1){
		
	// onMouseOver
		org_innerHTML = id.innerHTML; //元の文字列を保持
		id.innerHTML 		= MenuStr[ (lang + add)][ num];　// 文字列の入替え
		
	}else if( state == 0){
	// onMouseOut
		id.innerHTML		= org_innerHTML;　// 元の文字列に戻す
	}
	
}

function changeVideo( num, add){
	
	var title			= document.getElementById( 'video_title');
	var youtube 		= document.getElementById( 'youtube');
	
	org_innerHTML = title.innerHTML = MenuStr[ (lang + add)][ num];
	youtube.innerHTML 	= MenuStr[ (lang + (add + 2))][ num];
	
}

var FOOTER = '<br /> <table class="footer_table" id="footer_table" width="954" border="0"><tr><th width="34" scope="col">&nbsp;</th><th width="99" scope="col">HILLTOP</th><th width="171" scope="col">HILLTOPの強み１</th><th width="170" scope="col">HILLTOPの強み２</th><th width="126" scope="col">開発依頼</th><th width="100" scope="col">製品＆設備</th><th width="67" scope="col">リンク1</th><th width="103" scope="col">リンク2</th></tr><tr><td>&nbsp;</td><td><a href="about.html">メッセージ</a></td><td><a href="feature.html#processing">アルミ加工ならお任せ</a></td><td><a href="feature.html#develop">オリジナル装置の開発</a></td><td><a href="request.html">プロデューサー紹介</a></td><td><a href="sample_product.html">設備紹介</a></td><td><a href="http://ameblo.jp/hilltop21/" target="_blank">ブログ</a></td><td><a href="http://www.kyoto-shisaku.com/" target="_blank">試作ネット</a></td></tr><tr><td>&nbsp;</td><td><a href="about_general.html">企業概要</a></td><td><a href="feature.html#short_lead">ハイクオリティ＋短納期</a></td><td><a href="feature.html#renew">生産ラインの改善サポート</a></td><td><a href="request_service.html">サービスと事例</a></td><td><a href="facility.html">製品紹介</a></td><td><a href="http://twitter.com/#!/YAMAMOTO_SEIKO" target="_blank">twitter</a></td><td><a href="http://saisei-monozukuri.jp/technology/research/20120125000020.html" target="_blank">再生医療</a></td></tr><tr><td>&nbsp;</td><td><a href="about_access.html">アクセス</a></td><td><a href="feature.html#repeat">安定供給！ 小ロット対応！</a></td><td><a href="feature.html#inspect">徹底した品質管理</a></td><td><a href="request_QandA.html">よくあるお問合せ</a></td><td><a href="hilltopBLDG.html">施設案内</a></td><td><a href="http://www.facebook.com/hilltop21.jp" target="_blank">facebook</a></td><td><a href="http://www.fat-tokyo.com/fat-tokyo.com/TOP.html" target="_blank">FAT</a></td></tr><tr><td>&nbsp;</td><td><a href="inquiry.html">お問合せ</a></td><td><a href="feature.html#surface">処理までサポート</a></td><td><a href="feature.html#total">多様な要望にお答えします！</a></td><td>&nbsp;</td><td><a href="product.html">FRAME</a></td><td><a href="http://www.nc-net.or.jp/company/73066/" target="_blank">エミダス</a></td><td><a href="http://www.geocities.jp/team_sws/" target="_blank">サイドワインダーズ</a></td></tr><tr><td>&nbsp;</td><td><a href="recruitment.html">リクルート</a></td><td></td><td></td><td></td><td></td><td><a href="http://www.youtube.com/user/hilltop21promo/videos" target="_blank">動画全集</a></td><td><a href="http://www.laksmido.com/" target="_blank">楽墨堂</a></td></tr</table>';

function writeAnalytics(file_url){
	
	var file_name 	= file_url.substring(file_url.lastIndexOf("/")+1, file_url.length);
	var EMIDAS = "<script type='text/javascript'><img src='http://www.nc-net.or.jp/al.php?id=73066&amp;f=/" + file_name + "&amp;r=" +escape( document.referrer ) + "'></script><noscript><img src='http://www.nc-net.or.jp/al.php?id=73066&amp;f=/index.html&amp;r='></noscript>";
	return EMIDAS;
}
	  
	  
function footerWrite(){
	//var Analy = writeAnalytics(location.href);	
	var id 		= document.getElementById('footer');
	id.innerHTML 		= FOOTER;　// 文字列の入替え	
}



var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");

var header = document.getElementsByTagName("head")[0];
var scriptTag = document.createElement("script");
scriptTag.setAttribute("src", gaJsHost + "google-analytics.com/ga.js");
scriptTag.setAttribute("type", "text/javascript");

header.appendChild(scriptTag);

function analytics() {
　try {
　　var pageTracker = _gat._getTracker("UA-24041041-1");
　　pageTracker._trackPageview();
	
　} catch(err) {
　　// alert("Google Analytics:" + err);
　}
}

if (window.attachEvent) {
　window.attachEvent("onload", analytics);
} else {
　window.addEventListener("load", analytics, false);
}
