<!--

//-------------------------check browser
var myBrowser;
if(navigator.platform){
	myBrowser=new myBrowser((document.getElementById != null),(navigator.platform.indexOf('Win32') != -1),(navigator.appName.indexOf('Microsoft') != -1));
}
function myBrowser(version,platform,type){
	this.version=version;	//trueかfalse,DOM使用可能ブラウザ(IE4以上,NN6以上)ならtrue
	this.platform=platform;	//trueかfalse,Win32ならtrue
	this.type=type;		//trueかfalse,IEならtrue
}
//-------------------------check browser



//-------------------------check flash plugin6
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'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
//-------------------------check flash plugin6




//-----------------top_1.swfのWhat'sNew画像クリックで呼び出されるファンクションです。
//-----------------location.href に飛び先のURL。
//-----------------全画面フラッシュがある場合は、open_full_scrの分岐条件にある箇所を訂正します。
function go_whatsnew(){
	location.href = "products/002/index.html";
	open_full_scr('002');
}


//--------------モニタ解像度に合わせてフルスクリーンでウィンドウを開きます。
function open_full_scr(products_num, open_from){
	//alert('MM_FlashCanPlay > ' + MM_FlashCanPlay);

	if ( MM_FlashCanPlay ) {//--plugin YES
		window_open_flag = 0;
	
		if(open_from == 'html'){
			var myUrl = products_num;
			window_open_flag = 1;

		}else{
			//top_1.swfからリンク
			if(products_num == 'null'){
				//var myUrl = "products/010/index_fla.html";
				//window_open_flag = 1;
			
			}//top_2.swfからリンク
			else if( (products_num == '005') || (products_num == 'receiver') ){//ウィンドウを開かないプロダクトナンバーを記述。
				var myurl_html = "products/" + products_num + "/index.html";
				location.href = myurl_html;
			
				//ウィンドウを開きません。
				window_open_flag = 0;

			}else{
				if(open_from == 'all_html'){//protucts トップページから全画面フラッシュを開く
					var myUrl = products_num;
					window_open_flag = 1;

				}else{
					var myurl_html = "products/" + products_num + "/index.html";
					location.href = myurl_html;
			
					var myUrl = "products/" + products_num + "/index_fla.html";
					window_open_flag = 1;
				}
			}
		}
	
		if(window_open_flag == 1){//---action from here.
			if(myBrowser.type){ //IEの場合
				if(myBrowser.platform){ //WIN IEの場合
					var thisWinWidth=screen.width;
					var thisWinHeight=screen.availHeight;
					newwin=window.open(myUrl,"_blank","scrollbars=0,resizable=no,location=no,menubar=no,status=no,left=0,top=0");
					newwin.resizeTo(thisWinWidth,thisWinHeight);
				}
				else{ //Mac IEの場合
					var thisWinWidth=screen.width;
					var thisWinHeight=screen.availHeight-23;
					newwin=window.open(myUrl,"_blank","scrollbars=0,resizable=no,location=no,menubar=no,status=no,left=0,top=0");
					newwin.resizeTo(thisWinWidth,thisWinHeight);
				}
			}
			else{
				if( navigator.userAgent.indexOf("Safari") != -1){
					//Safari
					var thisWinWidth=screen.width;
					var thisWinHeight=screen.height-46;
					window_size = "width=" + thisWinWidth + ",height=" + thisWinHeight +",innerWidth=" + thisWinWidth + ",innerHeight=" + thisWinHeight;
					newwin=window.open(myUrl,"_blank","scrollbars=0,resizable=no,location=no,menubar=no,status=no," + window_size);
					newwin.moveTo(0,0);
				}else{
					//NS
					var thisWinWidth=screen.availWidth-12;
					var thisWinHeight=screen.availHeight-30;
					window_size = "width=" + thisWinWidth + ",height=" + thisWinHeight +",innerWidth=" + thisWinWidth + ",innerHeight=" + thisWinHeight;
					newwin=window.open(myUrl,"_blank","scrollbars=0,resizable=no,location=no,menubar=no,status=no," + window_size);
					newwin.moveTo(0,0);
				}
			}
		}

	}
	else{//--plugin NO
		window_open_flag = 0;

		if(open_from == 'all_html'){
			//productsディレクトリ以下、全ての商品が表示されているときのエラーページのURL
			open_popup_window('../products/fla_error.html', 480, 480, 0);
		}
		else if(open_from == 'html'){
			//各productsからの単独リンクのエラーページのURL
			open_popup_window('../fla_error.html', 480, 480, 0);
		}

	}

}



//--------------モニタ解像度に合わせてフラッシュを埋め込みます。1024*768以下のモニタは、縮小。
function writeFlashTags(product){

	var my_flashvars = 'product_num=' + product;

	document.write('<table border=0 cellspacing=0 cellpadding=0 width=100% height=100%><tr><td align=center valign=middle>');
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"');
	
	if((screen.width >= 1024) && (screen.height >= 768)){
		document.write(' WIDTH="1014" HEIGHT="706" id="product" ALIGN="">');
		document.write(' <PARAM NAME=movie VALUE="../product.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <PARAM NAME=FlashVars VALUE="' + my_flashvars + '"> <EMBED src="../product.swf" quality=high bgcolor=#000000  WIDTH="1014" HEIGHT="706" NAME="product" ALIGN="" FlashVars="' + my_flashvars + '"');
	}else{
		document.write(' WIDTH="100%" HEIGHT="100%" id="product" ALIGN="">');
		document.write(' <PARAM NAME=movie VALUE="../product.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#000000> <PARAM NAME=FlashVars VALUE="' + my_flashvars + '"> <EMBED src="../product.swf" quality=high bgcolor=#000000  WIDTH="100%" HEIGHT="100%" NAME="product" ALIGN="" FlashVars="' + my_flashvars + '"');
	}
	
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.write('</OBJECT>');
	document.write('</td></tr></table>');

}



//--------------プロダクトSWFを開きます。
function open_popup_window(url, w, h, scrollbars){
	var url = url;
	if(scrollbars == 1){
		win = window.open(url, '_blank', 'width=' + w + ',height=' + h + ',scrollbars=1' );
		win.focus();
		
	}else{
		if( navigator.userAgent.indexOf("Safari") != -1){
			//Safari
			var x = screen.width/2 - w/2;
			var y = screen.height/2 - h/2;
		}else{
			var x = screen.width/2 - w/2;
			var y = screen.height/2 - h/2 - 20;
		}
		win = window.open(url,'_blank','left='+x+',top='+y+',width='+w+',height='+h+',toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0');
		win.focus();
		
	}
}

function subwindow_focus(target_win){
	target_win.focus();
}

function close_win(){
	window.close();
}

//-->
