function rss_it(){
		window.open("../support/rss.asp","rss","width=400, height=236,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,");
}
function leftDisplay(flag){
				if (flag == 0) 
				{
					divList1.style.display = "";
					divList2.style.display = "none";
					divList3.style.display = "none";
				} 
				else if (flag==1)
				{
					divList1.style.display = "none";
					divList2.style.display = "";
					divList3.style.display = "none";
				}
				else
				{
					divList1.style.display = "none";
					divList2.style.display = "none";
					divList3.style.display = "";
				}
} 
function news_write_reply(flag){

var reply_va = opener.window.news_write.reply.value;

if(reply_va==""){
reply_va = flag;
}
else
{
reply_va = reply_va +','+flag;
}

opener.document.news_write.reply.value = reply_va;

}
//¼­ºê»óÇ°µî·ÏÇÏ±â
function admin_banner(){
	var f = window.document.banner;
	if(f.file.value==""){
	alert("Select and post your Banner.");
	f.file.focus();
	return;
	}
	f.submit();
}
//¼­ºê¹è³Ê»èÁ¦ÇÏ±â
function admin_banner_del(idx,file){
		var bool = confirm("\nDelete this banner?\n");
		if (bool){
			location.href = "del.asp?idx="+idx+"&file="+file;
		}
}
function folder_del(idx){
		var bool = confirm("\nDelete this folder??\n");
		if (bool){
			location.href = "folder_del.asp?idx="+idx;
		}
}
function folder_input(){
	if (document.folder_input.f_name.value == ""  )	{
	alert("enter the folder name.");
	document.folder_input.f_name.focus();
	return;
	}
	document.folder_input.submit();
}
//½ºÅ©·¦ÇÏ±â
function scrab(idx){
		var bool = confirm("\ndo you want to scrap this news ?\n");
		if (bool){
		window.open("scrab_window.asp?idx="+idx+"","scrab","width=400, height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,");
		}
}
function pokerDisplay(flag){
				if (flag == 0) 
				{
					divList2.style.display = "";
					divList1.style.display = "none";
				} 
				else 
				{
					divList1.style.display = "";
					divList2.style.display = "none";
				}
			} 
function Not_login2(){
alert("·Î±×ÀÎÈÄ ÀÇ°ß Âü¿©°¡ °¡´ÉÇÕ´Ï´Ù.");
}
	function copy_clip() {
	
		clipboardData.setData("Text", location.href);
		alert("Copy url. \nCtrl + V  to paste url");
	
	}
function text_banner_it(){
	var f = window.document.talk_write;
	if(f.title1.value==""){
	alert("enter the title#1");
	f.title1.focus();
	return;
	}
	if(f.title2.value==""){
	alert("enter the title#2");
	f.title2.focus();
	return;
	}
	if(f.link.value==""){
	alert("enter the URL link");
	f.link.focus();
	return;
	}
	f.submit();
}
//½Å°íÁ¢¼ö³»¿ë»èÁ¦
function news_singo_del(idx,page){
		var bool = confirm("\nconfirm delete your infomation.\n");
		if (bool){
			location.href = "del.asp?idx="+idx+"&page="+page;
		}
}
//½Å°íÁ¢¼ö°Ë»ö
function news_singo_go(){
	var f = window.document.go_search;
	if(f.searchstr.value==""){
	alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
	f.searchstr.focus();
	return;
	}
	document.go_search.submit();
}
function mem_singo(){
	if (document.singo.name.value == ""  )	{
	alert("Please enter your name.");
	document.singo.name.focus();
	return;
	}
	if (document.singo.email.value == ""  )	{
	alert("Please enter your email.");
	document.singo.email.focus();
	return;
	}
	if (document.singo.tel.value == ""  )	{
	alert("Please enter your phone no.");
	document.singo.tel.focus();
	return;
	}
	if (document.singo.title.value == ""  )	{
	alert("Please enter your title.");
	document.singo.title.focus();
	return;
	}
	if (document.singo.content.value == ""  )	{
	alert("Please enter your content.");
	document.singo.content.focus();
	return;
	}
	document.singo.submit();
}
//°ü¸®ÀÚ¸ðµåÈ¸¿ø»èÁ¦
function admin_mem_del(idx,page){
		var bool = confirm("\nconfirm delete member infomation.\n");
		if (bool){
			location.href = "del.asp?idx="+idx+"&page="+page;
		}
}
//È¸¿ø°Ë»ö
function mem_search_go(){
if((document.go_search.search_check1.checked==false)&&(document.go_search.search_check2.checked==false)){
alert('°Ë»öÀ» ÇÏ½Ã±â Àü¿¡ °Ë»öÁ¶°ÇÀ» ¼±ÅÃÇØÁÖ¼¼¿ä');
return;
}
document.go_search.submit();
}
//È¸¿øÅ»Åð½ÅÃ³ÇÏ±â
						function exitConfirm(){
							
							var formnm=document.mem_out;
							
							var outComp=formnm["reason"].length;
							var cont=formnm.outComplain_text;
							var ckS=0;

							for(var i=0;i<outComp;i++){
								if(formnm["reason"][i].checked==true) break;
								else ckS++;
							}

							if(ckS==outComp){
								alert(' ¼­ºñ½ººÒÆí»çÇ×À» 1°³ÀÌ»ó Ã¼Å©ÇÏ¿© ÁÖ½Ê½Ã¿ä. \n\n ÇØ´ç»çÇ×Àº °³¼±»çÇ×¿¡ ¹Ý¿µµÇ¾îÁý´Ï´Ù.');
								return;
							}
							
							if(confirm(' È¸¿øÅ»Åð¸¦ ÇÏ½Ã¸é È¸¿ø´ÔÀÇ ¸ðµçµ¥ÀÌÅ¸(°³ÀÎÁ¤º¸,Æ÷ÀÎÆ®µî)ÀÌ ¸ðµÎ »èÁ¦µÇ¾îÁö¸ç \n\n 6°³¿ùµ¿¾È °¡ÀÔÇÒ¼ö ¾ø½À´Ï´Ù. \n\n ±×·¡µµ È¸¿øÀ» Å»ÅðÇÏ½Ã°Ú½À´Ï±î?')){
								formnm.submit();
							}
							else return;


						}
//¼ýÀÚ Ã¼Å© »ç¿ë¹æ¹ý : onkeyup="onlynum(formResult.resi_no1);"
function onlynum(objtext1){
				var inText = objtext1.value;
				var ret;
				for (var i = 0; i < inText.length; i++) {
				    ret = inText.charCodeAt(i);
					if (!((ret > 47) && (ret < 58)))  {
						alert("¼ýÀÚ¸¸À» ÀÔ·ÂÇÏ¼¼¿ä");
						objtext1.value = "";
						objtext1.focus();
						return false;
					}
				}
				return true;
			}
function numberCheck(){
   if((event.keyCode < 48)||(event.keyCode > 57))
      event.returnValue=false;
}
function pwd_lost(){
	if (document.pwd_lost.id.value == ""  )	{
	alert("Please enter your ID.");
	document.pwd_lost.id.focus();
	return;
	}
	if (document.pwd_lost.name.value == ""  )	{
	alert("Please enter your name.");
	document.pwd_lost.name.focus();
	return;
	}
	if (document.pwd_lost.juminno1.value == ""  )	{
	alert("Please enter your passport or IC No.");
	document.pwd_lost.juminno1.focus();
	return;
	}
	if (document.pwd_lost.juminno2.value == ""  )	{
	alert("Please enter your passport or IC No.");
	document.pwd_lost.juminno2.focus();
	return;
	}
	document.pwd_lost.submit();
}
function id_lost(){
	if (document.id_lost.name.value == ""  )	{
	alert("Please enter your name.");
	document.id_lost.name.focus();
	return;
	}
	if (document.id_lost.juminno1.value == ""  )	{
	alert("Please enter your passport or IC No.");
	document.id_lost.juminno1.focus();
	return;
	}
	if (document.id_lost.juminno2.value == ""  )	{
	alert("Please enter your passport or IC No.");
	document.id_lost.juminno2.focus();
	return;
	}
	document.id_lost.submit();
}
function login_it(){
	if (document.login.id.value == ""  )	{
	alert("Please enter your ID.");
	document.login.id.focus();
	return false;
	}
	if (document.login.pwd.value == ""  )	{
	alert("Please enter your password.");
	document.login.pwd.focus();
	return false;
	}
	document.login.submit();
}
function next_it2(){
	document.theForm.a_pwd.focus();
	return;
}
function next_it(){
	document.login.pwd.focus();
	return;
}
function onClick(i) {

	zipcode = document.forms[i].h_zip1.value;
	fom = opener.document.member;
	tmp1 = zipcode.substring(0,3);
	tmp2 = zipcode.substring(4,7);
   
	fom.zipcode1.value = tmp1;
	fom.zipcode2.value = tmp2;
    
	fom.juso1.value = document.forms[i].h_zip2.value;
    
	parent.window.close();
	parent.fom.juso2.focus();
}
function GoSearch()
{
	if ( document.InSearch.str_zip.value == ""  )
	{
	  alert("Please enter URL!");
      document.InSearch.str_zip.focus();
	  return;
	}

	if (document.InSearch.str_zip.value.length <= 1)
	{ 
    	alert("enter 2characters above!");
	    document.InSearch.str_zip.focus();
	    return;
	}

	document.InSearch.submit();
}
//¾ÆÀÌµðÁßº¹°Ë»ç¿©ºÎ
function idcheck_reset(){
	document.member.idcheck.value="";
}
//¾ÆÀÌµðÁßº¹°Ë»ç
function Id_Check(){
    document.member.idcheck.value="1";
	if(document.member.id.value==""){ 
	alert("Please enter your ID.");
	document.member.id.focus();
	return;
	}
	window.open('id_check.asp?id='+document.member.id.value,'id_check','width=400,height=200,menubar=no,scrollbars=no');
}
function code_check(){
    
	if(document.goods.g_code.value==""){ 
	alert("»óÇ°ÄÚµå¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
	document.goods.g_code.focus();
	return;
	}
	window.open('code_check.asp?code='+document.goods.g_code.value,'code_check','width=400,height=250,menubar=no,scrollbars=no');
}
function sub(url, field)
{ 
	var opt = "toolbar=no,resizable=yes,scrollbars=yes,location=no,resize=no,menubar=no,directories=no,copyhistory=0,width=500,height=300,top= 330,left = 370"; 	
	window.open(url, 'new_window', opt); 
} 
function chkhanmail()
{ 
	var tmp1, mailserver;
	tmp1 = document.member.email.value.indexOf("@");
	mailserver = document.member.email.value.substring(tmp1);

	if (mailserver == '' || mailserver == '')
	{
		alert('ÁË¼ÛÇÕ´Ï´Ù ÇÑ¸ÞÀÏÀº ÀÌ¿ëÇÏ½Ç¼ö ¾ø½À´Ï´Ù.'
		+'\n\n´Ù¸¥ ¸ÞÀÏ ÁÖ¼Ò¸¦ ÀÌ¿ëÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.'
		+'\n\n³×¶ì¾Ó,¶óÀÌÄÚ½º,¾ßÈÄ...µî'
		+'\n\n¹«·á ¸ÞÀÏµî·ÏÇÏ½ÅÈÄ ´Ù½Ã °¡ÀÔÇØ ÁÖ½Ê½Ã¿À'
		+'\n\nÁË¼ÛÇÕ´Ï´Ù.');
		member.email.value = '';
		member.email.focus();
		return false;
	}
}
function Shift() {
if(document.member.juminno1.value.length==6) {
document.member.juminno2.focus()
return; 
}
}
function Shift2() {
if(document.lost.juminno1.value.length==6) {
document.lost.juminno2.focus()
return; 
}
}
function juminno_check(){
if(document.member.juminno2.value.length==7) {
jumin=document.member.juminno1.value  + document.member.juminno2.value
 gop=""
 var i=0
 sum=0
 while(i<=5) {
 a=jumin.charAt(i) 
 b=gop.charAt(i)
 sum+=eval(a*b)
 i++
 }
 i=6
 while(i<=11) {
 a=jumin.charAt(i)
 b=gop.charAt(i)
 sum+=eval(a*b)
 i++
 }

 endpoint=11-(sum%11)+""
 endpoint=endpoint.substring(endpoint.length-1,endpoint.length)
 bunho=jumin.charAt(12)+""
 if(bunho!=endpoint) {
  alert('ERROR your passport/IC No.');
  document.member.juminno1.value="";
  document.member.juminno2.value="";
  document.member.juminno1.focus();
  return; 
 }
 }
}
function onlyEng(objtext1) {
				var inText = objtext1.value;
				var ret;		
				for (var i = 0; i < inText.length; i++) {
				    ret = inText.charCodeAt(i);
					if (ret > 31 && ret < 127) {
						alert("enter english characters only");
						objtext1.value = "";
						objtext1.focus();
						return false;
					}
				}
				return true;
} 
function onlyEng(objtext1) {
				var inText = objtext1.value;
				var ret;	
				for (var i = 0; i < inText.length; i++) {
				    ret = inText.charCodeAt(i);
					if ((ret > 122) || (ret < 48) || (ret > 57 && ret < 65) || (ret > 90 && ret < 97)) {
						alert("enter english characters and numbers only");
						objtext1.value = "";
						objtext1.focus();
						return false;
					}
				}
				return true;
}
//ÁÖ¹Î ¹øÈ£¿¡ µû¸¥ ÀÚµ¿ »ýÀÏ ÀÔ·Â 		

function mem_join(){

	var f = window.document.member;
	if(f.id.value==""){
	alert("Please enter your ID.");
	f.id.focus();
	return;
	}
    if(f.id.value.length < 6 || f.id.value.length > 25) {
	alert ( "Please enter a ID value that is between 6 and 25 characters" )  ;
	f.id.focus();
	return ;
	}
	if(f.idcheck.value==""){
	alert("Please enter a ID value that is between 6 and 25 characters.");
	f.id.focus();
	return;
	}
	if(f.pwd1.value==""){
	alert("Please enter your password.");
	f.pwd1.focus();
	return;
	}
	if(f.pwd1.value.length < 6 || f.pwd1.value.length > 25) {
	alert ( "Please enter a PASSWORD value that is between 6 and 25 characters." )  ;
	f.pwd1.focus();
	return ;
	}
	if(f.pwd2.value.length < 6 || f.pwd2.value.length > 25) {
	alert ( "Please enter a 2PASSWORD value that is between 6 and 25 characters." )  ;
	f.pwd2.focus();
	return ;
	}
	if(f.pwd2.value==""){
	alert("Please re-Enter your password.");
	f.pwd2.focus();
	return;
	}
	if(f.pwd1.value != f.pwd2.value) {
	alert(" both passwords are not match try again.");
	return;
	}
	if(f.name.value==""){
	alert("Please enter your name.");
	f.name.focus();
	return;
	}
	if(f.tel1_1.value==""){ 
	alert("Please enter your phone no.");
	f.tel1_1.focus();
	return;
	}
	if(f.tel1_2.value==""){ 
	alert("Please enter your phone no.");
	f.tel1_2.focus();
	return;
	}
	if(f.tel1_3.value==""){ 
	alert("Please enter your home telephone no.");
	f.tel1_3.focus();
	return;
	}
	if(f.tel2_2.value==""){ 
	alert("Please enter your mobile no.");
	f.tel2_2.focus();
	return;
	}
	if(f.tel2_3.value==""){ 
	alert("Please enter your mobile no.");
	f.tel2_3.focus();
	return;
	}
	if(f.email.value==""){ 
	alert("Please enter your email.");
	f.email.focus();
	return;
	}
	if((f.email.value.indexOf("@") == -1) || (f.email.value.indexOf(".") == -1)) {
	alert("ERROR email!");
	f.email.focus();
	return;
	}
	if(f.juso1.value==""){ 
	alert("Please enter your address.");
	f.juso1.focus();
	return;
	}
	if(f.juso2.value==""){ 
	alert("Please enter your 2address.");
	f.juso2.focus();
	return;
	}
	f.submit();	
}
function mem_edit(){

	var f = window.document.member;
	if(f.pwd1.value==""){
	alert("Please enter your password.");
	f.pwd1.focus();
	return;
	}
	if(f.pwd1.value.length < 6 || f.pwd1.value.length > 25) {
	alert ( "Please enter a PASSWORD value that is between 6 and 25 characters." )  ;
	f.pwd1.focus();
	return ;
	}
	if(f.pwd2.value.length < 6 || f.pwd2.value.length > 25) {
	alert ( "Please enter a 2PASSWORD value that is between 6 and 25 characters." )  ;
	f.pwd2.focus();
	return ;
	}
	if(f.pwd2.value==""){
	alert("Please re-enter your password.");
	f.pwd2.focus();
	return;
	}
	if(f.pwd1.value != f.pwd2.value) {
	alert("both passwords are not match try again.");
	return;
	}
	if(f.tel1_1.value==""){ 
	alert("Please enter your phone No.");
	f.tel1_1.focus();
	return;
	}
	if(f.tel1_2.value==""){ 
	alert("Please enter your phone No.");
	f.tel1_2.focus();
	return;
	}
	if(f.tel1_3.value==""){ 
	alert("Please enter your home telephone No.");
	f.tel1_3.focus();
	return;
	}
	if(f.tel2_2.value==""){ 
	alert("Please enter your mobile No.");
	f.tel2_2.focus();
	return;
	}
	if(f.tel2_3.value==""){ 
	alert("Please enter your mobile No.");
	f.tel2_3.focus();
	return;
	}
	if(f.email.value==""){ 
	alert("Please enter your email .");
	f.email.focus();
	return;
	}
	if((f.email.value.indexOf("@") == -1) || (f.email.value.indexOf(".") == -1)) {
	alert("ERROR email!");
	f.email.focus();
	return;
	}
	if(f.juso1.value==""){ 
	alert("Please enter your address.");
	f.juso1.focus();
	return;
	}
	if(f.juso2.value==""){ 
	alert("Please enter your 2address.");
	f.juso2.focus();
	return;
		}
	f.submit();	
}
//ÅäÅ©ÅäÅ©»èÁ¦
function admin_dir_del(idx){
		var bool = confirm("\n¸ÞÀÎ Ä«Å×°í¸®¸¦ »èÁ¦ÇÏ½Ã¸é ¼­ºê Å×ÀÌºí¹× ³»¿ëµµ ÇÔ²² »èÁ¦µË´Ï´Ù.\n\n»èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n");
		if (bool){
			location.href = "del.asp?idx="+idx;
		}
}
//ÅäÅ©ÅäÅ©µî·Ï,¼öÁ¤
function admin_dir_write_it(){
	var f = window.document.board_write;
	if(f.title.value==""){
	alert("Please enter your category name.");
	f.title.focus();
	return;
	}
	f.submit();
}
function s_ready()
{
alert("¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù");
} 

function CheckKey(){ 
               key=event.keyCode;
               if (key==13) {
                      check(); }
               }
function autofocus()
{
    var str = document.form1.resno1.value.length;
    if(str == 6)
       document.form1.resno2.focus();
} 
//¼ºÀÎÀÎÁõ½ºÅ©¸³Æ®
	function check() { 
	var c1 = document.form1.name.value
	var c2 = document.form1.resno1.value
	var c3 = document.form1.resno2.value
    var strings = form1.name.value;
    if (document.form1.name.value == "")
        {
                alert("Please enter your name.");
                form1.name.focus();
                return;
        }
	if (document.form1.resno1.value == "") {
		alert("Please enter your passport or IC No.");
		form1.resno1.focus();
		return;
		}
	if (document.form1.resno2.value == "") {
		alert("Please enter your passport or IC No.");
		form1.resno2.focus();
		return;
		}
	if(document.form1.resno1.value.length < 6 || document.form1.resno2.value.length < 7) {
			alert(" ERROR Please re-enter your passport or IC No.");
		form1.resno1.focus();
		return;
			}
        for(i=0;i<strings.length;i++)
        {
                c = strings.charAt(i);   
                if(!((c < '0' || c > '9')&&(c < 'a' || c > 'z')&&(c < 'A' || c > 'Z')))
                {
                        alert("enter english characters only");        
                        form1.name.value="";
                        form1.name.focus();
                        return;
                }
        }   
		var rn;
		rn=form1.resno1.value + form1.resno2.value;
		var sum=0;
		for(i=0;i<8;i++) { sum+=rn.substring(i,i+1)*(i+2); }
		for(i=8;i<12;i++) { sum+=rn.substring(i,i+1)*(i-6); }
		sum=11-(sum%11);
		if (sum>=10) { sum-=10; }
	    if (rn.substring(12,13) != sum || (rn.substring(6,7) !=1 && rn.substring(6,7) != 2)) {
			alert("ERROR Please re-enter your passport or IC No.");
			form1.resno1.value ='';
			form1.resno2.value ='';
			form1.resno1.focus();
			return;
			}
		if (form1.resno1.value.length == 6)
			{
			var today = new Date();
			var toyear = parseInt(today.getYear());
			var tomonth = parseInt(today.getMonth()) + 1;
			var todate = parseInt(today.getDate());
			var bhyear = parseInt('19' + form1.resno1.value.substring(0,2)); 
			var ntyear = form1.resno2.value.substring(0,1);
			var bhmonth = form1.resno1.value.substring(2,4); 
			var bhdate = form1.resno1.value.substring(4,6); 
			var birthyear = toyear - bhyear;

		if (ntyear == 1 || ntyear == 2)	{
			if (birthyear < 19) { 
				alert("¹Ì¼º³âÀÚ´Â ÀÔÀåÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.!!!");
				form1.resno1.value ='';
				form1.resno2.value ='';
				form1.resno1.focus();
				return; 
			} else if (birthyear == 19) {
				if (parseInt(tomonth) < parseInt(bhmonth)) {
				alert("¹Ì¼º³âÀÚ´Â ÀÔÀåÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.!!!");
				form1.resno1.value ='';
				form1.resno2.value ='';
				form1.resno1.focus();
				return;
  				} else if ((parseInt(tomonth) == parseInt(bhmonth)) && (parseInt(todate) > parseInt(bhdate))) {
					alert("¹Ì¼º³âÀÚ´Â ÀÔÀåÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.!!!");
					form1.resno1.value ='';
					form1.resno2.value ='';
					form1.resno1.focus();
					return; 
					}
				}
			}
		}
	window.location.href="adult_check.asp?c1="+c1;
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}

function go_to_page(eForm) {
	var MoveTo;
	MoveTo = eForm.go_shop.selectedIndex;
	if ( 0 != MoveTo && 1 != MoveTo ) parent.shop_mainFrame.location.href = eForm.go_shop.options[MoveTo].value;
}
//°øµ¿±¸¸Å¼öÁ¤ÇÏ±â
function admin_tog_del(idx,page){
		var bool = confirm("\nÇØ´ç °øµ¿±¸¸Å¸µÅ©¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n");
		if (bool){
			location.href = "del.asp?idx="+idx+"&page="+page;
		}
}
//°øµ¿±¸¸Å¼öÁ¤ÇÏ±â
function tog_edit_it(){
	var f = window.document.fm;
	if(f.title.value==""){
	alert("¸µÅ©¸íÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
	f.title.focus();
	return;
	}	
	if(f.url.value==""){
	alert("¸µÅ©ÁÖ¼Ò¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
	f.url.focus();
	return;
	}	
	f.submit();
}
//°øµ¿±¸¸Åµî·ÏÇÏ±â
function tog_write_it(){
	var f = window.document.fm;
	if(f.title.value==""){
	alert("¸µÅ©¸íÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
	f.title.focus();
	return;
	}	
	if(f.url.value==""){
	alert("¸µÅ©ÁÖ¼Ò¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
	f.url.focus();
	return;
	}	

	f.submit();
}

//¸ÞÀÏº¸³»±â
function sendmail_it(){
	var f = window.document.mail_send;
	if(f.to_email.value==""){
	alert("¹Þ´Â»ç¶÷ ÀÌ¸ÞÀÏÁÖ¼Ò¸¦ ³Ö¾îÁÖ¼¼¿ä.");
	f.to_email.focus();
	return;
	}
	if(f.from_name.value==""){
	alert("º¸³»´Â »ç¶÷ ÀÌ¸§À» ³Ö¾îÁÖ¼¼¿ä.");
	f.from_name.focus();
	return;
	}
	if(f.from_email.value==""){
	alert("º¸³»´Â »ç¶÷ ÁÖ¼Ò¸¦ ³Ö¾îÁÖ¼¼¿ä.");
	f.from_email.focus();
	return;
	}
	if(f.content.value==""){
	alert("³»¿ëÀ» ³Ö¾îÁÖ¼¼¿ä.");
	f.content.focus();
	return;
	}
	f.submit();
}
//±ÛÀÚ¼ö ÀÔ·ÂÁ¦ÇÑÇÏ±â
function fc_chk_byte(aro_name,ari_max) {
   var ls_str     = aro_name.value;
   var li_str_len = ls_str.length;
   var li_max      = ari_max * 2;
   var i           = 0;
   var li_byte     = 0;
   var li_len      = 0;
   var ls_one_char = "";
   var ls_str2     = "";

   for(i=0; i< li_str_len; i++) {
      ls_one_char = ls_str.charAt(i);
      if (escape(ls_one_char).length > 4) li_byte += 2;
      else li_byte++;
      if (li_byte <= li_max) li_len = i + 1;
   }
   if(li_byte > li_max) {
      alert("ÇÑ±Û " +  ari_max + "±ÛÀÚ¸¦ ÃÊ°ú ÀÔ·ÂÇÒ¼ö ¾ø½À´Ï´Ù. ÃÊ°úµÈ ³»¿ëÀº ÀÚµ¿À¸·Î »èÁ¦ µË´Ï´Ù.");
      ls_str2 = ls_str.substr(0, li_len);
      aro_name.value = ls_str2;
      
   }
   aro_name.focus();   
}
//½Ç½Ã°£ ´º½º ·Ñ¸µ
 function rolling(chk){
 	switch (chk){
		case "on":
			rollingnews.start();
			break;
		case "off":
			rollingnews.stop();	
			break;
		}
 } 
//´º½º¼½¼Ç¹Ù·Î°¡±â
function jumpMenu(){ 
var msection=document.gourl.newsgo.value;
location.href = "../news/list.asp?msection="+msection;
}

//ÆË¾÷Ã¢¶ç¿ì´ÂºÎºÐ
//openWindow('/homepage/banner.asp','402','601');
function openWindow(url,width,height) {
	var widths = width;
	var heights = height;
	var top = 0; // Ã¢ÀÌ ¶ã À§Ä¡ ÁöÁ¤
	var left = 0;
	var temp2 = 'toolbar=no, width='+widths+',height='+heights+',top='+top+',left='+left;
	var temp = url;
	window.open(temp, 'notice1', temp2);
}
function openWindow2(url,width,height,lefts) {
	var widths = width;
	var heights = height;
	var top = 0; // Ã¢ÀÌ ¶ã À§Ä¡ ÁöÁ¤
	var left = lefts;
	var temp2 = 'toolbar=no, scrollbars=no, width='+widths+',height='+heights+',top='+top+',left='+left;
	var temp = url;
	window.open(temp, 'notice2', temp2);
}
function openWindow3(url,width,height,lefts) {
	var widths = width;
	var heights = height;
	var top = 0; // Ã¢ÀÌ ¶ã À§Ä¡ ÁöÁ¤
	var left = lefts;
	var temp2 = 'toolbar=no, width='+widths+',height='+heights+',top='+top+',left='+left;
	var temp = url;
	window.open(temp, 'notice3', temp2);
}
function openWindow4(url,width,height,lefts) {
	var widths = width;
	var heights = height;
	var top = 30; // Ã¢ÀÌ ¶ã À§Ä¡ ÁöÁ¤
	var left = 30;
	var temp2 = 'toolbar=no, scrollbars=yes, width='+widths+',height='+heights+',top='+top+',left='+left;
	var temp = url;
	window.open(temp, 'notice4', temp2);
}
//°Ô½ÃÆÇÅä·ÐÀå»ý¼º
function admin_board_edit_it(){
	var f = window.document.board_write;
	if(f.title.value==""){
	alert("Please enter your title subject.");
	f.title.focus();
	return;
	}
	f.submit();
}
//°Ô½ÃÆÇÅä·ÐÀå»ý¼º
function admin_board_write_it(){
	var f = window.document.board_write;
	if(f.title.value==""){
	alert("Please enter your title subject.");
	f.title.focus();
	return;
	}
	f.submit();
}
// ´äº¯Çü ¼³¹® ¼öÁ¤ÇÏ±â
function poll_reply_it(){
	var f = window.document.poll_reply;
	if (f.writer.value == ""  )	{
	alert("Please enter your name!");
	f.writer.focus();
	return;
	}
	if (f.pwd.value == ""  )	{
	alert("Please enter your password!");
	f.pwd.focus();
	return;
	}
	if (f.content.value == ""  )	{
	alert("Please enter your content!");
	f.content.focus();
	return;
	}
	f.submit();
}
//¼³¹®´äº¯½Ä¼öÁ¤ÇÏ±â
function Poll_reply_edit(){
		var bool = confirm("\ndo you want to edit poll?\n");
		if (bool){
			document.Poll.submit();
		}
}
// ´äº¯Çü ¼³¹® ¼öÁ¤ÇÏ±â
function Poll_edit(){
	var f = window.document.Poll;
	if (f.poll_title.value == ""  )	{
	alert("Please enter your poll title !");
	f.poll_title.focus();
	return;
	}
	if((f.poll_start.value.indexOf("-") == -1) || (f.poll_start.value == "")){
	alert("start '-' date)2003-03-14  follow the sample date!");
	f.poll_start.focus();
	return;
	}
	if((f.poll_end.value.indexOf("-") == -1) || (f.poll_end.value == "")){
	alert("end '-' date)2003-03-14  follow the sample date!");
	f.poll_end.focus();
	return;
	}
	f.submit();
}
//¼±ÅÃÇü¼³¹®»èÁ¦
function poll_del1(idx,intpage){
		var bool = confirm("\ndo you want to delete poll?\n");
		if (bool){
			location.href = "poll_del_1.asp?idx="+idx+"&intpage="+intpage;
		}
}
//´äº¯Çü¼³¹®»èÁ¦
function poll_del2(idx,intpage){
		var bool = confirm("\ndo you want to delete poll?\n");
		if (bool){
			location.href = "poll_del_2.asp?idx="+idx+"&intpage="+intpage;
		}
}
//ÁÖ°ü½Ä¼³¹®´äº¯»èÁ¦ÇÏ±â
function poll_reply_del(idx,intpage,poll_idx,page){
		var bool = confirm("\ndo you want to delete poll answer?\n");
		if (bool){
			location.href = "list_1_reply_del.asp?idx="+idx+"&intpage="+intpage+"&poll_idx="+poll_idx+"&page="+page;
		}
}
// ÁÖ°ü½Ä¼³¹®´äº¯ÇÏ±â
function list_1_write(){
	var f = window.document.Poll_A;
	f.submit();
}
//¼³¹®´äº¯½ÄÀÛ¼ºÇÏ±â
function poll_write_2(){
		var bool = confirm("\ndo you want to save poll answer?\n");
		if (bool){
			document.Poll.submit();
		}
}
// ¼³¹®ÀÛ¼ºÇÏ±â
function Poll_next(){
	var f = window.document.Poll;
	if (f.poll_title.value == ""  )	{
	alert("Please enter poll subject!");
	f.poll_title.focus();
	return;
	}
	if((f.poll_start.value.indexOf("-") == -1) || (f.poll_start.value == "")){
	alert("start '-' date)2003-03-14  follow the sample date!");
	f.poll_start.focus();
	return;
	}
	if((f.poll_end.value.indexOf("-") == -1) || (f.poll_end.value == "")){
	alert("end '-' date)2003-03-14  follow the sample date!!");
	f.poll_end.focus();
	return;
	}
	if((f.poll_type1.checked != 1) && (f.poll_type2.checked != 1)){
	alert("¼³¹®¹æ¹ýÀ» ´äº¯½Ä°ú¼±ÅÃ½Ä´äº¯Áß ÇÑ°³·Î ¼±ÅÃÇØÁÖ¼¼¿ä!!");
	return;
	}
//´äº¯½ÄÀÌ¸é  1¹øÃ³¸®·Î
	if(f.poll_type1.checked == 1){
	f.action="write_1.asp";
	f.submit();
	}
//´äº¯½ÄÀÌ¸é  2¹øÃ³¸®·Î
	if(f.poll_type2.checked == 1){
	f.action="write_2.asp";
	f.submit();
	}
}
//¼³¹®Á¶»çÇüÅÂ¼¿·ºÆ®½Ã °ü·Ã¾ø´Â ºÎºÐ disalbed ½ÃÅ°±â
function check_type1()
{
	if(document.Poll.poll_type1.checked==1)
	{
		document.Poll.poll_type2.disabled=true;
		document.Poll.poll_count.disabled=true;
	}
	else
	{
		document.Poll.poll_type2.disabled=false;
		document.Poll.poll_count.disabled=false;
	}
}
function check_type2()
{
	if(document.Poll.poll_type2.checked==1)
	{
		document.Poll.poll_type1.disabled=true;
	}
	else
	{
		document.Poll.poll_type1.disabled=false;
	}
}
function ToggleCheckAll(button) {
	var sa=true;
	if(button.checked) sa=false;
	for (var i=0;i<document.frmlist.elements.length;i++) {
		var e = document.frmlist.elements[i];
		if(sa) e.checked=false;
		else e.checked=true;
	}
	if(sa) button.checked=false;
	else button.checked=true;
}

function mailto(va){
	temp=va.split("+")
	mail=""
	for(i=0;i<temp.length;i++){
		mail=mail+String.fromCharCode(parseInt(temp[i]))
		// ÀÌºÎºÐÀº ³Ý½ºÄÉÀÌÇÁ°è¿­¿¡¼­ ´Ù¸£°Ô Ç¥ÇöÇÏ°í ÀÖ´Â°É·Î ¾Ë°í ÀÖ½À´Ï´Ù.
	}
	location.href="mailto:"+mail
}
function board_edit_ok(){
	var f = window.document.Write;
	if(f.title.value.length==0){
	alert("Please enter the title.");
	f.title.focus();
	return;
	}
	if(f.writer.value.length==0){
	alert("Please enter your name.");
	f.writer.focus();
	return;
	}
	if(f.pwd.value.length==0){
	alert("Please enter your password.");
	f.pwd.focus();
	return;
	}
	if(f.content.value.length==0){
	alert("Please enter the content.");
	f.content.focus();
	return;
	}
	f.submit();
}
function board_write_ok(){
	var f = window.document.Write;
	if(f.title.value.length==0){
	alert("Please enter the title.");
	f.title.focus();
	return;
	}
	if(f.writer.value.length==0){
	alert("Please enter your name.");
	f.writer.focus();
	return;
	}
	if(f.pwd.value.length==0){
	alert("Please enter your password.");
	f.pwd.focus();
	return;
	}
	if(f.content.value.length==0){
	alert("Please enter the content.");
	f.content.focus();
	return;
	}
	f.keynum.value = Cal_Key_num;
	f.submit();
}
function Board_reply_send(){
	var f = window.document.Board_reply;
	if(f.writer.value == ""){
	alert("Please enter your name.");
	f.writer.focus();
	return;
	}
	if(f.re_pwd.value == ""){
	alert("Please enter your password.");
	f.re_pwd.focus();
	return;
	}
	if(f.content.value == ""){
	alert("Please enter the content.");
	f.content.focus();
	return;
	}
	f.submit();
}
function Not_login(){
alert("·Î±×ÀÎÈÄ ²¿¸®¸»´Þ±â°¡ °¡´ÉÇÕ´Ï´Ù.");
}
function Board_reply_del(idx1,idx2,url,intpage){
		var bool = confirm("\nÇöÀç ²¿¸®¸»À» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n");
		if (bool){
			location.href = "Board_reply_del.asp?r_idx="+idx1+"&idx="+idx2+"&url="+url+"&intpage="+intpage;
		}
}
function CheckLen() {
	if(document.Board_reply.content.value.length > 300){
	alert("´õÀÌ»ó ±ÛÀ» ÀÛ¼ºÇÒ¼ö ¾ø½À´Ï´Ù. 300ÀÚ±îÁö¸¸ ÀÛ¼ºÀÌ °¡´ÉÇÕ´Ï´Ù!!");
	document.Board_reply.content.focus();
	return;
	}	
	document.Board_reply.content_length.value = document.Board_reply.content.value.length ;	
	}
function board_del(){
	var f = window.document.pwd;
	if(f.pwd.value.length==0){
	alert("Please enter your password.");
	f.pwd.focus();
	return;
	}
	f.action="pwd_check.asp?mode=del";
	f.submit();
}
function board_edit(){
	var f = window.document.pwd;
	if(f.pwd.value.length==0){
	alert("Please enter your password.");
	f.pwd.focus();
	return;
	}
	f.action="pwd_check.asp?mode=edit";
	f.submit();
}
function admin_write_it(){
	var f = window.document.Write;
	if(f.title.value.length==0){
	alert("Please enter the title.");
	f.title.focus();
	return;
	}
	if(f.writer.value.length==0){
	alert("Please enter your name.");
	f.writer.focus();
	return;
	}
	if(f.content.value.length==0){
	alert("Please enter the content.");
	f.content.focus();
	return;
	}

	f.submit();
}
function admin_del_it(idx,table,intpage){
		var bool = confirm("\ndo you want to delete?\n");
		if (bool){
			location.href = "del.asp?idx="+idx+"&table="+table+"&intpage="+intpage;
		}
}
function pds_del_it(idx,table,intpage,url){
		var bool = confirm("\ndo you want to delete?\n");
		if (bool){
			location.href = "del.asp?idx="+idx+"&table="+table+"&intpage="+intpage+"&url="+url;
		}
}
function board2_del(idx,ref,re_level,url,table,intpage){
		var bool = confirm("\ndo you want to delete?\n");
		if (bool){
			location.href = "del.asp?idx="+idx+"&ref="+ref+"&re_level="+re_level+"&url="+url+"&table="+table+"&intpage="+intpage;
		}
}//´º½ºÅä·ÐÀå»ý¼º
function talk_write_it(){
	var f = window.document.talk_write;
	if(f.msection.value=="0"){
	alert("select main section.");
	return;
	}
	if(f.sub.value=="0"){
	alert("select sub section.");
	return;
	}
	if(f.title.value==""){
	alert("Please enter the poll title.");
	f.title.focus();
	return;
	}
	f.submit();
}
//´º½ºÅä·Ð¸ñ·Ï»èÁ¦ÇÏ±â
function talk_del(idx,table_name){
		var bool = confirm("\ndo you want to delete?\n");
		if (bool){
			location.href = "del.asp?idx="+idx+"&table_name="+table_name;
		}
}
//´º½º¸®ÇÃ»èÁ¦
function reply_del(idx,page,searchstr,news_idx){
		var bool = confirm("\ndo you want to delete?\n");
		if (bool){
			location.href = "reply_del.asp?idx="+idx+"&page="+page+"&searchstr="+searchstr+"&news_idx="+news_idx;
		}
}

//´º½º ¸®ÇÃ´Þ±â
function news_reply(){
	var f = window.document.news_reply;
	if(f.title.value==""){
	alert("please enter the title.");
	f.title.focus();
	return;
	}
	if(f.content.value==""){
	alert("please enter the content.");
	f.content.focus();
	return;
	}
	f.submit();
}
//´º½º¸ñ·Ï»èÁ¦
function news_del(idx,page,searchstr){
		var bool = confirm("\ndo you want to delete?\n");
		if (bool){
			location.href = "del.asp?idx="+idx+"&page="+page+"&searchstr="+searchstr;
		}
}
//´º½ºµî·Ï
function news_write_it(){
	var f = window.document.news_write;
	if(f.msection.value=="0"){
	alert("select main section.");
	return;
	}
	if(f.sub.value=="0"){
	alert("select sub section.");
	return;
	}
	if(f.title.value==""){
	alert("please enter the news title..");
	f.title.focus();
	return;
	}
	if(f.FORM_Content.value==""){
	alert("please enter the news content.");
	f.FORM_Content.focus();
	return;
	}
	f.submit();
}
//½Å¹®»çÄ«Å×°í¸®»èÁ¦
function com_del(idx){
		var bool = confirm("\ndo you want to delete news agent?\n");
		if (bool){
			location.href = "com_del.asp?idx="+idx;
		}
}
//´º½º¼­ºêÄ«Å×°í¸®»èÁ¦
function news_sub_del(idx){
		var bool = confirm("\ndo you want to delete submenu?\n");
		if (bool){
			location.href = "del.asp?idx="+idx;
		}
}
//°ü¸®ÀÚµî·ÏÇÏ±â
function admin_it(){
	if (document.theForm.id.value == ""  )	{
	alert("Please enter your ID!!");
	document.theForm.id.focus();
	return false;
	}
	if (document.theForm.pwd.value == ""  )	{
	alert("Please enter your password!!");
	document.theForm.pwd.focus();
	return false;
	}
}
//°ü¸®ÀÚ»èÁ¦ÇÏ±â
function admin_del(idx){
		var bool = confirm("\ndo you want to delete admin?\n");
		if (bool){
			location.href = "admin_del.asp?idx="+idx;
		}
}
//¸Å´º·¹ÀÌ¾î¼Ò½º
function ClickOnTD(obj, sub){
	//obj.style.border = "1 solid #738E18";
	//obj.style.backgroundColor = "white";
	obj.style.cursor = "hand";
	
	if (sub.style.display == "none"){
		sub.style.display = "block";
	}
	else{
		sub.style.display = "none";
	}
}
//ºÐ·ù»èÁ¦
function M_del(idx){
		var bool = confirm("\nÇØ´ç ¼ÒºÐ·ù¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n");
		if (bool){
			location.href = "M_del.asp?idx="+idx;
		}
}
function S_del(idx){
		var bool = confirm("\nÇØ´ç ¼ÒºÐ·ù¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n");
		if (bool){
			location.href = "S_del.asp?idx="+idx;
		}
}
function L_del(idx){
		var bool = confirm("\nÇØ´ç ´ëºÐ·ù¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n");
		if (bool){
			location.href = "L_del.asp?idx="+idx;
		}
}
//ºÐ·ù»ý¼º
function S_input_it(){
	var f = window.document.S_input;
	if(f.name.value==""){
	alert("ºÐ·ù»ý¼º¸íÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä!!");
	f.name.focus();
	return;
	}	
	f.submit();
}
function M_input_it(){
	var f = window.document.M_input;
	if(f.name.value==""){
	alert("ºÐ·ù»ý¼º¸íÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä!!");
	f.name.focus();
	return;
	}	
	f.submit();
}
function L_input_it(){
	var f = window.document.L_input;
	if(f.name.value==""){
	alert("ºÐ·ù»ý¼º¸íÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä!!");
	f.name.focus();
	return;
	}	
	f.submit();
}
//°ü¸®ÀÚ·Î±×ÀÎÇÏ±â
function admin_login_it(){
	if (document.theForm.m_id.value == ""  )	{
	alert("please enter your ID!!");
	document.theForm.m_id.focus();
	return false;
	}
	if (document.theForm.m_pwd.value == ""  )	{
	alert("please enter your password!!");
	document.theForm.m_pwd.focus();
	return false;
	}
	document.theForm.submit();
}