/////////// °ü¸®ÀÚ°¡ ¼±ÅÃÇÑ±Û º¸ÀÌ±â ///////////
function listview(tb,re_url,page) {
  views_no=new Array();
  j=0;

  for(var i=0;i<del_no.length;i++){
    if(del_no[i].checked==true) views_no[j++]=del_no[i].value;
  } 
  views_no=views_no.join("/");

  if (!views_no)
	  views_no =del_no.value;

  if (!views_no) {
	  alert ('º¸ÀÌ±â/°¨Ãß±â Ã³¸®ÇÒ °Ô½Ã±ÛÀ» ¸ÕÀú ¼±ÅÃÇØÁÖ¼¼¿ä');
  }else{
    if (confirm ("¼±ÅÃÇÑ °Ô½Ã¹°À» º¸ÀÌ±â/°¨Ãß±â Ã³¸®ÇÏ½Ã°Ú½À´Ï±î?"))
      window.location="../bbs/run.php?mode=admin_listview&views_no="+views_no+"&tb="+tb+"&re_url="+re_url+"&page="+page;
  }
}

/////////// °ü¸®ÀÚ°¡ ¼±ÅÃÇÑ±Û Áö¿ì±â ///////////
function dels(tb,re_url,ct) {
  dels_no=new Array();
  j=0;

  for(var i=0;i<del_no.length;i++){
    if(del_no[i].checked==true) dels_no[j++]=del_no[i].value;
  } 
  dels_no=dels_no.join("/");

  if (!dels_no)
	  dels_no =del_no.value;

  if (!dels_no) {
	  alert ('»èÁ¦ÇÒ °Ô½Ã±ÛÀ» ¸ÕÀú ¼±ÅÃÇØÁÖ¼¼¿ä');
  }else{
    if (confirm ("Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?\n Áö±Ý Áö¿ì½Ã¸é ´Ù½Ã´Â º¹±¸ÇÏÁö ¸øÇÕ´Ï´Ù\n\n\nÁö¿ì½Ã°Ú½À´Ï±î?"))
      window.location="../bbs/run.php?mode=admin_del&dels_no="+dels_no+"&tb="+tb+"&re_url="+re_url+"&ct="+ct;
  }
}

/////////// °ü¸®ÀÚ°¡ °Ô½Ã¹° ÀüÃ¼ ¼±ÅÃ/ÇØÁö ÇÏ±â ///////////
function dels_Allchk() {
	if (del_no_All.checked == true) {
		for (var i=0; i<del_no.length;i++) {
			if (del_no[i].type == "checkbox" && del_no[i].checked == false) {
				del_no[i].checked = true;
			}
		}
	}
	else {
		for (var i=0; i<del_no.length;i++) {
			if (del_no[i].type == "checkbox" && del_no[i].checked == true) {
				del_no[i].checked = false;
			}
		}
	}
}

/////////// ²¿¸®±Û check±¸¹® ///////////
function tail_check_val() {
  if (tail.memo.value == ""){
    alert("³»¿ëÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä");
    document.tail.memo.focus();
    return false;
  }
  if (tail.name.value == ""){
    alert("±Û¾´ÀÌ¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
    document.tail.name.focus();
    return false;
  }
  if (tail.passwd.value == ""){
    alert("ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
    document.tail.passwd.focus();
    return false;
  }
}

/////////// ÆÐ½º¿öµå ÀÔ·ÂÃ¢ ¶ç¿ì±â ///////////
function query_passwd(no,mode,skin) {

  var n=navigator.appName 
  var ns=(n=="Netscape") 
  var ie=(n=="Microsoft Internet Explorer") 
  if (ie) {
    var conf = "status=no; scroll=no; help=no;dialogWidth=300px; dialogHeight:120px; center:yes";
    window.showModelessDialog(skin+'/popup_query_passwd.php?no='+no+'&mode='+mode, window,conf);
  }else{
    var conf = "status=no; scroll=no; help=no;dialogWidth=300px; dialogHeight:120px; center:yes";
    window.open(skin+'/popup_query_passwd.php?no='+no+'&mode='+mode, window,conf);
  }
}

/////////// ¿øº»ÀÌ¹ÌÁö º¸ÀÌ±âÃ¢ ¶ç¿ì±â ///////////
function view_pop_image2(skin,tb,no,no2,width,height) {
  window.open(skin+"/popup_view_image2.php?tb="+tb+"&no="+no+"&no2="+no2, '', "scrollbars=no, memubar=0, toolbar=no,width="+width+", height="+height+",resizable=no,mebar=no,left=0,top=0"); 
}

function view_pop_image(skin,tb,no,no2,width,height) {
  var screen_w = screen.width;   //ÇöÀçÈ­¸éÀÇ ÇÈ¼¿´ç ³ÐÀÌ
  var screen_h = screen.height;  //ÇöÀçÈ­¸éÀÇ ÇÈ¼¿´ç ³ôÀÌ
  screen_w = screen_w - 25;
  screen_h = screen_h - 120;
 
  if(width > screen_w && height > screen_h){
    var scroll = "yes";
    width = screen_w;
    height = screen_h;
    width = parseInt(width) + 16;
    height = parseInt(height) + 16;
  }else if(width > screen_w){
    var scroll = "yes";
    width = screen_w;
    width = parseInt(width) + 18;
    height = parseInt(height) + 16;
  }else if(height > screen_h){
    var scroll = "yes";
    width = parseInt(width) + 16;
    height = screen_h;
  }else{
    var scroll = "no";
  }

  window.open(skin+"/popup_view_image.php?tb="+tb+"&no="+no+"&no2="+no2, '', "scrollbars="+scroll+", memubar=0, toolbar=no,width="+width+", height="+height+",resizable=no,mebar=no,left=0,top=0"); 
}

function rowsize_p(obj) {
  obj.rows += 2;
}
function rowsize_m(obj) {
  obj.rows -= 2;
}
//function colsize(obj) {
//  obj.cols += 2;
//}

/////////// ¼ýÀÚ¸¸À» ±âÀÔ¹Þ°Ô ÇÏ±â ///////////
function onlyNumber() {
  if((event.keyCode < 48)||(event.keyCode > 57))
  event.returnValue = false;
}

/////////// ÅØ½ºÆ® ±ôºý°Å¸®±â ///////////
function doBlink() {
    var blink = document.all.tags('BLINK')
    for (var i=0; i<blink.length; i++)
    blink[i].style.visibility = blink[i].style.visibility == '' ? 'hidden' : '' 
}
function startBlink() {
   if (document.all)
   setInterval('doBlink()',500)
}

/////////// ÄíÅ°»ý¼ºÇÏ±â ///////////
function setCookie( name, value, expiredays ) {
  var todayDate = new Date();
  todayDate.setDate( todayDate.getDate() + expiredays );
  document.cookie = name+"="+escape( value )+"; path=/;expires="+todayDate.toGMTString()+";"
}