// JavaScript Document

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_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_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 getOSType()
{
    var uAgent  = navigator.userAgent.toUpperCase();
    if (uAgent.indexOf("MAC") >= 0) return "MacOS";
    if (uAgent.indexOf("WIN") >= 0) return "Windows";
    if (uAgent.indexOf("X11") >= 0) return "UNIX";
    return "";
}
//-----------------------------------------------------------------------//
//　Netscape Navigator ->  Netscape
//　Internet Explorer  ->　Explorer
//　Safari  ->　Safari
//　Opera  ->　Opera
//-----------------------------------------------------------------------//
function InserBR()
{
	alert("here !!!");
}
// -------------------------------------------------------- //
function show_referer( from_add )
{
	alert( from_add );
}
// -------------------------------------------------------- //
function showBrowserName()
{
	var app_name   = document.getElementById('t_appname');
	var user_agent = document.getElementById('t_useragent');
	var browser    = document.getElementById('t_browser');
	var version    = document.getElementById('t_version');
	
//	app_name.innerHTML   = navigator.appName.toUpperCase();
//	user_agent.innerHTML = navigator.userAgent.toUpperCase();
	browser.innerHTML    = getBrowserName();
	version.innerHTML    = getBrowserVersion();
}
//-----------------------------------------------------------------------//
function getBrowserName()
{
    var aName = navigator.appName.toUpperCase();
    var uName = navigator.userAgent.toUpperCase();
	
// ***  aName  *** //
// Opera	: OPERA
// Chrome	: NETSCAPE
// Safari	: NETSCAPE
// FireFox	: NETSCAPE
// IE		: MICROSOFT INTERNET EXPLORER


// ***  uName  *** //
// Opera	: OPERA/9.80 (WINDOWS NT 5.1; U; JA) PRESTO/2.7.62 VERSION/11.01
// Chrome	: MOZILLA/5.0 (WINDOWS; U; WINDOWS NT 5.1; EN-US) APPLEWEBKIT/534.13 (KHTML, LIKE GECKO) CHROME/9.0.597.98 SAFARI/534.13
// Safari	: MOZILLA/5.0 (WINDOWS; U; WINDOWS NT 5.1; JA-JP) APPLEWEBKIT/533.19.4 (KHTML, LIKE GECKO) VERSION/5.0.3 SAFARI/533.19.4
// FireFox	: MOZILLA/5.0 (WINDOWS; U; WINDOWS NT 5.1; JA; RV:1.9.2.13) GECKO/20101203 FIREFOX/3.6.13 ( .NET CLR 3.5.30729)
// IE		: MOZILLA/4.0 (COMPATIBLE; MSIE 8.0; WINDOWS NT 5.1; TRIDENT/4.0; MOZILLA/4.0 (COMPATIBLE; MSIE 6.0; WINDOWS NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

	// ※ indexOf は大文字小文字を区別する //
    if (uName.indexOf("OPERA") >= 0)     return "Opera";
    if (uName.indexOf("CHROME") >= 0)    return "Chrome";
    if (uName.indexOf("SAFARI") >= 0)    return "Safari";
    if (uName.indexOf("FIREFOX") >= 0)   return "FireFox";
    if (uName.indexOf("MSIE") >= 0) 	 return "Explorer";
    // if (aName.indexOf("NETSCAPE") >= 0)  return "Netscape";	// 2008年開発終了 FireFoxに移行
	return "unknown";
}
//-----------------------------------------------------------------------//

function getBrowserVersion()
{
	var browser = getBrowserName();
	var version = 0;
	var s = 0;
	var e = 0;
	var appVer  = navigator.appVersion;
	var uName  = navigator.userAgent.toUpperCase();
	if( (browser == "Safari") || (browser == "Opera") ){
		s = uName.indexOf("VERSION") + 8;
		e = uName.indexOf(" ", s);
		if( e != -1 ){
			//version = eval(uName.substring(s,e));
			s_version = uName.substring(s,e);
		}
		else{
			//version = eval(uName.substring(s));
			s_version = uName.substring(s);
		}
	}
	if( browser == "Chrome" ){
		s = uName.indexOf("CHROME",0) + 7;
		e = uName.indexOf(" ",s);
		//version = eval(uName.substring(s,e));
		s_version = uName.substring(s,e);
	}
	if( browser == "FireFox" ){
		s = uName.indexOf("FIREFOX",0) + 8;
		e = uName.indexOf(" ",s);
		//version = eval(uName.substring(s,e));
		s_version = uName.substring(s,e);
	}
	if( browser == "Explorer" ){
		appVer  = navigator.userAgent;
		s = uName.indexOf("MSIE ",0) + 5;
		e = uName.indexOf(";",s);
		//version = eval(appVer.substring(s,e));
		s_version = uName.substring(s,e);
	}
	//return version;
	return s_version;
}

//-----------------------------------------------------------------------//

//-----------------------------------------------------------------------//
// SafariでMediaPlayerを開く時の処理、ウィンドウサイズを変更することでMediaPlayerを表示する
function ResizeWindow_for_Safari()
{
	window.resizeTo( window.outerWidth + 1, window.outerheight + 1 );
	window.resizeTo( window.outerWidth - 1, window.outerheight - 1 );
}
// -------------------------------------------------------- //
// 画像切換
function ImageChange( image_index, path_name )
{
    document.images[ image_index ].src = path_name;
}
// -------------------------------------------------------- //
function Read_StyleSheets( opath )
{
	p1 = '<link href = ';
	p2 = " rel='stylesheet' type='text/css'>";

	css1 = opath + 'css/i_frame.css';
	// css2 = opath + 'css/i_frame_explorer.css';
	// css3 = opath + 'css/i_frame_netscape.css';
	// css4 = opath + 'css/top_page_explorer.css';
	// css5 = opath + 'css/top_page_netscape.css';
	css6 = opath + 'css/contact.css';
	css7 = opath + 'css/datasheets.css';
	css8 = opath + 'css/font.css';
	css9 = opath + 'css/KPI.css';
	css10 = opath + 'css/menu.css';
	css11 = opath + 'css/product.css';
	css12 = opath + 'css/product_table.css';
	css13 = opath + 'css/std.css';
	css14 = opath + 'css/tag.css';
//	css15 = opath + 'css/top_page.css';
//	css16 = opath + 'css/top_page2.css';
	css17 = opath + 'css/top_page_common.css';
//	css18 = opath + 'css/fly_menu_ie.css';
//	css19 = opath + 'css/fly_menu_ff.css';
//	css20 = opath + 'css/fly_menu_op.css';
	css21 = opath + 'css/dd_menu_ie.css';
	css22 = opath + 'css/dd_menu_ff.css';
	css23 = opath + 'css/dd_menu_op.css';

	css24 = opath + 'css/prn_set.css';

	document.write( p1 + css1 + p2 );
	// -------------------- //
	// ブラウザーによる切換 //
	// -------------------- //
	br_name = getBrowserName();
	if( "Explorer" == br_name ){
		// document.write( p1 + css2 + p2 );
		// document.write( p1 + css4 + p2 );
		// document.write( p1 + css18 + p2 );
		document.write( p1 + css21 + p2 );
	}
	else if( ("FireFox" == br_name) || ("Safari" == br_name) ){
		// document.write( p1 + css3 + p2 );
		// document.write( p1 + css5 + p2 );
		// document.write( p1 + css19 + p2 );
		document.write( p1 + css22 + p2 );
	}
	else if( "Opera" == br_name ){
		// document.write( p1 + css3 + p2 );
		// document.write( p1 + css5 + p2 );
		// document.write( p1 + css20 + p2 );
		document.write( p1 + css23 + p2 );
	}
	else if( "Chrome" == br_name ){
		// document.write( p1 + css3 + p2 );
		// document.write( p1 + css5 + p2 );
		// document.write( p1 + css20 + p2 );
		document.write( p1 + css22 + p2 );
	}
	else{
		// document.write( p1 + css2 + p2 );
		// document.write( p1 + css5 + p2 );
		// document.write( p1 + css18 + p2 );
		document.write( p1 + css21 + p2 );
	}
	// ---- //
	// 共通 //
	// ---- //
	document.write( p1 + css6  + p2 );
	document.write( p1 + css7  + p2 );
	document.write( p1 + css8  + p2 );
	document.write( p1 + css9  + p2 );
	document.write( p1 + css10 + p2 );
	document.write( p1 + css11 + p2 );
	document.write( p1 + css12 + p2 );
	document.write( p1 + css13 + p2 );
	document.write( p1 + css14 + p2 );
//	document.write( p1 + css15 + p2 );
//	document.write( p1 + css16 + p2 );
	document.write( p1 + css17 + p2 );
	document.write( p1 + css24 + p2 );

	// -------------------------------------------- //
	//  今日の日付に応じて読み込むファイルを変える  //
	// -------------------------------------------- //
	var nowdate = new Date();
	var month = nowdate.getMonth() + 1;
	month_css = 'css/month/month_property_' + month + '.css';
	document.write( p1 + opath + month_css + p2 );
	// alert( p1 + month_css + p2 );
}

//-----------------------------------------------------------------------//
function img_frame_on( id_str )
{
	var element;
	element = document.getElementById( id_str );
//	element.style.borderColor = "#E61E3C"; //"#33ff00";
	element.style.backgroundColor = "#E61E3C"; //"#33ff00";
	element.style.color           = "#ffffff"; //"#33ff00";
//	element.style.borderTop       = "solid 1px #E61E3C";	// mouse out で枠が残ってしまうので中止
//	element.style.borderLeft      = "solid 1px #E61E3C";
//	element.style.borderBottom    = "solid 1px #730000";
//	element.style.borderRight     = "solid 1px #730000";
}
//-----------------------------------------------------------------------//
// 指定の位置にジャンプするが左のメニューバーも移動するので使えない
//function img_frame_on_2( id_str, jmp_str )
//{
//	img_frame_on( id_str );
//	
//	location.href = jmp_str;
//}
//-----------------------------------------------------------------------//
function img_frame_off( id_str )
{
	var element;
	element = document.getElementById( id_str );
//	element.style.borderColor = "#ffffff";
	element.style.backgroundColor = "#dddddd"; //"#33ff00";
	element.style.color           = "#333333"; //"#33ff00";
	element.style.borderTop       = "solid 1px #dddddd";
	element.style.borderLeft      = "solid 1px #dddddd";
	element.style.borderBottom    = "solid 1px #666666";
	element.style.borderRight     = "solid 1px #666666";
}
// -------------------------------------------------------- //
function show_year_time_timer()
{
	// show_year_time();
	setInterval( show_year_time, 1000 );
}
// -------------------------------------------------------- //
function show_year_time()
{
	var s_year = document.getElementById('year_str');
	var s_time = document.getElementById('time_str');
	
	// 年月日時間分 取得 //
	var nowdate = new Date();
	var year    = nowdate.getFullYear();
	var month   = nowdate.getMonth() + 1;
	var date    = nowdate.getDate();
	var hours   = nowdate.getHours();
	var min     = nowdate.getMinutes();
	var sec     = nowdate.getSeconds();
	
	if ( month < 10 ) { month = "0" + month; }
	if ( date  < 10 ) { date  = "0" + date; }
	if ( hours < 10 ) { hours = "0" + hours; }
	if ( min   < 10 ) { min   = "0" + min; }
	//if ( sec   < 10 ) { sec   = "0" + sec; }
	
	s_year.innerHTML = year + "/" + month + "/" + date;
	if( sec == 59 ){
		if( min == 59 ){
			hours = "--";
		}
		min = "--";
	}
	
	s_time.innerHTML = hours + ":" + min;
	// s_time.innerHTML = hours + ":" + min + ":" + sec;
}
// -------------------------------------------------------- //
function switch_new_products_timer()
{
	setInterval( switch_new_products, 3000 );
}
// -------------------------------------------------------- //
function switch_new_products()
{
	string1 = "多検体スラブ電気泳動";
	string2 = "電子冷却恒温循環槽";
	string3 = "新型電極Ｇ電極";

	// タイトル //
	var element_1 = document.getElementById('s_title_1');
	var element_2 = document.getElementById('s_src_1');
	var element_3 = document.getElementById('s_link_1');
	
	if( element_1.innerHTML == string3 ){
		element_1.innerHTML = string1;
		element_2.src       = "./img/product/migration/migration2/m_3088md.jpg";
//		element_2.width     = "140";
//		element_2.height    = "94";
		element_3.href      = "./right_window/migration/migration2/top_migration2.cgi?page=512";
	}
	else if( element_1.innerHTML == string1 ){
		element_1.innerHTML = string2;
		element_2.src       = "./img/product/cool_stat/circulite2.jpg";
//		element_2.width     = "140";
//		element_2.height    = "118";
		element_3.href      = "./right_window/cool_stat/circulite.cgi";
	}
	else if( element_1.innerHTML == string2 ){
		element_1.innerHTML = string3;
		element_2.src       = "./img/product/migration/cool_phore_star/g_electrode2.jpg";
//		element_2.width     = "140";
//		element_2.height    = "109";
		element_3.href      = "./right_window/migration/cool_phore_star/g_electrode.cgi?page=4";
		
	}
}
// -------------------------------------------------------- //
function timer_set()
{
	// ---------------------------------------------------------------------- //
	//  "アナテックはスラブ・サブマリン電気泳動 〜 " のバー                   //
	//  拡散のアニメーションっぽくしようとしたが、カクカクした感じは否めない  //
	// ---------------------------------------------------------------------- //
	// set_anatech_info( 0 );
	// setTimeout("highlight_bar01()", 100 );
	// setTimeout("highlight_bar02()", 180 );
	// setTimeout("highlight_bar03()", 260 );
	// setTimeout("highlight_bar04()", 340 );
	// setTimeout("highlight_bar05()", 420 );
	// setTimeout("highlight_bar06()", 500 );
	// setTimeout("highlight_bar07()", 580 );
	// setTimeout("highlight_bar08()", 660 );
	// setTimeout("highlight_bar09()", 740 );
	// setTimeout("highlight_bar10()", 820 );
	// setTimeout("highlight_bar11()", 900 );
	// setTimeout("highlight_bar12()", 980 );
	// setTimeout("highlight_bar13()", 1060 );
	// setTimeout("highlight_bar14()", 1140 );
	// setTimeout("highlight_bar15()", 1220 );
	// setTimeout("highlight_bar16()", 1300 );
	// setTimeout("highlight_bar17()", 1380 );
	// setTimeout("highlight_bar18()", 1460 );
	// setTimeout("highlight_bar19()", 1540 );
	// setTimeout("highlight_bar20()", 1620 );

	// 通常版 //
	setTimeout("highlight_show_4()", 2800 );

	// setTimeout("change_image_full_color()", 500 );

	// -------------------------- //
	//  画面右側の新商品情報など  //
	// -------------------------- //
	setTimeout("highlight_show_1()", 700 );
	setTimeout("highlight_show_2()", 1400 );
	setTimeout("highlight_show_3()", 2100 );
}
// -------------------------------------------------------- //
function highlight_show_1()
{
	// テキスト編 //
	// var color = "#ff6600";
	// var element;
	// element = document.getElementById('s_title_1');
	// element.style.backgroundColor = color;
	// element.style.borderColor = color;
	// element = document.getElementById('s_contents_1');
	// element.style.borderColor = color;

	//element.style.backgroundImage = 'url(../img/toppage/dev_bk_img.png)';
	
	// 画像編 //
	var element = document.getElementById('s_title_img_1');
	element.src = "../img/toppage/top_chara_1.png";
}
// -------------------------------------------------------- //
function highlight_show_2()
{
	// テキスト編 //
	// var color = "#cc33cc";
	// var element;
	// element = document.getElementById('s_title_2');
	// element.style.backgroundColor = color;
	// element.style.borderColor = color;
	// element = document.getElementById('s_contents_2');
	// element.style.borderColor = color;

	//element.style.backgroundImage = 'url(../img/toppage/dev_bk_img_2.png)';

	// 画像編 //
	var element = document.getElementById('s_title_img_2');
	element.src = "../img/toppage/top_chara_2.png";
}
// -------------------------------------------------------- //
function highlight_show_3()
{
	// テキスト編 //
	// var color = "#0092DE"; // #3399ff
	// var element;
	// element = document.getElementById('s_title_3');
	// element.style.backgroundColor = color;
	// element.style.borderColor = color;
	// element = document.getElementById('s_contents_3');
	// element.style.borderColor = color;

	//element.style.backgroundImage = 'url(../img/toppage/dev_bk_img_3.png)';

	// 画像編 //
	var element = document.getElementById('s_title_img_3');
	element.src = "../img/toppage/top_chara_3.png";
}
// -------------------------------------------------------- //
function highlight_show_4()
{
	var element;
	// テキスト編 //
//	element = document.getElementById('emphasis');
//	element.style.borderColor = "#ff0000";
//	element = document.getElementById('emphasis1');
//	element.style.color = "#ff0000";
//	element = document.getElementById('emphasis2');
//	element.style.color = "#ff0000";

	// 画像編 //
	element = document.getElementById('emphasis3');
	element.style.backgroundImage = 'url(../img/toppage/top_exp2.png)';
//	element.style.backgroundImage = 'url(../img/toppage/top_exp_v3.png)';
}
// -------------------------------------------------------- //
function get_emphasis3()
{
	element = document.getElementById('emphasis3');
    return element;
}
// -------------------------------------------------------- //
function highlight_bar01()
{
//	var element;
//	element = document.getElementById('emphasis3');
	get_emphasis3().style.backgroundImage = 'url(../img/toppage/top_exp_v7_19.png)';
}
// -------------------------------------------------------- //
function highlight_bar02(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_18.png)';	}
function highlight_bar03(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_17.png)';	}
function highlight_bar04(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_16.png)';	}
function highlight_bar05(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_15.png)';	}
function highlight_bar06(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_14.png)';	}
function highlight_bar07(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_13.png)';	}
function highlight_bar08(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_12.png)';	}
function highlight_bar09(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_11.png)';	}
function highlight_bar10(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_10.png)';	}
function highlight_bar11(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_09.png)';	}
function highlight_bar12(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_08.png)';	}
function highlight_bar13(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_07.png)';	}
function highlight_bar14(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_06.png)';	}
function highlight_bar15(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_05.png)';	}
function highlight_bar16(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_04.png)';	}
function highlight_bar17(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_03.png)';	}
function highlight_bar18(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_02.png)';	}
function highlight_bar19(){		get_emphasis3().style.backgroundImage = 'url(../img/toppage/exp/top_exp_v7_01.png)';	}
function highlight_bar20()
{
	get_emphasis3().style.backgroundImage = 'url(../img/toppage/top_exp2.png)';	
	set_anatech_info( 1 );
}
// -------------------------------------------------------- //
function set_anatech_info( on_off )
{
	var ele01 = document.getElementById('ele01');
	var ele02 = document.getElementById('ele02');
	var ele03 = document.getElementById('ele03');
	var ele04 = document.getElementById('ele04');
	var ele05 = document.getElementById('ele05');
	
	if( on_off == 0 ){
		str01 = "";
		str02 = "";
		str03 = "";
		str04 = "";
		str05 = "";
	}
	else{
		str01 = "&nbsp&nbsp&nbspアナテックは";
		str02 = "スラブ・サブマリン電気泳動、";
		str03 = "二次元電気泳動、";
		str04 = "電子冷却恒温槽等";
		str05 = "の専門メーカーです。";
	}
	ele01.innerHTML = str01;
	ele02.innerHTML = str02;
	ele03.innerHTML = str03;
	ele04.innerHTML = str04;
	ele05.innerHTML = str05;
}
// -------------------------------------------------------- //
color_index = 100;
color_direc = 5;
color_order = 1;
// -------------------------------------------------------- //
function change_image_double()
{
	if( color_index >= 200 ){
		color_direc = -5;
		color_index = 200;
	}
	if( color_index <= 100 ){
		color_direc = 5;
		color_index = 100;
	}
	color_index_2 = 100 + ( 200 - color_index );

	// 文字列に変換 //
	_str1 = color_index.toString(16);
	if( 1 >= _str1.length ){		// 強制的に２文字にする IE 対策 //
		_str1 = "0" + _str1;
	}
	_str2 = color_index_2.toString(16);
	if( 1 >= _str2.length ){		// 強制的に２文字にする IE 対策 //
		_str2 = "0" + _str2;
	}
	
	// カラー文字列作成
	// _str = "#" + "ff" + _str + _str;	// 赤
	//_str = "#" + "33" + "66" + _str;	// 緑 <-> 青
	_str1 = "#" + "33" + "99" + _str1;	// 緑 <-> 青
	_str2 = "#" + "33" + "99" + _str2;	// 緑 <-> 青
	
	var element = document.getElementById('two_dim_title_1');
	element.style.backgroundColor = _str1;
	element = document.getElementById('two_dim_title_2');
	element.style.backgroundColor = _str2;

	// ↓ 色の変更は中止
	// setTimeout( "change_image_double()", 300 );
	
	color_index = color_index + color_direc;
}
// -------------------------------------------------------- //
function change_image()
{
	if( color_index >= 200 ){
		color_direc = -5;
		color_index = 200;
	}
	if( color_index <= 100 ){
		color_direc = 5;
		color_index = 100;
	}

	// 文字列に変換 //
	_str = color_index.toString(16);
	// 強制的に２文字にする IE 対策 //
	if( 1 >= _str.length ){
		_str = "0" + _str;
	}
	
	// カラー文字列作成
	// _str = "#" + "ff" + _str + _str;	// 赤
	//_str = "#" + "33" + "66" + _str;	// 緑 <-> 青
	_str = "#" + "33" + "99" + _str;	// 緑 <-> 青
	
	var element = document.getElementById('two_dim_title');
	element.style.backgroundColor = _str;

	setTimeout( "change_image()", 300 );
	
	color_index = color_index + color_direc;
}
// -------------------------------------------------------- //
function change_image_full_color()
{
	if( color_index >= 255 ){
		color_direc = -10;
		color_index = 255;
		color_order = color_order + 1;
	}
	if( color_index <= 0 ){
		color_direc = 10;
		color_index = 0;
		color_order = color_order + 1;
	}
	if( color_order == 7 ){
		color_order = 1;
	}

	// 文字列に変換 //
	_str = color_index.toString(16);
	// 強制的に２文字にする IE 対策 //
	if( 1 >= _str.length ){
		_str = "0" + _str;
	}
	
	// カラー文字列作成
	if( color_order == 1 ){
		_str = "#" + "ff" + _str + "00";		// #ff 00 00 -> #ff ff 00
	}
	else if( color_order == 2 ){
		_str = "#" + _str + "ff" + "00";		// #ff ff 00 -> #00 ff 00
	}
	else if( color_order == 3 ){
		_str = "#" + "00" + "ff" + _str;		// #00 ff 00 -> #00 ff ff
	}
	else if( color_order == 4 ){
		_str = "#" + "00" + _str + "ff";		// #00 ff ff -> #00 00 ff
	}
	else if( color_order == 5 ){
		_str = "#" + _str + "00" + "ff";		// #00 00 ff -> #ff 00 ff
	}
	else if( color_order == 6 ){
		_str = "#" + "ff" + "00" + _str;		// #ff 00 ff -> #ff 00 00
	}
	
	var element = document.getElementById('two_dim_title');
	element.style.backgroundColor = _str;

	setTimeout( "change_image_full_color()", 100 );
	
	color_index = color_index + color_direc;
}
// -------------------------------------------------------- //
function mouse_comment_on( no )
{
	var text     = new Array( "未選択",  "肺",      "精巣",    "腎皮質",  "大脳",    "血清",    "小腸",      "肝臓",    "筋肉" );
	var color    = new Array( "#000000", "#336600", "#336622", "#336644", "#336666", "#336688", "#3366aa",   "#3366cc", "#3366ee" );
	var bk_color = new Array( "#ffffff", "#ccff99", "#ffff99", "#ffffcc", "#ccffff", "#ccffcc", "#ffcccc",   "#ccccff", "#99cccc" );
	var img_name = new Array( "",        "lung",    "energy",  "skin",    "cerebrum", "serum",  "intestine", "liver",   "muscles" );
	
	var image_file_name;
	var element1 = document.getElementById('mouse_comment');

	// イメージ情報 //
	element1.innerHTML = text[no];
	element1.style.color = color[no];
	element1.style.backgroundColor = bk_color[no];

	// イメージファイル //
	image_file_name = "../../img/datasheets/rat/" + img_name[no] + ".jpg";
	var id_str = "pic_" + no;
	var element2 = document.getElementById( id_str );
	element2.src = image_file_name;
}
// -------------------------------------------------------- //
function mouse_comment_off( no )
{
	var img_name = new Array( "", "lung", "energy", "skin", "cerebrum", "serum", "intestine", "liver", "muscles" );

	var image_file_name;
	var element1 = document.getElementById('mouse_comment');

	// イメージ情報 //
	element1.innerHTML = "未選択";
	element1.style.color = "#000000";
	element1.style.backgroundColor = "#ffffff";

	// イメージファイル //
	image_file_name = "../../img/datasheets/rat/" + img_name[no] + "_a.jpg";
	var id_str = "pic_" + no;
	var element2 = document.getElementById( id_str );
	element2.src = image_file_name;
}
// -------------------------------------------------------- //
// dataが1文字なら先頭に embed を追加
function form2byte( data, embed )
{
	if( 1 == data.length ){
		data = embed + data;
	}
	return data;
}
// -------------------------------------------------------- //
function fl3000_func( no )
{
	//alert( "here!!!" );
	
	var ex_str1;
	var ex_str2;
	if( no == 1 ){			ex_str1 = "ﾒﾆｭｰﾊﾞｰ";	ex_str2 = "ファイル操作、環境設定、キャリブレーション、連続ゲル切出しなどの項目があります。";	}
	else if( no == 2 ){		ex_str1 = "ﾂｰﾙ ﾊﾞｰ";	ex_str2 = "ゲル画像を開く、保存など。 BMP( 8bit ｸﾞﾚｰ ),TIFF( 8/16bit ｸﾞﾚｰ ) に対応しています。";	}
	else if( no == 3 ){		ex_str1 = "CCDカメラ"; 	ex_str2 = "CCDカメラとの接続状況を表示します。";	}
	else if( no == 4 ){		ex_str1 = "ﾏｰｶｰｽﾃｰｼﾞ";	ex_str2 = "マーカーステージとの接続状況を表示します。";	}
	else if( no == 5 ){		ex_str1 = "蛍光ﾗﾝﾌﾟ";	ex_str2 = "蛍光用 LED の ON/OFF 及び 接続状況を表示するエリアです。";	}
	else if( no == 6 ){		ex_str1 = "撮影";		ex_str2 = "ゲル撮影、撮影時間、CCDカメラの温度設定などを行うエリアです。";	}
	else if( no == 7 ){		ex_str1 = "画像調整";	ex_str2 = "画像調整 白黒・左右・上下反転、回転( 90, 180, 270°),ノイズ除去等を行うエリアです。";	}
	else if( no == 8 ){		ex_str1 = "ﾎﾟｲﾝﾄ設定";	ex_str2 = "ゲル切出しポイントの設定( 登録・削除 )を行うエリアです。( 最大 100 ポイント )";	}
	else if( no == 9 ){		ex_str1 = "Sampling";	ex_str2 = "指定位置にマーカーステージが移動します。";	}
	else if( no == 10 ){	ex_str1 = "動作モード";	ex_str2 = "現在の動作モードを表示します。";	}
	else if( no == 11 ){	ex_str1 = "Scale";		ex_str2 = "ゲル画像表示エリアにスケールを表示します。";	}
	else if( no == 12 ){	ex_str1 = "Zoom";		ex_str2 = "ゲル画像の拡大・縮小を行います。 ( 最大倍率10倍 )";	}
	else if( no == 13 ){	ex_str1 = "Color";		ex_str2 = "現在のマウス位置の色情報を表示します。";	}
	else if( no == 14 ){	ex_str1 = "Saturation";	ex_str2 = "サチュレーション表示のON/OFF、サチュレーションエリアを赤色で表示します。";	}
	else if( no == 15 ){	ex_str1 = "Popup Menu";	ex_str2 = "右クリックでポップアップメニューが開きます。";	}
	else if( no == 16 ){	ex_str1 = "上空ｳｨﾝﾄﾞｳ";	ex_str2 = "現在表示されている領域が赤枠で表示されます。";	}
	else if( no == 17 ){	ex_str1 = "機能 1";		ex_str2 = "ポイント連続設定機能で速やかにゲル切出しポイントを決めることが出来ます。";	}
	else if( no == 18 ){	ex_str1 = "機能 2";		ex_str2 = "google map のマウス操作性で拡大･縮小・画面移動が行なえます。";	}
	else if( no == 19 ){	ex_str1 = "表示エリア";	ex_str2 = "ゲル画像表示エリアです。";	}
	else{
		ex_str1 = "[ エリア ]";
		ex_str2 = "[ 機能説明 ]";
	}
	// マウスの設定 //
	//if( no == 0 ){
	//	document.body.style.cursor = "default";
	//}
	//else{
	//	document.body.style.cursor = "hand";
	//}

	var bit8 = 256;
	add = ( bit8 / 19 ) * no;
	if( add >= bit8 ){ add = bit8 - 1; }
	add = add | 0;	// 少数 → 整数変換

	var c_red   = 256 + add;
	var c_green = 102 + add;
	var c_blue  = 51  + add;
	if( c_red   >= bit8 ){	c_red   -= bit8;	}
	if( c_green >= bit8 ){	c_green -= bit8;	}
	if( c_blue  >= bit8 ){	c_blue  -= bit8;	}

	var lp_color    = "#" + form2byte( (add).toString( 16 ), "0" ) + form2byte( (add).toString( 16 ), "0" )   + form2byte( (add).toString( 16 ), "0" );
	var lp_bk_color = "#" + form2byte( c_red.toString( 16 ), "0" ) + form2byte( c_green.toString( 16 ), "0" ) + form2byte( c_blue.toString( 16 ), "0" );
	
	// HTML 側の id を取得 //
	var element1 = document.getElementById('fl3000_area');
	var element2 = document.getElementById('fl3000_ex');
	// イメージ情報 //
	element1.style.color 			= "#ffffff";	//lp_color;
	element1.style.backgroundColor 	= lp_bk_color;
	//element1.style.fontSize 		= "12px";
	element1.style.textAlign 		= "center";
	element1.innerHTML				= ex_str1;
	
	element2.style.color 			= "#333333";
	element2.style.backgroundColor 	= "#8ed4ff";
	//element2.style.fontSize 		= "12px";
	element2.innerHTML				= ex_str2;
}
// -------------------------------------------------------- //
function top_menu_change( no, path )
{
	var m_off  = 0;
	var m_item = no % 100;

	if( no > 100 ){
		m_off = 1;
	}
	var img_path = path + "img/normal/";	
	if( m_off == 1 ){
		if( m_item == 1 ){ 		document.getElementById('t_demo').src      = img_path + "t_demo.png";			}
		else if( m_item == 2 ){ document.getElementById('t_lease').src     = img_path + "t_lease.png";			}
		else if( m_item == 3 ){ document.getElementById('t_campaign').src  = img_path + "t_campaign.png";		}
		else if( m_item == 4 ){ document.getElementById('t_company').src   = img_path + "t_company.png";		}
		else if( m_item == 5 ){ document.getElementById('t_recruit').src   = img_path + "t_recruit.png";		}
		else if( m_item == 6 ){ document.getElementById('t_access').src    = img_path + "t_access.png";			}
		else if( m_item == 7 ){ document.getElementById('t_contact').src   = img_path + "t_contact.png";		}
		else if( m_item == 8 ){ document.getElementById('t_datasheet').src = img_path + "t_datasheet.png";		}
		else if( m_item == 9 ){ document.getElementById('t_comment').src   = img_path + "t_comment.png";		}
	}
	else{
		if( m_item == 1 ){ 		document.getElementById('t_demo').src      = img_path + "t_demo_on.png";		}
		else if( m_item == 2 ){ document.getElementById('t_lease').src     = img_path + "t_lease_on.png";		}
		else if( m_item == 3 ){ document.getElementById('t_campaign').src  = img_path + "t_campaign_on.png";	}
		else if( m_item == 4 ){ document.getElementById('t_company').src   = img_path + "t_company_on.png";		}
		else if( m_item == 5 ){ document.getElementById('t_recruit').src   = img_path + "t_recruit_on.png";		}
		else if( m_item == 6 ){ document.getElementById('t_access').src    = img_path + "t_access_on.png";		}
		else if( m_item == 7 ){ document.getElementById('t_contact').src   = img_path + "t_contact_on.png";		}
		else if( m_item == 8 ){ document.getElementById('t_datasheet').src = img_path + "t_datasheet_on.png";	}
		else if( m_item == 9 ){ document.getElementById('t_comment').src   = img_path + "t_comment_on.png";		}
	}
}
// -------------------------------------------------------- //
function top_product_change( no, path, x_pos, from_page )
{
	var m_off  = 0;
	var m_item = no % 100;

	if( no > 100 ){
		m_off = 1;
	}
	var img_path = path + "img/normal/";	
	var element;
	// 表示 OFF //
	if( m_off == 1 ){
		if( m_item == 1 ){
			document.getElementById('t_migration').src = img_path + "tp_migration.png";
			element = document.getElementById('t_migration_thum');
		}
		else if( m_item == 2 ){ 
			document.getElementById('t_coolstat').src  = img_path + "tp_coolstat.png";
			element = document.getElementById('t_coolstat_thum');
		}
		else if( m_item == 3 ){ 
			document.getElementById('t_globe').src     = img_path + "tp_globe.png";
			element = document.getElementById('t_globe_thum');
		}
		else if( m_item == 4 ){ 
			document.getElementById('t_tip').src       = img_path + "tp_tip.png";
			element = document.getElementById('t_tip_thum');
		}
		else if( m_item == 5 ){ 
			document.getElementById('t_mixer').src     = img_path + "tp_mixer.png";
			element = document.getElementById('t_mixer_thum');
		}
		element.style.display = "none";
	}
	// 表示 ON //
	else{
		var left_pos;
		if( m_item == 1 ){
			document.getElementById('t_migration').src = img_path + "tp_migration_on.png";
			element = document.getElementById('t_migration_thum');
			left_pos = -100; // 187 	// ← 左枠に見切れない値
		}
		else if( m_item == 2 ){ 
			document.getElementById('t_coolstat').src  = img_path + "tp_coolstat_on.png";
			element = document.getElementById('t_coolstat_thum');
			left_pos = -183;	// ← (表示イメージ横幅 / 2)
		}
		else if( m_item == 3 ){ 
			document.getElementById('t_globe').src     = img_path + "tp_globe_on.png";
			element = document.getElementById('t_globe_thum');
			left_pos = -187;	// ← (表示イメージ横幅 / 2)
		}
		else if( m_item == 4 ){ 
			document.getElementById('t_tip').src       = img_path + "tp_tip_on.png";
			element = document.getElementById('t_tip_thum');
			left_pos = -172;	// ← (表示イメージ横幅 / 2)
		}
		else if( m_item == 5 ){ 
			document.getElementById('t_mixer').src     = img_path + "tp_mixer_on.png";
			element = document.getElementById('t_mixer_thum');
			left_pos = -200; // -175;	// ← 左枠に見切れない値
		}
		// ------------------ //
		//  マウス位置の取得  //
		// ------------------ //
		var mouse_xy = get_mouse_xy();
		
		// -------------------- //
		//  画像表示位置の調整  //
		// -------------------- //
		element.style.position 	= "absolute";
		element.style.display 	= "block";
		element.style.left 		= left_pos + mouse_xy[0];
		if( from_page == 1 )
			element.style.top 		= -82 + mouse_xy[1];	// indexページ
		else
			element.style.top 		= -45 + mouse_xy[1];	// index以外のページ

		// alert( element.style.left + ", " + element.style.top );
	}
}
// -------------------------------------------------------- //
function top_product_change_2( no, path, img_width, img_height )
{
	var m_off  = 0;
	var m_item = no % 100;

	if( no > 100 ){
		m_off = 1;
	}
	var img_path = path + "img/toppage/";
	var element;
	// 表示 OFF //
	if( m_off == 1 ){
		if( m_item == 1 ){
			document.getElementById('s_migration').src = img_path + "top_migration3.png";
			element = document.getElementById('s_migration_thum');
		}
		else if( m_item == 2 ){ 
			document.getElementById('s_two_migration').src = img_path + "top_cool_phore_star3.png";
			element = document.getElementById('s_two_migration_thum');
		}
		else if( m_item == 3 ){ 
			document.getElementById('s_power').src = img_path + "top_power_supply3.png";
			element = document.getElementById('s_power_thum');
		}
		element.style.display = "none";
	}
	// 表示 ON //
	else{
		var left_pos;
		if( m_item == 1 ){
			document.getElementById('s_migration').src = img_path + "top_migration3_on.png";
			element = document.getElementById('s_migration_thum');
			left_pos = -(img_width / 2);
		}
		else if( m_item == 2 ){ 
			document.getElementById('s_two_migration').src = img_path + "top_cool_phore_star3_on.png";
			element = document.getElementById('s_two_migration_thum');
			left_pos = -(img_width / 2);
		}
		else if( m_item == 3 ){ 
			document.getElementById('s_power').src = img_path + "top_power_supply3_on.png";
			element = document.getElementById('s_power_thum');
			left_pos = -(img_width / 2);
		}
		// ------------------ //
		//  マウス位置の取得  //
		// ------------------ //
		var mouse_xy = get_mouse_xy();

		// -------------------- //
		//  画像表示位置の調整  //
		// -------------------- //
		br_name = getBrowserName();
		element.style.position 	= "absolute";
		element.style.display 	= "block";
		element.style.left 		= left_pos + mouse_xy[0];
		if( "Explorer" != br_name ){
			// マウスの上、センターに表示 //
			element.style.top 		= -(img_height) -60 -82 + mouse_xy[1];	// indexページ
			element.style.zIndex	= "6";
		}
		// IEは z-Index 指定の優先順位は<div>内だけに適用されるので、上段に表示するとメニューに隠れてしまうので、下段に表示する
		else{
			element.style.top 	 = -82 + mouse_xy[1];	// indexページ
			element.style.zIndex = "6";
		}
	}
}
// -------------------------------------------------------- //
function catalog_zoom( no, path, img_width, img_height )
{
	var m_off  = 0;
	var m_item = no % 100;

	if( no > 100 ){
		m_off = 1;
	}
	var img_path = path + "img/normal/";
	var element;
	// 表示 OFF //
	if( m_off == 1 ){
		if( m_item == 1 ){
			element = document.getElementById('c_catalog_thum');
		}
		else if( m_item == 2 ){ 
			element = document.getElementById('c_cool_thum');
		}
		else if( m_item == 3 ){ 
			element = document.getElementById('c_power_thum');
		}
		element.style.display = "none";
	}
	// 表示 ON //
	else{
		var left_pos;
		if( m_item == 1 ){
			element = document.getElementById('c_catalog_thum');
		}
		else if( m_item == 2 ){ 
			element = document.getElementById('c_cool_thum');
		}
		else if( m_item == 3 ){ 
			element = document.getElementById('c_power_thum');
		}
		// ------------------ //
		//  マウス位置の取得  //
		// ------------------ //
		var mouse_xy = get_mouse_xy();

		// -------------------- //
		//  画像表示位置の調整  //
		// -------------------- //
		br_name = getBrowserName();
		element.style.position 	= "absolute";
		element.style.display 	= "block";
		element.style.left 		= mouse_xy[0] - (img_width / 2);
		if( "Explorer" != br_name ){
			// マウスの上、センターに表示 //
			element.style.top 		= mouse_xy[1] - (img_height / 2);	// indexページ
			element.style.zIndex	= "6";
		}
		// IEは z-Index 指定の優先順位は<div>内だけに適用されるので、上段に表示するとメニューに隠れてしまうので、下段に表示する
		else{
			element.style.top 	 = mouse_xy[1] - (img_height / 2);	// indexページ
			element.style.zIndex = "6";
		}
	}
}
// -------------------------------------------------------- //
function get_mouse_xy()
{
	var mouseXY = new Array();
	var browser = getBrowserName();
	if( browser == "Explorer" ){   //  IE判別
    	mouseXY[0] = document.body.scrollLeft + window.event.clientX;
	    mouseXY[1] = document.body.scrollTop  + window.event.clientY;
	}
	else if( browser == "FireFox" ){
	    document.onmousemove = function(e)
	    {
	        x = e.pageX;
	        y = e.pageY;
			// alert( mouseXY[0] + ", " + mouseXY[1] );
	    };
        mouseXY[0] = x;
        mouseXY[1] = y;
	}
	else{
		mouseXY[0] = window.event.pageX;	//pointerX();
	    mouseXY[1] = window.event.pageY;	//pointerY();
	}
	return mouseXY;
}
// -------------------------------------------------------- //

