
/* »çÀÌÆ® °ü¸®ÀÚ ¸ðµå - luc_menu1_tbl */
function luc_menu1_insPOP(target , page, width , height)
{	
	var command = 'insert';

    var form = makeForm(command);
    makeHidden(command, 'command',	command);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
} 


function luc_menu1_updPOP(luc_menu1_no, target , page, width , height)
{	
	var command = 'update';

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'luc_menu1_no',	luc_menu1_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}
/* »çÀÌÆ® °ü¸®ÀÚ ¸ðµå - luc_menu1_tbl */ 



/* »çÀÌÆ® °ü¸®ÀÚ ¸ðµå - luc_menu2_tbl */
function luc_menu2_insPOP(target , page, width , height)
{	
	var command = 'insert';

    var form = makeForm(command);
    makeHidden(command, 'command',	command);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}

function luc_menu2_viewPOP(luc_menu2_no, target , page, width , height)
{	
	var command = 'view';

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'luc_menu2_no',	luc_menu2_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}

function luc_menu2_updPOP(luc_menu2_no, target , page, width , height)
{	
	var command = 'update';

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'luc_menu2_no',	luc_menu2_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}
/* »çÀÌÆ® °ü¸®ÀÚ ¸ðµå - luc_menu2_tbl */


/* »çÀÌÆ® °ü¸®ÀÚ ¸ðµå - luc_menu3_tbl */
function luc_menu3_insPOP(target , page, width , height)
{	
	var command = 'insert';

    var form = makeForm(command);
    makeHidden(command, 'command',	command);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}

function luc_menu3_updPOP(luc_menu3_no, target , page, width , height)
{	
	var command = 'update';

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'luc_menu3_no',	luc_menu3_no);
    makeHidden(command, 'getview',		'Y');

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}
/* »çÀÌÆ® °ü¸®ÀÚ ¸ðµå - luc_menu3_tbl */



/* ÆÄÀÏ¾÷·ÎµåÈ­¸é */
function luc_attach_insPOP(command ,newnm_file, oldnm_file, target , page, width , height)
{	
    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'newnm_column',	newnm_file);
    makeHidden(command, 'oldnm_column',	oldnm_file);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}

/* ¾ÆÀÌµð, ´Ð³×ÀÓ Áßº¹Ã¼Å© */
function luc_userinfo_searchPOP(command ,column_name,  target , page, width , height)
{	
    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'column_name',	column_name);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}

/* ¿ìÆí¹øÈ£ Ã£±â */
function luc_zipcode_searchPOP(command ,column_name1, column_name2, target , page, width , height)
{	
    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'column_name1',	column_name1);
    makeHidden(command, 'column_name2',	column_name2);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}


/* ´ÜÁöÀÌ¸§ Áßº¹Ã¼Å© */
function luc_danzinm_searchPOP(command ,column_name,  target , page, width , height)
{	
    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'column_name',	column_name);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}

			
/*´ÜÁö popupÀ¸·Î ¶ç¿ì±â*/		//page_case : 0->ÁÖ¼Ò¿¡º¯¼ö°¡ ¾ø´Â°æ¿ì 1:ÁÖ¼Ò¿¡º¯¼ö°¡ ÀÖ´Â°æ¿ì
function luc_danzi_POP(command ,page_case, luc_danzi_menulst_no, luc_danzi_menulst_page, luc_danzi_menulst_nm, luc_danzi_no, page, target, width , height)
{	
    var form = makeForm(command);
    makeHidden(command, 'command',	    			command);
    makeHidden(command, 'page_case',				page_case);
    makeHidden(command, 'luc_danzi_menulst_no',		luc_danzi_menulst_no);
    makeHidden(command, 'luc_danzi_menulst_page',	luc_danzi_menulst_page);
    makeHidden(command, 'luc_danzi_menulst_nm',		luc_danzi_menulst_nm);
    makeHidden(command, 'luc_danzi_no',				luc_danzi_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}


//#####################################################
var xmlHttp;
var requestType = "";

/*¼­ºê¸ÞÀÎ ÆäÀÌÁö·Î ÀÌµ¿ÇÏ±â */
function funcMovePage(move_menu, luc_menu1_no)
{
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = handleStateChange;
	
	//var form = document.folder_form;
	//form.command.value = move_menu;
	if(move_menu == "move_menu1")
	{

		xmlHttp.open("GET", "../cmn/luc_sub_mainviewxml.php?command="+move_menu+"&luc_menu1_no="+luc_menu1_no, true);
		xmlHttp.send(null);
	}
	else if(move_menu == "move_menu2")
	{

		xmlHttp.open("GET", "../cmn/luc_sub_mainviewxml.php?command="+move_menu+"&luc_menu1_id="+luc_menu1_no, true);
		xmlHttp.send(null);
	}
	else if(move_menu == "bottom_menu")
	{

		xmlHttp.open("GET", "../cmn/luc_sub_mainviewxml.php?command="+move_menu+"&luc_menu1_id="+luc_menu1_no, true);
		xmlHttp.send(null);
	}
	else if(move_menu == "file_cart")
	{
		var url = '../mypage/luc_zzim_list.php';
		window.open(url,"cart","width=500,height=217,titlebar=no,toolbar=no");
		return;
	}
	else if(move_menu == "myfolder")
	{
		form.LuckyFolderCtrl.SetUserInfo('<?=$session_user_id?>',  '<?=$session_password?>');
		form.LuckyFolderCtrl.SetMyFolderOpen();
		return;
	}

	
}



function createXMLHttpRequest() {
	if (window.ActiveXObject) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	} 
	else if (window.XMLHttpRequest) {
		xmlHttp = new XMLHttpRequest();
	}
}
	
//function startRequest(idx) {
function funcMovePage2(move_menu, menu_id, move_page) {

	createXMLHttpRequest();
	xmlHttp.onreadystatechange = handleStateChange;
	//move_menu, menu_id, move_page
	/*
	form.command.value = move_menu;
	form.menu_id.value = menu_id;
	form.move_page.value = move_page;
	*/
	xmlHttp.open("POST", "../cmn/luc_sub_mainviewxml.php?command="+move_menu+"&menu_id="+menu_id+"&move_page="+move_page, true);
	xmlHttp.send(null);
}
	
function handleStateChange() {
  //alert(requestType);
	if(xmlHttp.readyState == 4) {
		if(xmlHttp.status == 200) {
			//alert(xmlHttp.responseText);
			parent.document.location.replace(xmlHttp.responseText);
		}
	}
}

//#####################################################



/* iframe »çÀÌÁî Á¶Á¤ÇÏ±â */
function resizeFrameSpam() 
{ 
    try 
    { 
        var oBody  = document.frames("ifrm").document.body; 
        var oFrame  = document.all("ifrm");        

        if(oBody.readyState != "complete") 
        { 
            setTimeout( "reSize()", 100 ); 
            return; // ¸ðµç °´Ã¼°¡ ¿ÏÀüÈ÷ ·ÎµåµÈ ÈÄ ÇÑ¹ø¸¸ Á¶Á¤ÇÏ±â À§ÇØ 
        }    

        var nMin = 200; 
        oFrame.style.height = nMin;// Á¶Àý Àü ÃÊ±â »çÀÌÁî¸¦ Àâ¾ÆÁÖÁö ¾ÊÀ¸¸é 
                                   // IFRAME ³» ÆäÀÌÁö Refresh ½Ã »çÀÌÁî°¡ °è¼Ó Áõ°¡ÇÒ ¼ö ÀÖ´Ù. 

        var nHeight = oBody.scrollHeight + (oBody.offsetHeight - oBody.clientHeight);      
        if(nHeight < nMin) nHeight = nMin;        

        oFrame.style.height = nHeight; 
    } 
    catch(e) 
    { 
        window.status = 'Error: ' + e.number + '; ' + e.description; 
    } 
} 



function luc_design_sample_insPOP(target , page, width , height)
{	
	var command = 'insert';

    var form = makeForm(command);
    makeHidden(command, 'command',	command);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}


function luc_design_sample_updPOP(luc_danzi_design_sample_no, target , page, width , height)
{	
	var command = 'update';

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'luc_danzi_design_sample_no',	luc_danzi_design_sample_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}



function luc_design_color_updPOP(command, target , page, width , height)
{	

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}


function luc_danzi_msgPOP(command, target , luc_danzi_no,  page, width , height)
{	

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'luc_danzi_no',	luc_danzi_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}



function luc_danzi_memberPOP(user_id, luc_danzi_no, target , page, width , height)
{	
	var command = 'update';

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'user_id',		user_id);
    makeHidden(command, 'luc_danzi_no',	luc_danzi_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}

function luc_danzi_answerPOP(luc_danzi_no, user_id, target , page, width , height)
{
	var command = 'answer_view';

    var form = makeForm(command);
    makeHidden(command, 'command',	   		command);
    makeHidden(command, 'luc_danzi_no',		luc_danzi_no);
    makeHidden(command, 'user_id',			user_id);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}


function luc_danzi_bgm_insPOP(luc_danzi_no, target , page, width , height)
{
	var command = 'insert';

    var form = makeForm(command);
    makeHidden(command, 'command',	   		command);
    makeHidden(command, 'luc_danzi_no',		luc_danzi_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}


function luc_danzi_bgm_updPOP(luc_danzi_no,luc_danzi_bgm_no, target , page, width , height)
{
	var command = 'update';

    var form = makeForm(command);
    makeHidden(command, 'command',	   		command);
    makeHidden(command, 'luc_danzi_no',		luc_danzi_no);
    makeHidden(command, 'luc_danzi_bgm_no',	luc_danzi_bgm_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}


function luc_reportPOP(luc_report_harmer, luc_report_boardno, luc_menu2_no, luc_menu3_no, target , page, width , height)
{
	var command = 'insert';

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'luc_report_harmer',		luc_report_harmer);
    makeHidden(command, 'luc_report_boardno',		luc_report_boardno);
    makeHidden(command, 'luc_menu2_no',				luc_menu2_no);
    makeHidden(command, 'luc_menu3_no',				luc_menu3_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}

function luc_reportPOP1(luc_user_no, luc_report_boardno, luc_menu2_no, luc_menu3_no, target , page, width , height)
{
	var command = 'insert';

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'luc_user_no',				luc_user_no);
    makeHidden(command, 'luc_report_boardno',		luc_report_boardno);
    makeHidden(command, 'luc_menu2_no',				luc_menu2_no);
    makeHidden(command, 'luc_menu3_no',				luc_menu3_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}

function luc_report_ViewPOP(luc_report_no, target , page, width , height)
{
	var command = 'view';

    var form = makeForm(command);
    makeHidden(command, 'luc_report_no',		luc_report_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}


function luc_report_updPOP(luc_report_no, target , page, width , height)
{
	var command = 'update';

    var form = makeForm(command);
    makeHidden(command, 'luc_report_no',		luc_report_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;
}

function luc_pointPOP(luc_report_harmer, luc_point_boardno, luc_menu2_no, luc_menu3_no, target , page, width , height)
{
	var command = 'insert';

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'luc_report_harmer',		luc_report_harmer);
    makeHidden(command, 'luc_point_boardno',		luc_point_boardno);
    makeHidden(command, 'luc_menu2_no',				luc_menu2_no);
    makeHidden(command, 'luc_menu3_no',				luc_menu3_no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}

function luc_folder_viewPOP(no, target , page, width , height)
{
	var command = 'view';

    var form = makeForm(command);
    makeHidden(command, 'no',		no);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;
}


function luc_userinfo_upd01POP(user_id, target , page, width , height)
{
	var command = 'update_info';

    var form = makeForm(command);
    makeHidden(command, 'user_id', user_id);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;
}


function luc_userinfo_upd02POP(user_id, target , page, width , height)
{
	var command = 'update_payment';

    var form = makeForm(command);
    makeHidden(command, 'user_id', user_id);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;
}


function luc_userinfo_certificationPOP(certification, user_id, pwd, target , page, width , height)
{
	var command = 'userinfo_certification';

    var form = makeForm(command);
    makeHidden(command, 'command', command);
    makeHidden(command, 'certification', 'Y');
    makeHidden(command, 'user_id', user_id);
    makeHidden(command, 'password', pwd);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;
}


function luc_charge_freePOP(user_id, target , page, width , height)
{
	if(user_id == "")
	{
		alert("·Î±×ÀÎ ÈÄ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù!");
		return;
	}
	else
	{	
		var command = 'free_charge';
	
	    var form = makeForm(command);
	    makeHidden(command, 'command', command);
	    makeHidden(command, 'UserID', user_id);
	
	    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
	    return;
	}
}


function luc_userinfo_ins01POP(user_id, target , page, width , height)
{
	var command = 'insert_payment';

    var form = makeForm(command);
    makeHidden(command, 'user_id', user_id);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;
}


function luc_pb_open2()
{
	//alert("¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù!");
	///*
	url = "../charge/thiat/point_ok.php";
	//window.open(url,"pb","");
	window.open(url,'pb','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,width=500,height=600,left=300,top=300'); 
	//*/
}

//·°Å°Æú´õ °ü¸®ÀÚ »èÁ¦
/*
function luc_admin_delPOP(command, target , page, width , height)
{	
	var command = command;

    var form = makeForm(command);
    makeHidden(command, 'command',	command);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}
*/

function OpenModalDialog( HtmlFile, vOptions, nWidth, nHeight )
{
    var qResult = window.showModalDialog( HtmlFile, vOptions,
        "dialogwidth:"+nWidth+"px;dialogheight:"+nHeight+"px;toolbar:no;location:no;help:no;directories:no;status:no;menubar:no;scrollbars=no;resizable:no");

    return qResult;
}



function funcUserInfoView(user_id, target , page, width , height)
{	
	var command = 'view';

    var form = makeForm(command);
    makeHidden(command, 'command',	    command);
    makeHidden(command, 'view_user_id',		user_id);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;	
}


function luc_userinfo_downPOP(user_id, target , page, width , height)
{
	var command = 'update_payment';

    var form = makeForm(command);
    makeHidden(command, 'user_id', user_id);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;
}

/*
//ÄÚ¸àÆ® ±âº» ±Û...
function comment_text(formelem) {
	if(formelem.value == 'Å¸ÀÎÀÇ ¸í¿¹¸¦ ÈÑ¼ÕÇÏ°Å³ª °³ÀÎÁ¤º¸¸¦ À¯ÃâÇÏ´Â ±ÛÀÇ °Ô½Ã¸¦ »ï°¡ ÁÖ½Ê½Ã¿À.') {
		formelem.value = '';
	} else if(formelem.value == '') {
		formelem.value = 'Å¸ÀÎÀÇ ¸í¿¹¸¦ ÈÑ¼ÕÇÏ°Å³ª °³ÀÎÁ¤º¸¸¦ À¯ÃâÇÏ´Â ±ÛÀÇ °Ô½Ã¸¦ »ï°¡ ÁÖ½Ê½Ã¿À.';
	}
}
*/


function luc_userinfo_changepwdPOP(user_id, target , page, width , height)
{
	var command = 'change_pwd';

    var form = makeForm(command);
    makeHidden(command, 'command', command);
    makeHidden(command, 'user_id', user_id);

    var pop_win = funcOpenDefaultWindow(form, 'POST', target, page, width, height);
    return;
}

/* ¶óÀÌ³ª»ý¸í ÀÌº¥Æ® Ã¢ ¶ç¿ì±â(2007-06-19 add by mondifoot) */

function luc_paran_eventPOP(Userid)
{
	var command = 'event';
	var page = "http://dbsinb.paran.com/lina/event.asp";
	var width= 900;
	var height= 700;

	var form = makeForm(command);
	makeHidden(command, 'lina'  ,	'237100');
	makeHidden(command, 'Userid',	Userid);
	makeHidden(command, 'rtnURL',	'http://luckyfolder.co.kr/charge/paran_event_return.php');

	var pop_win = funcOpenDefaultWindow(form, 'POST', '_EVENT', page, width, height);
    return;
}

/* ¶óÀÌ³ª»ý¸í ÀÌº¥Æ® Ã¢ ¶ç¿ì±â(2007-06-19 add by mondifoot) */

