
//스킨변경
function skin_c01(name,bgimg,height) {
	document.getElementById(name).style.backgroundImage= bgimg;
	document.getElementById(name).style.height= height;
}

function skin_c02(name,padding,align) {
	document.getElementById(name).style.padding= padding;
	document.getElementById(name).style.textAlign= align;
}

function skin_c03(name,color) {
	document.getElementById(name).style.color= color;
}

function skin_c04(name,padding,width) {
	document.getElementById(name).style.padding= padding;
	document.getElementById(name).style.width= width;
}




//저장
function confw_chk(){ 
	
	
	if (CheckSpaces(document.getElementById('frm').nsc_name, '보내는 사람')) { return false; }


	else if (CheckSpaces(document.getElementById('frm').nsc_email, '보내는 사람 이메일')) { return false; }

	//else {document.getElementById('frm').submit(); }

	loading_st(1);

}

//저장
function mw_chk(){
	
	
	if (CheckSpaces(document.getElementById('frm').nsm_name, '이름')) { return false; }


	else if (CheckSpaces(document.getElementById('frm').nsm_email, '이메일')) { return false; }

	//else {document.getElementById('frm').submit(); }

	loading_st(1);

}

//저장
function w_chk(){
	
	
	if (CheckSpaces(document.getElementById('frm').nsl_subject, '제목')) { return false; }


	//else if (CheckSpaces(document.getElementById('frm').sc_sitename_en, '영문명')) { return false; }

	//else {document.getElementById('frm').submit(); }

	loading_st(1);

}


//삭제
function d_chk(url){
	
	if (confirm('정말 삭제하시겠습니까?'))	{
		
		loading_st(1);
		page_go1(url);

	}else{
		
		return false;
	
	}

}






function checkAll(){

	if(document.getElementById('frm_list').chk_all.value == "") {
		document.getElementById('frm_list').chk_all.value="Y";
		totchk();
	}else {

		document.getElementById('frm_list').chk_all.value="";
		totoff();
	}
}



function totchk(){
	

	for(var i=0; i < document.getElementById('frm_list').elements.length ; i++) { 
		if(document.getElementById('frm_list').elements[i].type=='checkbox') 
			if (  document.getElementById('frm_list').elements[i].disabled != true ){
			document.getElementById('frm_list').elements[i].checked = true;
		}
	}
}


function totoff(){
	for(var i=0; i < document.getElementById('frm_list').elements.length ; i++) { 
		if(document.getElementById('frm_list').elements[i].type=='checkbox') 
			document.getElementById('frm_list').elements[i].checked = false;
		
	}
}



function delete2(){

	var flag;


	if (confirm('정말 삭제하시겠습니까?'))	{
		
		flag = "Empty";
		for (var j = 0; j < document.getElementById('frm_list').elements.length; j++)	{

			if(document.getElementById('frm_list').elements[j].type=='checkbox'){ 
				if (document.getElementById('frm_list').elements[j].checked == true){
					flag = "Not Empty";
				}
			}

		}

		if (flag == "Empty")	{
			alert ("데이터를 선택해 주세요.");
			return ;
		}

			loading_st(1);
			document.getElementById('frm_list').action = "delete_ok.asp";
			document.getElementById('frm_list').status.value = "totdel";
			document.getElementById('frm_list').submit();

	}else{
		
		return ;
	
	}
	
	

	
}


function delete3(){

	var flag;


	if (confirm('정말 삭제하시겠습니까?'))	{
		
		flag = "Empty";
		for (var j = 0; j < document.getElementById('frm_list').elements.length; j++)	{

			if(document.getElementById('frm_list').elements[j].type=='checkbox'){ 
				if (document.getElementById('frm_list').elements[j].checked == true){
					flag = "Not Empty";
				}
			}

		}

		if (flag == "Empty")	{
			alert ("데이터를 선택해 주세요.");
			return ;
		}

			loading_st(1);
			document.getElementById('frm_list').action = "member_delete_ok.asp";
			document.getElementById('frm_list').status.value = "totdel";
			document.getElementById('frm_list').submit();

	}else{
		
		return ;
	
	}
	
	

	
}


function levelchange(form, idx){
	
	loading_st(1);
	document.getElementById('frm_list').b_l_chk.value = form;
	document.getElementById('frm_list').b_l_num.value = idx;
	document.getElementById('frm_list').action = "level_ok.asp";
	document.getElementById('frm_list').submit();
}


function tot_levelchage(page){

	var flag;
	
	

	flag = "Empty";
	for (var j = 0; j < document.getElementById('frm_list').elements.length; j++)	{

	  if(document.getElementById('frm_list').elements[j].type=='checkbox'){ 
		if (document.getElementById('frm_list').elements[j].checked == true){
			flag = "Not Empty";
		}
	  }

	}

	if (flag == "Empty")	{
		alert ("데이터를 선택해 주세요.");
		return ;
	}

	if (document.getElementById('frm_list').tot_level_chk.value=="")	{
		alert ("변경할 등급을 선택해주세요");
		document.getElementById('frm_list').tot_level_chk.focus();
		return ;
	}

		loading_st(1);
		document.getElementById('frm_list').action = "level_ok.asp?"+page;
		document.getElementById('frm_list').status.value = "totlevel";
		document.getElementById('frm_list').submit();
}


function win_popup(idx,vscrollbars,vtoolbar,vmenubar,vlocation,vwidth,vheight){		
	window.open('view.asp?idx='+idx,'','scrollbars='+vscrollbars+',toolbar='+vtoolbar+',menubar='+vmenubar+',location='+vlocation+',width='+vwidth+',height='+vheight+',location=no');
}




function skin01() {
		skin_c01('skin1','url(/manager/img/nl_skin1_1.jpg)','244px');
		skin_c02('skin1-2','10px 0 0 64px','');
		skin_c03('subject_skin','#FFFFFF');
		skin_c01('skin2','url(/manager/img/nl_skin1_2.gif)','154px');
		skin_c02('skin2-2','94px 0 0 0px','');
		skin_c01('skin3','url(/manager/img/nl_skin1_3.gif)','');
		skin_c04('skin3','10px 0 0 40px','650px');
		skin_c01('skin4','url(/manager/img/nl_skin1_4.gif)','103px');
		skin_c01('skin5','url(/manager/img/nl_skin1_5.gif)','80px');
		skin_c02('skin5-2','5px 0 0 50px','left');
	}

	function skin02() {
		skin_c01('skin1','url(/manager/img/nl_skin2_1.gif)','238px');
		skin_c02('skin1-2','52px 0 0 70px','');
		skin_c03('subject_skin','#000000');
		skin_c01('skin2','url(/manager/img/nl_skin2_2.gif)','154px');
		skin_c02('skin2-2','94px 0 0 0px','');
		skin_c01('skin3','url(/manager/img/nl_skin2_3.gif)','');
		skin_c04('skin3','10px 0 0 40px','650px');
		skin_c01('skin4','url(/manager/img/nl_skin2_4.gif)','103px');
		skin_c01('skin5','none','');
		skin_c02('skin5-2','9px 0 0 0','center');
	}

	function skin03() {
		skin_c01('skin1','url(/manager/img/nl_skin3_1.gif)','256px');
		skin_c02('skin1-2','73px 0 0 33px','');
		skin_c03('subject_skin','#FFFFFF');
		skin_c01('skin2','url(/manager/img/nl_skin3_2.gif)','154px');
		skin_c02('skin2-2','94px 0 0 0px','');
		skin_c01('skin3','url(/manager/img/nl_skin3_3.gif)','');
		skin_c04('skin3','10px 0 0 40px','650px');
		skin_c01('skin4','url(/manager/img/nl_skin3_4.gif)','103px');
		skin_c01('skin5','url(/manager/img/nl_skin3_5.gif)','80px');
		skin_c02('skin5-2','5px 0 0 50px','left');
	}

	function skin04() {
		skin_c01('skin1','url(/manager/img/nl_skin4_1.jpg)','479px');
		skin_c02('skin1-2','412px 0 0 87px','');
		skin_c03('subject_skin','#0052D9');
		skin_c01('skin2','url(/manager/img/nl_skin4_2.gif)','154px');
		skin_c02('skin2-2','94px 0 0 0px','');
		skin_c01('skin3','url(/manager/img/nl_skin4_3.gif)','');
		skin_c04('skin3','10px 0 0 40px','650px');
		skin_c01('skin4','url(/manager/img/nl_skin4_4.gif)','103px');
		skin_c01('skin5','url(/manager/img/nl_skin4_5.gif)','80px');
		skin_c02('skin5-2','5px 0 0 50px','left');
	}

	function skin05() {
		skin_c01('skin1','url(/manager/img/nl_skin5_1.gif)','270px');
		skin_c02('skin1-2','73px 0 0 74px','');
		skin_c03('subject_skin','#000000');
		skin_c01('skin2','url(/manager/img/nl_skin5_2.gif)','154px');
		skin_c02('skin2-2','94px 0 0 0px','');
		skin_c01('skin3','url(/manager/img/nl_skin5_3.gif)','');
		skin_c04('skin3','10px 0 0 40px','650px');
		skin_c01('skin4','url(/manager/img/nl_skin5_4.gif)','120px');
		skin_c01('skin5','none','');
		skin_c02('skin5-2','9px 0 0 0','center');
	}
