//***********************
// ¿ÀÇÂÃ¢
//***********************

function COpenWin( )
{
	var hChildWin = null;
	var bGasa       = false;
}


COpenWin.prototype.center = function(ref, title, w, h)
{
	var leftX = (screen.width  - w)/2;
	var topY  = (screen.height - h)/2;

	window.open ( 
		ref, 
		title, 
		'' + 'width=' + w + ',' +  'height=' + h + ',' + 'status=no' + ',' + 'top=' + topY + ',' + 'left=' + leftX + '' 
	);
}


COpenWin.prototype.leftTop = function(ref, title, w, h)
{
	var leftX = 0;
	var topY  = 0;

	window.open ( 
		ref, 
		title, 
		'' + 'width=' + w + ',' +  'height=' + h + ',' + 'status=no' + ',' + 'top=' + topY + ',' + 'left=' + leftX + '' 
	);
}


COpenWin.prototype.leftBottom = function(ref, title, w, h)
{
	var leftX = 0;
	var topY  = screen.height  - h;

	window.open ( 
		ref, 
		title, 
		'' + 'width=' + w + ',' +  'height=' + h + ',' + 'status=no' + ',' + 'top=' + topY + ',' + 'left=' + leftX + '' 
	);
}


COpenWin.prototype.rightTop = function(ref, title, w, h)
{
	var leftX = screen.width  - w;
	var topY  = 0;

	window.open ( 
		ref, 
		title, 
		'' + 'width=' + w + ',' +  'height=' + h + ',' + 'status=no' + ',' + 'top=' + topY + ',' + 'left=' + leftX + '' 
	);
}


COpenWin.prototype.rightBottom = function(ref, title, w, h)
{
	var leftX = screen.width  - w;
	var topY  = screen.height - h;

	window.open ( 
		ref, 
		title, 
		'' + 'width=' + w + ',' +  'height=' + h + ',' + 'status=no' + ',' + 'top=' + topY + ',' + 'left=' + leftX + '' 
	);
}


COpenWin.prototype.checkDuplication = function(obj1, obj2, mode, msg, ref, title, w, h)
{
	if ( !obj1.value ) {
		alert ( msg );
		obj1.focus();
		obj1.select();
		return;
	}	
	
	if ( mode == "sno" ) {
		if ( !obj2.value ) {
			alert ( msg );
			obj2.focus();
			obj2.select();
			return;
		}			
	}
		
	var url = null;	
				
	if ( mode == "sno" ) {
		url = ref + obj1.value + obj2.value;
	}
	else
		url = ref + obj1.value;
		
	var leftX = (screen.width  - w)/2;
	var topY  = (screen.height - h)/2;

	window.open ( 
		url, 
		title, 
		'' + 'width=' + w + ',' +  'height=' + h + ',' + 'status=no' + ',' + 'top=' + topY + ',' + 'left=' + leftX + '' 
	);
}



COpenWin.prototype.closeWin = function( ref )
{
	opener.location = ref;
	self.close();
}


COpenWin.prototype.closeChildWin = function()
{
	hChildWin.close();
}


//###############################
//ÀÌº¥Æ® ¸·°í ¶ç¿ì±â
//###############################
COpenWin.prototype.noeventcenter = function(ref, title, w, h)
{
	var leftX = (screen.width  - w)/2;
	var topY  = (screen.height - h)/2;

	window.showModalDialog ( 
		ref, 
		title, 
		'' + 'dialogWidth=' + w + ';' +  'dialogHeight=' + h + ';' + 'status=no;help:no' + ';' + 'top=' + topY + ';' + 'left=' + leftX + '' 
	);
}









