// サイズ指定ウィンドウ表示・スクロールあり

function openwin(page, w, h) {
	sw=screen.availWidth/2-w/2;
	sh=screen.availHeight/2-h/2;
	var new_win=window.open(page,'win','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+w+',height='+h+',top='+sh+',screenY='+sh+',left='+sw+',screenX'+sw);
	new_win.focus();
}



// サイズ指定ウィンドウ表示・スクロール、リサイズなし

function openwin2(page, w, h,winName) {
	sw=screen.availWidth/2-w/2;
	sh=screen.availHeight/2-h/2;
	var new_win=window.open(page,winName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+w+',height='+h+',top='+sh+',screenY='+sh+',left='+sw+',screenX'+sw);
	new_win.focus();
}


// サイズ指定ウィンドウ表示・スクロールなし、リサイズあり

function openwin3(page, w, h,winName) {
	sw=screen.availWidth/2-w/2;
	sh=screen.availHeight/2-h/2;
	var new_win=window.open(page,winName,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,width='+w+',height='+h+',top='+sh+',screenY='+sh+',left='+sw+',screenX'+sw);
	new_win.focus();
}


// ウィンドウ表示・サイズ指定なし
function openwin4(url){
	var new_win=window.open(url,'new_win');
	new_win.focus();
}



function showIsReload(){
	if(confirm('このサイトをお楽しみいただくためには、最新のFlash Playerが必要です。\nもう一度最新のFlash Playerをインストールしますか?')) location.reload();
}


function showTheMainWindow(){
	openwin2('walkmanconnect/main.html',970,689,'walkmanconnect');
}

function showTheMainWindow2(){
	openwin2('../walkmanconnect/main.html',970,689,'walkmanconnect');
}

function showTheMainWindowJam(){
	openwin2('../walkmanconnect/main_jam.html',970,689,'walkmanconnect');
}

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Flash コマンドですべての FSCommand メッセージを処理する
function flash_Aseries_DoFSCommand(command, args) {
	var flash_AseriesObj = isInternetExplorer ? document.all.flash_Aseries : document.flash_Aseries;
	if (command == "showTheMainWindow2") {
		openwin2('../walkmanconnect/main.html',970,689,'walkmanconnect');
	}
}
// Internet Explorer をフックするコード
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub flash_Aseries_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call flash_Aseries_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

function openWindow(theURL) { //v2.0
  window.open(theURL,'sub','width=776,height=550,scrollbars=yes');
}
