// サブウィンドウの大きさと開く位置の指定
//l = 60; // 表示するx座標
//t = 30; // 表示するy座標
var w = (screen.width)*0.9;//950; // 横幅
var h = (screen.height)*0.9;//600; // 縦幅
var previousUrl;
var strUrl;
var popupWindow = null; // グローバル変数
function openebock(strUrl) {
  if(popupWindow == null || popupWindow.closed)
	 {
  x = (screen.width - w) / 2;
  y = (screen.height - h) / 2;
  popupWindow = window.open(strUrl,"popupWindow",
    "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width="+w+",height="+h+",menubar=no,scrollbars=no,toolbar=no,location=no,status=no,resizable=yes");
  /*初めて開く場合popupWindowを開く*/
  }
  else if(PreviousUrl != strUrl)
  {
  x = (screen.width - w) / 2;
  y = (screen.height - h) / 2;
  popupWindow = window.open(strUrl,"popupWindow",
    "screenX="+x+",screenY="+y+",left="+x+",top="+y+",width="+w+",height="+h+",menubar=no,scrollbars=no,toolbar=no,location=no,status=no,resizable=yes");
    popupWindow.focus();
	/*開いているpopupWindowに別のページを読み込み*/
  }
  else
  {
    popupWindow.focus();
	/*同じURLの場合最前面表示*/
  };
    PreviousUrl = strUrl;
}


