
/*_______________________________________________

   Copyright (C) 2004 Business Architects Inc.

_________________________________________________*/

function openYKWindow( url, title, options, move ){
var usrWidth = (tinyBA.env.isMac) ? screen.width:screen.availWidth;
var usrHeight =(tinyBA.env.isMac) ? screen.height:screen.availHeight;

var YKInnerWidth = 1014;
var YKInnerHeight = 692;
if(tinyBA.env.isSafari){
	YKInnerWidth = ( YKInnerWidth );
	YKInnerHeight = (YKInnerHeight + 20 );
}


	if(!tinyBA.env.isMac){
		if(( usrWidth > 1023 ) && ( usrHeight > 738 )){
			YKFrameWidth = ( YKInnerWidth + 10 );
			YKFrameHeight = ( YKInnerHeight + 49 );
			YKWinLeft = ( usrWidth / 2 ) - ( YKFrameWidth / 2 );//位置をセンターへ
			YKWinTop = ( usrHeight / 2 ) - ( YKFrameHeight / 2 );//位置をセンターへ
//ここから、Windowのオプション指定
		options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,favorites=no";
		var YKoptions = "width=" + YKInnerWidth + ",height=" + YKInnerHeight + ",left=" + YKWinLeft + ",top=" + YKWinTop + "," + options;
		newWin = window.open( url, title, YKoptions );
		newWin.focus();
		}

//XPノート用
		else if(( usrWidth > 1023 ) && ( usrHeight > 733 ) && tinyBA.env.isWinXP){
			YKFrameWidth = ( YKInnerWidth + 10 );
			//YKFrameHeight = ( 674 + 60 );
			YKFrameHeight = ( 694 + 60 );
			YKWinLeft = ( usrWidth / 2 ) - ( YKFrameWidth / 2 );//位置をセンターへ
			YKWinTop = ( usrHeight / 2 ) - ( YKFrameHeight / 2 );//位置をセンターへ
//ここから、Windowのオプション指定
		options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,favorites=no";
		//var YKoptions = "width=" + YKInnerWidth + ",height=" + 674 + ",left=" + YKWinLeft + ",top=" + YKWinTop + "," + options;
		var YKoptions = "width=" + YKInnerWidth + ",height=" + 694 + ",left=" + YKWinLeft + ",top=" + YKWinTop + "," + options;
			newWin = window.open( url, title, YKoptions );
			newWin.focus();
		}

		else{
		options = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,favorites=no";
		var YKoptions = options;
		newWin = window.open( url, title, YKoptions );
		newWin.focus();
		}

	}

	else if(tinyBA.env.isMac) {
		if(( usrWidth > 1024 ) && ( usrHeight > 768 )){
		YKFrameWidth = ( YKInnerWidth + 8 );
		YKFrameHeight = ( YKInnerHeight + 50 );
		YKWinLeft = ( usrWidth / 2 ) - ( YKInnerWidth / 2 );//位置をセンターへ
		YKWinTop = ( usrHeight / 2 ) - ( YKFrameHeight / 2 );//位置をセンターへ
		options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,favorites=no";
		var YKoptions = "width=" + YKInnerWidth + ",height=" + YKInnerHeight + ",left=" + YKWinLeft + ",top=" + YKWinTop + "," + options;
		newWin = window.open( url, title, YKoptions );
		newWin.focus();
		}

		else if(( usrWidth == 1024 ) && ( usrHeight > 767 )){
		YKFrameWidth = ( YKInnerWidth + 8 );
		YKFrameHeight = ( YKInnerHeight + 50 );
		YKWinLeft = 0;//位置を左上へ
		YKWinTop  = 0;//位置を左上へ
		options = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,favorites=no";
		var YKoptions = "width=" + YKInnerWidth + ",height=" + YKInnerHeight + ",left=" + YKWinLeft + ",top=" + YKWinTop + "," + options;
		newWin = window.open( url, title, YKoptions );
		if(tinyBA.env.isIE){newWin.resizeTo(1014,700);};
		newWin.focus();
		}

		else{
		options = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,favorites=no";
		var YKoptions = options;
		newWin = window.open( url, title, YKoptions );
		newWin.focus();
		}

	}

	else{
		options = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,favorites=no";
		var YKoptions = options;
		newWin = window.open( url, title, YKoptions );
		newWin.focus();
	}
}
