
function WinOpen(url){
	//var t = window.screenTop;
	//var l = window.screenLeft;
	var sh = screen.height;
	var h = sh * 0.8; // 80% デフォルトサイズ
	//var h = $(window).height();

	var param =  "width=700" + 
                     ",height=" + h + 
                     //",top=" + t + 
                     //",left=" + l + 
                     ",scrollbars=yes" +
                     ",resizable=yes" +
                     ",status=yes";

	newwin = window.open(url, "window", param);
	if (newwin) {
	        addEvent(
			newwin,
			"load",
			function(){
				newwin.opener.callBack(newwin);
			}
		);
		newwin.focus();
	}
}


function WinOpen2(url){
	newwin = window.open(url, "popupwindow", "width=1024,height=600,scrollbars=yes,resizable=yes,status=yes");
	newwin.focus();
}

function WinOpen3(url, window_name) {
	//var w = $(window).width();
	//var w = 1024;
	//var h = $(window).height();
	var sw = screen.width;
	var w = sw * 1.0;
	var sh = screen.height;
	var h = sh * 1.0;

	var n = "nk_popupwindow3";
	if (window_name) {
		n = window_name;
	}

	var param = "width=" + w + 
                    ",height=" + h + 
                    ",menubar=no" +
                    ",toolbar=no" +
                    ",location=no" +
                    ",status=no" +
                    ",resizable=yes" +
                    ",scrollbars=yes";
	pop3 = window.open(url, n, param);
	if (pop3) {
		pop3.focus();
	}
}

function callBack(child) {
}

/*
// 告知ページ自動表示の処理
if (document.URL.indexOf("/ebook/top.html") >= 0) {

	// 代替メソッド
	var closelink = new Function("url", 'location.href = url;');

	$(document).ready(function(){

		//$('<link rel="stylesheet" type="text/css" href="/newebook/ebookstart_files/screen.css" >').appendTo("head");

		// IE6 の場合はスクロールを無効にする
		if (isIE6) {
			$("body","html").css({
				"height": "100%", 
				"width": "100%"
			});
			$("html").css("overflow","hidden");
		}

		if (!obScreen) {
			obScreen = document.createElement("div");
			obScreen.id = SCREEN_ID;
			$("body").append(obScreen);
		}

		$("body").append('<div id="triqui_ad"></div>');

		$.ajaxSetup({cache:false});
		$('#triqui_ad').wrap('<div id="triqui_container"></div>');

		$('#triqui_ad').load('/newebook/ebookstart.html #ebookstartwrapper',function(){

			//閉じるボタンを削除
			$('#buttonarea').remove();

			$('#triqui_ad').css('height',$(window).height() * 0.85);
			$('#triqui_ad').css('width','800px');
			$('#triqui_ad').css('overflow','auto');

			$('#triqui_container').css('background-color','#DDDDDD');
			$('#triqui_container').css('border','ridge 3px #D0C0C0');
			if ( isIE6 ) { //modify by d-yoshino
				$('#triqui_container').css('position','absolute');
			} else {
				$('#triqui_container').css('position','fixed');
			}
			$('#triqui_container').css('top','50%');
			$('#triqui_container').css('padding','3px');
			$('#triqui_container').css('z-index','102');
			$('#triqui_container').css('left','50%');
			$('#triqui_container').css('margin-left','-400px');

			$('#triqui_container').hide().slideDown('slow');

			var formHeight = $('#triqui_container')[0].offsetHeight;
			var setHeight = "";
			if (isIE6) {
				var srl = getScrollPosition();
				setHeight = (srl.y - Math.floor(formHeight / 2)) + "px";
			} else {
				setHeight = "-" + Math.floor(formHeight / 2) + "px";
			}
			$('#triqui_container').css('top', setHeight);
			$('#triqui_container').css('visibility', 'visible');


			//ie6はabsoluteなのでfixedしてるように見せる。 add by d-yoshino
//			if(isIE6){
//				var formHeight = $('#triqui_ad')[0].offsetHeight;
//				var srl = getScrollPosition();
//				setHeight = (srl.y - Math.floor(formHeight / 2)) + "px";
//			    $(window).scroll(function(){
//					$("#triqui_container").css('top',($(document).scrollTop()+$(window).height()/15) +"px")
//			    })
//			}

			// 背景部にクリックイベントを付加する
			$(obScreen).click(function() {
	   			$('#triqui_container').slideUp('slow');

				$(obScreen).unbind("click");
				$(obScreen).remove();
				obScreen = null;
		
				$('#triqui_container').remove();
			
				// IE6 の場合はスクロールを有効にする
				if (isIE6) {
					$("body","html").css({
						"height": "auto",
					 	"width": "auto"
					});
					$("html").css("overflow","");
				}

			});

		}).before('<div id="triqui_ad_close_area"><a href="javascript:void(0)" id="triqui_ad_close"><img id="triqui_ad_close_img" src="/common/images/login_btn_close.gif" alt="閉じる"/></a></div>');

		$('#triqui_ad_close_area').css('text-align','right');
		
		//$('#triqui_ad_close_area').css('position','absolute');
		//$('#triqui_ad_close').css('margin-left','auto');
		//$('#triqui_ad_close').css('margin-right','0');
		//$('#triqui_ad_close').css('text-align','left');
		

		$('#triqui_ad_close').click(function(){

   			$('#triqui_container').slideUp('slow');

			$(obScreen).unbind("click");
			$(obScreen).remove();
			obScreen = null;

			$('#triqui_container').remove();
			
			
			// IE6 の場合はスクロールを有効にする
			if (isIE6) {
				$("body","html").css({
					"height": "auto",
				 	"width": "auto"
				});
				$("html").css("overflow","");
			}

  		});

		window.onresize = function() {
			$('#triqui_ad').css('height',$(window).height() * 0.85);
		};
	});


}
*/

