/*
 ex) onlick="csModalAlert('·Î±×ÀÎÀ» ÇØÁÖ¼¼¿ä.','·Î±×ÀÎ ¾È³»','300','200')"

*/
function csModalAlert(msg, winTitle, winWidth, winHeight, winLink, MODALESS)
{

var args = new Array();

if(!msg || 'undefined' == typeof(msg))
  var msg = "¾È³»"

if(!winTitle || 'undefined' == typeof(winTitle))
  var winTitle = "È®ÀÎ"

if(!winWidth || 'undefined' == typeof(winWidth))
  var winWidth = 300;

if(!winHeight || 'undefined' == typeof(winHeight))
  var winHeight = 210;

if(!winLink || 'undefined' == typeof(winLink))
  var winLink = 'ddd();';

args["msg"]       = msg;
args["winTitle"]  = winTitle;
args["winLink"]   = winLink;

var WinDialog = null;

if(!MODALESS || 'undefined' == typeof(MODALESS)){
	WinDialog = window.showModalDialog("/POPUP/ModalPop.asp?title="+winTitle, args,
			  "dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; edge:raised; center:yes; resizable:no; status:no; help:no; scroll:no;");
}
else{
	WinDialog = window.showModelessDialog("/POPUP/ModalPop.asp?title="+winTitle, args,
			  "dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; edge:sunken; center:yes; resizable:no; status:no; help:no; scroll:no;");
}

return WinDialog;
}


//ÆÄÀÏÃ·ºÎ :function fileadd('01','image','2','Recruit','photo')  "ÆÄÀÏ01¹ø[file_01]","ÀÌ¹ÌÁöÅ¸ÀÔ","¾÷ÃÖ´ë¿ë·®","¼­ºêÆú´õ" ,"[html] or [photo],"100[½æ³×ÀÏ°¡·Î]","100[½æ³×ÀÏ¼¼·Î]""
//½æ³×ÀÏÀÌ ÇÊ¿ä¾øÀ» °æ¿ì "" <-- ºó°ª ´ëÀÔ

function Modalfileadd(input,mode, size, folder, flag , width , height) {

	var winWidth = "300";
	var winHeight = "300";
    window.showModalDialog("/Lib/File_Modal_Frm.asp?input="+input+"&mode="+ mode + "&size="+ size +"&folder="+folder+"&flag="+flag+"&width="+width+"&height="+height, this, "dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; center:yes; resizable:no; status:no; help:no; location=no; scroll:no;");

}

function fileadd(input,mode, size, folder, flag , width , height) {
window.open("http://"+input+"&mode="+ mode + "&size="+ size +"&folder="+folder+"&flag="+flag+"&width="+width+"&height="+height,"file_add","left=100, top=100, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=300, height=300");
}

//¸ð´ÞÆË¾÷
function ModalPopup(url,param) {
	var winWidth = "315";
	var winHeight = "215";
    window.showModalDialog(url + param, this, "dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; center:yes; resizable:no; status:no; help:no; location=no; scroll:no;");
}


//ÆÄÀÏ »èÁ¦
function filedel(input,flag) {	

	
	if (window.confirm("Á¤¸» »èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?"))
	{
		strFileName = eval("document.form1.file_"+input).value;

		if(strFileName != '') 
		{
		//	var strData = "&filename="+strFileName;
		//	sendRequest(csDelResult,strData,'GET','/Lib/File_Del_Proc.asp',true,true)	
		}
		else
		{
			alert("»èÁ¦ÇÒ ÆÄÀÏÀÌ ¾ø½À´Ï´Ù");
			return;
		}

		if (flag == "photo")
		{
			eval("document.form1.photo_"+input).src="http://image.garosu.com/house/no_image.gif";
		}
		else
		{
			//eval("html_"+input).innerHTML = "";
		}	
		eval("document.form1.file_"+input).value="";
		eval("document.form1.file_"+input+"_size").value="";
		eval("document.form1.oldfile_"+input).value="";
		eval("document.form1.oldfile_"+input+"_size").value="";
		eval("document.form1.oldthum_file_"+input).value="";
		if (flag != "html")
		{
			eval("document.form1.thum_file_"+input).value="";
		}
	}

}
function csDelResult(oj) {
	
	var res = decodeURIComponent(oj.responseText);

	var returnString = res.split("^");

	alert(res);

}

///////////////////////////////////////////////////////////////////


//ÀÎÁõ¹øÈ£ ¾Ë¸²Ã¢
function csCertify() {

	var winWidth = "300";
	var winHeight = "170";
    window.showModalDialog("/MEMBER/Certify_Alert.asp", this, "dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; center:yes; resizable:no; status:no; help:no; location=no; scroll:no;");


}
