/* 

   Last update on 2009.03.19

*/

var vNum = navigator.appVersion.charAt(0);

var bName = navigator.appName.charAt(0);



/* css link */
var css_url;
	if( bName != "M" && vNum < 5 ){
		css_url = "/css/custom_nn4.css";
	} else {
		css_url = "/css/custom.css";
}
document.writeln("<link rel='stylesheet' href='"+css_url+"' type='text/css'>");


/* MOVIE POPUP WINDOW */
function popup(pop_name){
	MOVIE=window.open("/product/pop/pop.php?no="+pop_name,"MOV","status=0,scrollbars=0,resizable=0,menubar=0,width=460,height=545,left=50,top=50");
	MOVIE.focus();
}



/*----- zoom popup area --------------------------------------------------------------------*/

function popup_window(descriptionid, mode){
	path = "index.php?module=Default&action=PopUpWindow&DescriptionID="+descriptionid+"&mode="+mode;
	h = screen.height;

	if(navigator.appName.indexOf("Mic") > -1){
	havail=h-250;
		if(h>1100){
			size="status=0,scrollbars=0,resizable=0,menubar=1,width=610,height=875,left=50,top=50";
		}else{
			size="status=0,scrollbars=1,resizable=0,menubar=1,width=610,height="+havail+",left=30,top=30";
		}
	}
	if(navigator.appName.indexOf("Net") > -1){
		havail=h-200;
		if(h>1100){
			size="status=0,scrollbars=0,resizable=0,menubar=1,width=610,height=895,left=50,top=50";
		}else{
			size="status=0,scrollbars=1,resizable=0,menubar=1,width=610,height="+havail+",left=30,top=30";
		}
	}
	WIN=window.open(path,"MAP",size);
	WIN.focus();
}


/*----- map area --------------------------------------------------------------------*/

function map_win(area){
pass="../company/map_" + area + ".html";
h = screen.height;

if(navigator.appVersion.indexOf("Mac") > -1){

		havail=h-100;
		if(h>1000){size="status=0,scrollbars=0,resizable=0,menubar=1,width=610,height=895,left=50,top=50";}
		else if((h<=1000)&&(h>=940)){size="status=0,scrollbars=0,resizable=0,menubar=1,width=610,height=895,left=30,top=30";}
		else{size="status=1,scrollbars=1,resizable=1,menubar=1,width=610,height="+havail+",left=30,top=30";}
}
else{
	if(navigator.appName.indexOf("Net") > -1){
		havail=h-200;
		if(h>1100){size="status=0,scrollbars=0,resizable=0,menubar=1,width=610,height=895,left=50,top=50";}
		else{size="status=1,scrollbars=1,resizable=1,menubar=1,width=610,height="+havail+",left=30,top=30";}
	}

	else{
		havail=h-250;
		if(h>1100){size="status=0,scrollbars=0,resizable=0,menubar=1,width=610,height=875,left=50,top=50";}
		else{size="status=1,scrollbars=1,resizable=1,menubar=1,width=610,height="+havail+",left=30,top=30";}
	}
}
WIN=window.open(pass,"MAP",size);
WIN.focus();
}

/*----- flash area --------------------------------------------------------------------*/

/* オープニングFlash分岐 */
      if (document.referrer.indexOf("http://www.inami.co.jp/")!=-1){
         skipflash=1;
      }else{
         skipflash=0;
      }
     //alert(skipflash);


/* プラグインチェック */
var MM_contentVersion = 6;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if(plugin){
  var words = navigator.plugins["Shockwave Flash"].description.split(" ");
      for (var i = 0; i < words.length; ++i){
	      if(isNaN(parseInt(words[i])))continue;
	      var MM_PluginVersion = words[i];
      }
  var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}else if(navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0&& (navigator.appVersion.indexOf("Win") != -1)) {
			  document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
			  document.write('on error resume next \n');
			  document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
			  document.write('</SCR' + 'IPT\> \n');
}


/* Flash書き出し */
function flash(filepath,w,h){

filepath+='?skipflash='+skipflash;

if( MM_FlashCanPlay ) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+MM_contentVersion+',0,0,0" width="'+w+'" height="'+h+'" align="top">');
	document.write('<param name="movie" value="'+filepath+'">');
	document.write('<param name="movie" value="'+filepath+'">');
	document.write('<param name="quality" value="best">');
	document.write('<param name="menu" value="false">');
	document.write('<param name="loop" value="false">');
	document.write('<param name="salign" value="LT">');
//	document.write('<param name="Flashvars" value="skipflash='+skipflash+'" >');
	document.write('<param name="bgcolor" value="#FFFFFF">');
	document.write('<embed src="'+filepath+'" width="'+w+'" height="'+h+'" align="top" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/download.cgi?P5_Language=Japanese&Lang=Japanese&P1_Prod_Version=ShockwaveFlash&Lang=Japanese" type="application/x-shockwave-flash"></embed>');
	document.write('</object>');
}else{
    document.write('<img src="topimages/top.jpg" alt="自然と人類社会のインターフェース企業" width="761" height="353" border="0" usemap="#Map">');
    document.write('<map name="Map">');
    document.write('<area shape="rect" coords="16,275,126,340" href="product/innovations.html" alt="Innovationsとは？">');
    document.write('<area shape="rect" coords="128,275,238,340" href="product/index.php?module=Default&action=SearchItem&IsCustom=1" alt="Innovations製品一覧へ">');
    document.write('<area shape="rect" coords="261,47,501,68" href="product/index.php?module=Default&action=SearchItem&CategoryID=1" alt="手術器具">');
    document.write('<area shape="rect" coords="261,68,501,89" href="product/index.php?module=Default&action=SearchItem&CategoryID=2" alt="検査器械">');
    document.write('<area shape="rect" coords="261,89,501,110" href="product/index.php?module=Default&action=SearchItem&CategoryID=3" alt="診療設備">');
    document.write('<area shape="rect" coords="515,47,755,68" href="product/catalog.html" alt="カタログ一覧へ">');
    document.write('<area shape="rect" coords="261,283,501,304" href="product/index.php?module=Default&action=SearchItem&SyoureiID=1" alt="白内障">');
    document.write('<area shape="rect" coords="261,304,501,325" href="product/index.php?module=Default&action=SearchItem&SyoureiID=2" alt="網膜・硝子体">');
    document.write('<area shape="rect" coords="261,325,501,346" href="product/index.php?module=Default&action=SearchItem&SyoureiID=3" alt="緑内障">');
    document.write('<area shape="rect" coords="515,283,755,304" href="contact/" alt="お問い合わせのご案内">');
    document.write('</map>');
}
}
/*-------------------------------------------------------------------------------------*/



/*----- popup on class --------------------------------------------------------------------*/

window.onload = function (){
	var node_a = document.getElementsByTagName('a');
		for (var i in node_a) {
			if(node_a[i].className == 'popup'){
				node_a[i].onclick = function() {
					return winOpen(this.href, this.rel)
				};
			}
		}
} ;

function winOpen(url, rel) {
	var split = rel.split(',') ;
	window.open(
	url,'popup',
	'width='+ split[0] +',height='+ split[1] +',toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes');

	return false;
};

