

//---------------------------------------------------------------------------------------------
//openwin4
//
//位置指定_有り スクロール有り時のos,ブラウザ別windowサイズ補正　位置中央
//操作のしかたで使用
//
//---------------------------------------------------------------------------------------------

function openwin4(file,name,h,w) {//位置指定_センター
	
	sw=screen.availWidth/2-w/2;
	sh=screen.availHeight/2-h/2
 	//h=screen.height

	
	mac = (navigator.appVersion.indexOf("Mac") != -1) ?true:false;
	ie = (navigator.appName.charAt(0) == "M") ?true:false;
	nn = (navigator.appName.charAt(0) == "N") ?true:false;
	
	if (mac){
		if (ie){
		// mac IE
		w+=1;
		h-=30;
		}
		
		else{
		// mac NN etc.
		w+=1;
		h-=130;
		}
	}
	else{
		if (ie){
		// win IE
		w+=17;
		h-=130;
		}
		else{
		// win NN etc.
		w+=16;
		h-=130;
		}
	}



newWin4= window.open(file,name,"height="+h+",width="+w+",top="+sh+",screenY="+sh+",left="+sw+",screenX="+sw+",toolbar=1,location=1,directories=0,status=1,menubar=1,scrollbars=1,resizable=1");
document.MM_returnValue = false;
newWin4.focus()
}

