
// popup open	(°¡¿îµ¥ Á¤·Ä)
function popup_open(url, wname, w, h, scbar){
	var top = (screen.availHeight-h)/2;
	var left = (screen.availWidth-w)/2;

	var prty = "top="+top+", left="+left+", width="+w+", height="+h+", status=0, resizable=0, scrollbars="+scbar;
	window.open(url, wname, prty);
}
function popup_newopen(purl, wname){
	var prty = "top=0 , left=0";
	window.open(purl, wname);
}


// popup open	( Á¤·Ä ¿É¼Ç Ãß°¡ ¹öÀü)
function popup_open_align(url, wname, w, h, scbar, align){
	// align(1: ¿ÞÂÊÀ§, 2:¿À¸¥ÂÊÀ§, 3:¿À¸¥ÂÊ¹Ø, 4:¿ÞÂÊ¹Ø, 5:Á¤Áß¾Ó
	
	var top;
	var left;

	switch (eval(align)){
		case 1:
			top = 0;
			left = 0;
			break;
		case 2:
			top = 0;
			left = (screen.availWidth-w);
			break;
		case 3:
			top = (screen.availHeight-h);
			left = (screen.availWidth-w);
			break;
		case 4:
			top = (screen.availHeight-h);
			left = 0;
			break;
		case 5:
			top = (screen.availHeight-h)/2;
			left = (screen.availWidth-w)/2;
			break;
	}

	var prty = "top="+top+", left="+left+", width="+w+", height="+h+", status=0, resizable=0, scrollbars="+scbar;
	window.open(url, wname, prty);
}

//modalÃ¢ resize
function modWin_resize(winType){
	//winType=0	(½ºÅ©·Ñ¹Ù ¾øÀ½)
	//winType=1	(½ºÅ©·Ñ¹Ù ÀÖÀ½)
//	var w = document.body.scrollWidth+8+"px";
//	var h = document.body.scrollHeight+34+"px";
	window.dialogWidth = (winType==0)?document.body.scrollWidth+5+"px":document.body.scrollWidth+25+"px";
	window.dialogHeight = (winType==0)?document.body.scrollHeight+24+"px":window.dialogHeight;

}


//modalÃ¢ resize
function modWin_resize2(winType){
	//winType=0	(½ºÅ©·Ñ¹Ù ¾øÀ½)
	//winType=1	(½ºÅ©·Ñ¹Ù ÀÖÀ½)
//	var w = document.body.scrollWidth+8+"px";
	var h = document.body.scrollHeight+34+"px";
//	window.dialogWidth = (winType==0)?document.body.scrollWidth+8+"px":document.body.scrollWidth+25+"px";
	window.dialogHeight = (winType==0)?document.body.scrollHeight+34+"px":window.dialogHeight;

}

//popupÃ¢ resize
function popWin_resize(winType){
	//winType=0	(½ºÅ©·Ñ¹Ù ¾øÀ½)
	//winType=1	(½ºÅ©·Ñ¹Ù ÀÖÀ½)
	var w = (winType==0)?document.body.scrollWidth+2:document.body.scrollWidth+28;
	var h = (winType==0)?document.body.scrollHeight+50:document.body.offsetHeight;
	window.resizeTo (w, h)

}


//popupÃ¢ resize
function popWin_resize2(winType){
	//winType=0	(½ºÅ©·Ñ¹Ù ¾øÀ½)
	//winType=1	(½ºÅ©·Ñ¹Ù ÀÖÀ½)
/*
	var w = (winType==0)?document.body.scrollWidth+2:document.body.scrollWidth+28;
	var h = (winType==0)?document.body.scrollHeight+50:document.body.offsetHeight;
	window.resizeTo (w, h)
*/
	var w, h;
	var strAppVer = navigator.appVersion;

	if (strAppVer.indexOf("NT 5.2")>0 && strAppVer.indexOf("MSIE 6.0")>0){
		w = document.body.scrollWidth+27;
		h = document.body.scrollHeight+50;
	}else if (strAppVer.indexOf("NT 5.1")>0 && strAppVer.indexOf("MSIE 7.0")>0){
		w = document.body.scrollWidth+27;
		h = document.body.scrollHeight+70;
	}else if (strAppVer.indexOf("NT 5.1")>0 && strAppVer.indexOf("MSIE 6.0")>0){
		w = document.body.scrollWidth+27;
		h = document.body.scrollHeight+60;
	}else if (strAppVer.indexOf("NT 5.0")>0 && strAppVer.indexOf("MSIE 7.0")>0){
		w = document.body.scrollWidth+27;
		h = document.body.scrollHeight+70;
	}else if (strAppVer.indexOf("NT 5.0")>0 && strAppVer.indexOf("MSIE 6.0")>0){
		w = document.body.scrollWidth+27;
		h = document.body.scrollHeight+30;
	}else{
		w = document.body.scrollWidth+28;
		h = document.body.offsetHeight;
	}

	window.resizeTo (w, h)
}


//+++++++++++++++++++++++++++++++++++++++++++++
//¸ð´Þ¸®½º ¿ÀÇÂ
function modeless_open(url, w, h){	//½ºÅ©·Ñ ¾øÀ½
	window.showModelessDialog(url, window, "dialogWidth:"+w+"px; dialogHeight:"+h+"px; center: Yes; help: No; resizable: Yes; status: No; scroll:0;");
}

function modeless_open2(url, w, h){//½ºÅ©·Ñ ÀÖÀ½
	window.showModelessDialog(url, window, "dialogWidth:"+w+"px; dialogHeight:"+h+"px; center: Yes; help: No; resizable: Yes; status: No;");
}

//¸ð´ÞÃ¢ ¿ÀÇÂ
function modal_open(url, w, h){
	window.showModalDialog(url, window, "dialogWidth:"+w+"px; dialogHeight:"+h+"px; center: Yes; help: No; resizable: Yes; status: No; scroll:0;");
}

//¸ð´ÞÃ¢ ¿ÀÇÂ
function modal_open2(url, w, h){
	window.showModalDialog(url, window, "dialogWidth:"+w+"px; dialogHeight:"+h+"px; center: Yes; help: No; resizable: Yes; status: No;");
}

//¸ð´ÞÃ¢ À§Ä¡ Áß¾ÓÀ¸·Î..
function modal_relocate(){
	var Lleft = (screen.availWidth-self.dialogWidth.replace("px", ""))/2;
	var Ltop = (screen.availHeight-self.dialogHeight.replace("px", ""))/2;
	self.dialogTop = Ltop;
	self.dialogLeft = Lleft;
}


//object popup open
function oPopup_show(oElement, x, y, w, h, strContent){
	var oPopup = window.createPopup();
	var popBody = oPopup.document.body;

//    popBody.style.borderColor = "#0164B0";
	popBody.style.border = "solid #0164B0 1px";
	popBody.style.fontFamily = "µ¸¿ò";
	popBody.style.fontSize = "12px";
	popBody.style.color = "#474747";

	popBody.innerHTML = strContent; 
	oPopup.show(x, y, w, h, oElement);
}
//---------------------------------------------

