//ポップアップウインドウから親ウインドウに表示させるスクリプト
//例：loadToopener('/index.html')
function is_opener() {
	var ua = navigator.userAgent
	if(!!window.opener)
	if( ua.indexOf('MSIE 4')!=-1 && ua.indexOf('Win')!=-1) return !window.opener.closed;
	else return typeof window.opener.document  == 'object';
	else return false;
}
function loadToopener(url){
	if(is_opener()){
		window.opener.location.href=url;
	}else{
		win_set = 'directories=yes,status=yes,scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,location=yes';
		storeWin= window.open(url,'New',win_set);
	}
}


//1.　ツールバー等の有る無しを調整できるウインドウオープン　------------------------
//例：openwin1('index.html','HOME',200,300,0,0,0)
//toolbar：ツールバーの有る無し
//resizable：サイズの変更有る無し
//scrollbars：スクロールバーの有る無し

function openwin1(url,wname,w,h,toolbar,resizable,scrollbars){
	win_set = 'width=' + w;
	win_set += ',height=' + h;
	win_set += ',toolbar='+ toolbar;
	win_set += ',resizable='+ resizable;
	win_set += ',menubar=no';
	win_set += ',scrollbars='+ scrollbars;

	swin = window.open(url,wname,win_set);
}

//2.　何も調整できないウインドウオープン　-----------------------
function openwin2(url,wname,w,h){
	win_set = 'width=' + w;
	win_set += ',height=' + h;
	swin = window.open(url,wname,win_set);
}
