var arrRet;

function openwindow (url,wtitle,xsize,ysize)
{

var x,y, windowsize;
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

	windowsize = 'left='+x+',top='+y+',width=' + xsize + ', height=' + ysize + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0';
	open_window = window.open(url, wtitle, windowsize );

	if(open_window != null) open_window.focus();
	if(open_window.opener == null ) open_window.opener = window;
}

function modalpopup(url,param,xsize,ysize) {
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

var isXPSPV2 = (navigator.appVersion.indexOf("SV1")) >= 0 ? 1 : 0;
if (isXPSPV2){
ysize = ysize + 20;
}
	windowsize = "dialogHeight:"+ysize+"px; dialogWidth:"+xsize+"px;edge:Raised;center:Yes;scroll:No;help:No;resizable:No;status:No;"
	arrRet = window.showModelessDialog(url,param,windowsize);
	window.status = "";
	//if(arrRet != null) return arrRet;
}



function showModelessResize(url,xsize,ysize,resize) {
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

	windowsize = "dialogHeight:"+ysize+"px; dialogWidth:"+xsize+"px;edge:Raised;center:Yes;scroll:No;help:No;resizable:"+resize+";status: No;"
	var arrRet = window.showModelessDialog(url,"",windowsize);
}

// ½ºÅ©·Ñ µÇ´Â°Å
function openwindow2 (url,wtitle,xsize,ysize) 
{

var x,y, windowsize;
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

	windowsize = 'left='+x+',top='+y+',width=' + xsize + ', height=' + ysize + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0';
	open_window = window.open(url, wtitle, windowsize );

	if(open_window != null) open_window.focus();
	if(open_window.opener == null ) open_window.opener = window;
}

// ¸®»çÀÌÁî µÇ´Â°Å 
function openwindow3 (url,wtitle,xsize,ysize)
{

var x,y, windowsize;
x = Math.round ((screen.width - xsize)/2);
y = Math.round ((screen.height - ysize)/2);

	windowsize = 'left='+x+',top='+y+',width=' + xsize + ', height=' + ysize + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1';
	open_window = window.open(url, wtitle, windowsize );

	if(open_window != null) open_window.focus();
	if(open_window.opener == null ) open_window.opener = window;
}


function formopenwindow (form, url,wtitle,xsize,ysize)
{

	var x,y, windowsize;
	x = Math.round ((screen.width - xsize)/2);
	y = Math.round ((screen.height - ysize)/2);

	windowsize = 'left='+x+',top='+y+',width=' + xsize + ', height=' + ysize + ',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0';
	open_window = window.open('about:blank', wtitle, windowsize );

	form.action = url;
	form.target = wtitle;
	form.submit();

	if(open_window != null) open_window.focus();
	if(open_window.opener == null ) open_window.opener = window;
}
