function popwindow(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	
	var left	= (screen.availWidth - width) /2; 
	var top	= (screen.availHeight - height) /2; 

	
	window.open(url,"","status=no,toolbar=0,menubar=0,scrollbars=no,resizable=no,top="+top+",left="+left+",width=" + wd +",height=" + he + ";")
}

function popwindow2(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	
	window.open(url,"","status=no,toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";")
}


//¾ÆÀÌÇÁ·¹ÀÓ Á¶Àý
var ifrContentsTimer; 
function initResize() {

	resizeFrame();
	
	ifrContentsTimer = setInterval('resizeRetry()',500);
	self.focus();
}

function resizeRetry() { //ÀÌ¹ÌÁö°°ÀÌ ·Îµù½Ã°£ÀÌ °É¸®´Â °ÍµéÀÌ ·ÎµùµÈÈÄ ´Ù½Ã ÇÑ¹ø ¸®»çÀÌÁî
	
	if(document.body.readyState == "complete") { 
		clearInterval(ifrContentsTimer); 
	}else { 
		resizeFrame(); 
	} 
}

function resizeFrame(){ //ÆäÀÌÁö°¡ ·ÎµùµÇ¸é ¹Ù·Î ¸®»çÀÌÁî..
	try{
		self.resizeTo(document.body.scrollWidth + (document.body.offsetWidth-document.body.clientWidth), parseInt(document.body.scrollHeight)+10); 
	}
	catch (e) {}
} 

//¾ÆÀÌÇÁ·¹ÀÓ Á¶Àý
var txtObj;
var tarDocu;
var tarIframe;
var ifWidth	 = 0;
var ifHeight	 = 0;
var maxWidth		= 0;
var maxHeight		= 0;
var ifrContentsTimer2; 
function initResizeIF( ifName, width, height ) {

	if ( width != undefined ) {
		maxWidth	= width;
	}
	if ( height != undefined ) {
		maxHeight	= height;
	}

	tarDocu		= eval( "self.document.frames['"+ifName+"']" );
	tarIframe	= eval( "self.document.all['"+ifName+"']" );

	resizeFrame2();

	ifrContentsTimer2 = setInterval('resizeRetry2()' , 500);
	self.focus();
}

function resizeRetry2() { //ÀÌ¹ÌÁö°°ÀÌ ·Îµù½Ã°£ÀÌ °É¸®´Â °ÍµéÀÌ ·ÎµùµÈÈÄ ´Ù½Ã ÇÑ¹ø ¸®»çÀÌÁî

	if(tarIframe.document.body.readyState == "complete") { 
		clearInterval(ifrContentsTimer2); 
	}else { 
		resizeFrame2(); 
	} 
	
}

function resizeFrame2(){ //ÆäÀÌÁö°¡ ·ÎµùµÇ¸é ¹Ù·Î ¸®»çÀÌÁî..
	try{
		ifWidth	= new Number(tarDocu.document.body.scrollWidth + (tarDocu.document.body.offsetWidth-tarDocu.document.body.clientWidth));
		ifHeight	= new Number(tarDocu.document.body.scrollHeight +27);

		if ( (maxWidth > 0) && ( maxWidth < ifWidth ) ) {
			tarIframe.width	=	maxWidth;
		} else {
			tarIframe.width	=	ifWidth;
		}
		if ( (maxHeight > 0) && ( maxHeight < ifHeight ) ) {
			tarIframe.height	=	maxHeight;
		} else {
			tarIframe.height	=	ifHeight;
		}
	}
	catch (e) {}
} 
