var ckea = 0;
function ckno(){
	if (admin_form.elements.length) {
		ckea = 0;
		for (i = 0; i < admin_form.length; i++){
			if (admin_form.elements[i].checked == true) ckea++;
		}

		if (ckea) delete_able = 1;
		else delete_able = 0;
	}
}

var delete_able = 0;
function admin_del(){
	if (delete_able == 0) window.alert ("¼±ÅÃµÈ °Ô½Ã¹°ÀÌ ¾ø½À´Ï´Ù");
	else {
		a = confirm ("¼±ÅÃµÈ °Ô½Ã¹°µéÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?");
		if (a) 	admin_form.submit();
	}
}

function all_element(mode){
	for (i=0;i <write.length ;i++ ){
		if (write.elements[i].type == "checkbox") write.elements[i].checked = mode;
	}
}

function fr_resize(frm){
	fn = eval(frm.name);
	frm.style.height = fn.document.body.scrollHeight+25;
}

var seq = "";
function show(rep){
  if(seq != rep){
	 if(seq !=""){
		seq.style.display = "none";
	 }
	 rep.style.display = "block";
	 seq = rep;
  }
  else{
	 rep.style.display = "none";
	 seq = "";
  }
}

function open_intro(no){
	window.open('../group/inc/member.html?no='+no,'È¸»çÁ¤º¸','status=no, scrollbars=yes, resizable=no,width=666,height=700')
}

var all_check = 0;
function all_job() {
	f = document.sf;
	for (i=0; i < sf.length; i++)	{
		if (f.elements[i].name == "jobtype[]") {
			if (all_check == 0) f.elements[i].checked = true;
			else f.elements[i].checked = false;
		}
	}
	if (all_check == 0) all_check = 1;
	else all_check = 0;
}

  function mshow(no){
	pop.style.pixelLeft = document.body.scrollLeft + event.x - 210;
	pop.style.pixelTop = document.body.scrollTop + event.y + 10;

	subject = eval("title_"+no).innerHTML;
	content= eval("content_"+no).innerHTML;

	popSubject.innerHTML = subject;
	popContent.innerHTML = content;
	pop.style.display = "block";
  }

  function hidepop(){
	pop.style.display = "none";
  }

  function mpop(){
	status = document.body.scrollTop
	pop.style.pixelLeft = document.body.scrollLeft + event.x - 210;
	pop.style.pixelTop = document.body.scrollTop + event.y + 10;
  }

	function f_check(f){
		var msg = "";
		for(i = 0; i < f.length; i++){
			fe = f.elements[i];
			if (fe.id){
				if (fe.maxbytes && fe.value.bytes() > fe.maxbytes) msg = fe.id + " ÇÑ±Û "+fe.maxbytes/2+"ÀÚ ÀÌÇÏ, È¤Àº ¿µ¹® "+fe.maxbytes+"ÀÚ ÀÌÇÏ·Î ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À";
				if (fe.minbytes && fe.value.bytes() < fe.minbytes) msg = fe.id + " ÇÑ±Û "+fe.minbytes/2+"ÀÚ ÀÌ»ó, È¤Àº ¿µ¹® "+fe.minbytes+"ÀÚ ÀÌ»óÀ¸·Î ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À";
				if (!fe.value.length) msg = fe.id + " ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À";
				if (msg)	{
					window.alert (msg);
					fe.focus();
					return false;
				}
			}
		}
	}

	// ÇÑ±Û ¹ÙÀÌÆ® ¼ö ¼¼±â
	String.prototype.bytes = function() {
		var str = this;
		var l = 0;
		for (var i=0; i<str.length; i++) l += (str.charCodeAt(i) > 128) ? 2 : 1;
			return l;
	}

	function del_c(no){
		question = confirm("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")
		if (question)	hidden.location.href = "comment_delete.php?no="+no
	}

	function del_notice() {
		a = confirm ("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î??");
		if(a) f_d.submit();
	}
	
	function show_del(){
		f = p_layer.style.display;
		if (f == "none") {
			p_layer.style.display = "block";
			f_dm.passwd.focus();
		}
		else {
			p_layer.style.display = "none";
			f_dm.reset();
		}
	}

       var seq = "";
       function show(rep){
	      if(seq != rep){
		     if(seq !=""){
			    seq.style.display = "none";
		     }
		     rep.style.display = "block";
		     seq = rep;
	      }
	      else{
		     rep.style.display = "none";
		     seq = "";
	      }
       }

function p_view(filename,menu,path) {
	st =filename.lastIndexOf("/")+1;
	en = filename.length;
	filename = filename.substr(st,en);
	window.open(path+"/common/image_viewer.php?filename="+filename+"&menu="+menu+"&availWidth="+screen.availWidth+"&availHeight="+screen.availHeight,"preview","menubar=no scrollbars=no statusbar=no toolbar=no resizable=no");
}