// イメージ差し替え on ----------------------------------------------------------
function swap_image_on ( e ) {
 if ( e.target ) {
  target_node = e.target.id;
 } else {
  target_node = e.srcElement.id;
 }

 document.getElementById(target_node).src = './common/images/' + target_node + '_on.gif';
}

// イメージ差し替え off ---------------------------------------------------------
function swap_image_off ( e ) {
 if ( e.target ) {
  target_node = e.target.id;
 } else {
  target_node = e.srcElement.id;
 }

 document.getElementById(target_node).src = './common/images/' + target_node + '_off.gif';
}

// プルダウンメニュー -----------------------------------------------------------
function pulldownmenu ( e ) {
 if ( e.target ) {
  target_node = e.target.id;
 } else {
  target_node = e.srcElement.id;
 }

 location.href = document.getElementById(target_node).value;
}

// リスナー追加 -----------------------------------------------------------------
function addListener ( elem, eventType, func, cap ) {
 if ( elem.addEventListener ) {
  elem.addEventListener ( eventType, func, cap );
 } else if ( elem.attachEvent ) {
  elem.attachEvent ( 'on' + eventType, func );
 } else {
  alert( 'A browser used is not supported.');
  return false;
 }
}

// イベントリスナー初期化 -------------------------------------------------------
function setListeners ( e ) {

// ヘッダナビイベントリスナー
 var hn_product = document.getElementById( 'hn_product' );
 addListener ( hn_product, 'mouseover', swap_image_on,  false );
 addListener ( hn_product, 'mouseout',  swap_image_off, false );

 var hn_company = document.getElementById( 'hn_company' );
 addListener ( hn_company, 'mouseover', swap_image_on,  false );
 addListener ( hn_company, 'mouseout',  swap_image_off, false );

 var hn_calibrate = document.getElementById( 'hn_calibrate' );
 addListener ( hn_calibrate, 'mouseover', swap_image_on,  false );
 addListener ( hn_calibrate, 'mouseout',  swap_image_off, false );
	
	var hn_japanese = document.getElementById( 'hn_japanese' );
 addListener ( hn_japanese, 'mouseover', swap_image_on,  false );
 addListener ( hn_japanese, 'mouseout',  swap_image_off, false );

 var hn_chinese = document.getElementById( 'hn_chinese' );
 addListener ( hn_chinese, 'mouseover', swap_image_on,  false );
 addListener ( hn_chinese, 'mouseout',  swap_image_off, false );



// 左メニューイベントリスナー
 var hn_product = document.getElementById( 'lm_top_product' );
 addListener ( hn_product, 'mouseover', swap_image_on,  false );
 addListener ( hn_product, 'mouseout',  swap_image_off, false );

 var lm_top_company = document.getElementById( 'lm_top_company' );
 addListener ( lm_top_company, 'mouseover', swap_image_on,  false );
 addListener ( lm_top_company, 'mouseout',  swap_image_off, false );

 var lm_top_calibrate = document.getElementById( 'lm_top_calibrate' );
 addListener ( lm_top_calibrate, 'mouseover', swap_image_on,  false );
 addListener ( lm_top_calibrate, 'mouseout',  swap_image_off, false );


//var lm_top_howtobuy = document.getElementById( 'lm_top_howtobuy' );
//addListener ( lm_top_howtobuy, 'mouseover', swap_image_on,  false );
//addListener ( lm_top_howtobuy, 'mouseout',  swap_image_off, false );

 var lm_top_technology = document.getElementById( 'lm_top_technology' );
 addListener ( lm_top_technology, 'mouseover', swap_image_on,  false );
 addListener ( lm_top_technology, 'mouseout',  swap_image_off, false );

 var lm_top_inquiry = document.getElementById( 'lm_top_inquiry' );
 addListener ( lm_top_inquiry, 'mouseover', swap_image_on,  false );
 addListener ( lm_top_inquiry, 'mouseout',  swap_image_off, false );

 var lm_top_exhibition = document.getElementById( 'lm_top_exhibition' );
 addListener ( lm_top_exhibition, 'mouseover', swap_image_on,  false );
 addListener ( lm_top_exhibition, 'mouseout',  swap_image_off, false );

 var lm_top_membership = document.getElementById( 'lm_top_membership' );
 addListener ( lm_top_membership, 'mouseover', swap_image_on,  false );
 addListener ( lm_top_membership, 'mouseout',  swap_image_off, false );

}

// onLoad イベント定義 ----------------------------------------------------------
addListener ( window, 'load', setListeners, false );

