// Open a new sub window.
// Ex.
// <A href="../reservation/index.html" target="newWin" onClick="popupWindow('', 'newWin', '490', '400', 'yes', 'yes', 'yes');">新規ウィンドウ</A>

function popupWindow(url,winName,w,h,st,sb,rs) {
	var leftPos = (screen.width) ? (screen.width - w) / 2 : 0;
	var topPos  = (screen.height) ? ((screen.height - h) / 2) - 30 : 0;
	var property = 'width='+w+',height='+h+',left='+leftPos+',top='+topPos+',toolbar=0,location=0,directories=0,menubar=0,status='+st+',scrollbars='+sb+',resizable='+rs;
	if ((_mac && _ns6 || _mac && _ns61) && !((_mac && _ns62) || _moz)) {
		top.location.href = url;
	} else {
		winName = window.open(url,winName,property);
		self.onBlur = winName.focus();
	}
}
