function resizeFrame(iframeObj){
	var innerBody = iframeObj.contentWindow.document.body;
  
	var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
	var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
  
	iframeObj.style.height = innerHeight;
	iframeObj.style.width = innerWidth;
}


function autoResizePopup() {
	var winW, winH, sizeToW, sizeToH;

	if ( parseInt(navigator.appVersion) > 3 ) {
		
		if ( navigator.appName=="Netscape" ) {
				winW = window.innerWidth;
				winH = window.innerHeight;
		}
		
		if ( navigator.appName.indexOf("Microsoft") != -1 ) {
				winW = document.body.scrollWidth;
				winH = document.body.scrollHeight;
		}
	}

	sizeToW = 0;
	sizeToH = 0;

	if ( winW > 1024 ) { //768Àº Á¦ÇÑÇÏ°íÀÚ ÇÏ´Â °¡·ÎÅ©±â
		sizeToW = 1024 - document.body.clientWidth;
	} else if ( Math.abs(document.body.clientWidth - winW ) > 3 ) {
		sizeToW = winW - document.body.clientWidth;
	}

	if ( winH > 768 ) {  //768Àº Á¦ÇÑÇÏ°íÀÚ ÇÏ´Â ¼¼·ÎÅ©±â
		szeToH = 768 - document.body.clientHeight;
	} else if ( Math.abs(document.body.clientHeight - winH) > 4 ) {
		sizeToH = winH - document.body.clientHeight;
	}

	if ( sizeToW != 0 || sizeToH != 0 ) {
		window.resizeBy(sizeToW, sizeToH);
	}
}
