function searchSendit()
{
	var form=document.searchForm;
	if(form.searchstring.value=="")
	{
		alert("°Ë»ö ³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
		form.searchstring.focus();
		return false;
	}
	else
	{
		return true;
	}
}
//err message
function writeLoginErr()
{
	alert("·Î±×ÀÎ ÇØÁÖ½Ê½Ã¿À.");
	//location.href="../login.php";
}
function writeErr()
{
	alert("¾²±â ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.");
}
function readLoginErr()
{
	alert("ÀÐ±â ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.\n\n·Î±×ÀÎ ÇØÁÖ½Ê½Ã¿À.");
	//location.href="../login.php";
}
function readErr()
{
	alert("ÀÐ±â ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.");
}
function write(boardIndex)
{
	location.href="article_write.php?boardIndex="+boardIndex;
}

function print(data,bi)
{
  window.open("print.php?data="+data+"&boardIndex="+bi,"","scrollbars=yes,width=580,height=500,left=50,top=20");
}

function edit(data,bi)
{
	location.href= "article_edit.php?data="+data+"&boardIndex="+bi;
}
function reply(data,bi)
{
	location.href= "article_write.php?data="+data+"&boardIndex="+bi;
}
function mail(data,bi)
	{
	  window.open("./email/mail2.php?data="+data+"&boardIndex="+bi,"","scrollbars=yes,width=560,height=500,left=50,top=20");
	}	
function del(data,bi)
{
	if(confirm("Á¤¸»·Î »èÁ¦ÇÏ½Ã°Ú½À´Ï°¡?")){
		  location.href = "article_edit_ok.php?del=1&data="+data+"&boardIndex="+bi;
	}
}	
function comment_del(a,b,c)
{
  window.location="comment_del.php?idx="+a+"&boardIndex="+b+"&data="+c;
  	
}

function comment_check()
{
  var comform = document.comment; 
  if (comform.re_content.value == "")
  {
    alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä");
    comform.re_content.focus(); 
  }
  else if (comform.re_content.length  >200 )
  {
    alert("³»¿ëÀº 200ÀÚÀÌ»ó ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
    comform.re_content.focus(); 
  }
  else comform.submit();
  
}

function setRecommend(num){
		alert("Âü¿©ÇØÁÖ¼Å¼­ °¨»çÇÕ´Ï´Ù.");
		var obj = document.getElementById("td_recomm");
		obj.innerHTML = "<img src=\"../images/common/star.gif\" >&nbsp;"+num;
}

function isValidateImage(filename){
	var ext = getFileExt(filename);
	if( ext =="JPEG" || ext =="JPG" || ext =="GIF"  ){
		return true;
	}
	else{
		return false;
	}
}
function isValidateUpfile(filename){
	var ext = getFileExt(filename);
	if( ext !="EXE"){
		return  true;
	}
	else{
		return false;
	}
}

function viewImg(filename ,size){
	if(size > 800 ){
		var win =window.open("","win","width=800 height=500");
	}
	else{
		var win =window.open("","win","width=800 height=500");
	}
	if( filename.indexOf("/") > 0 )  filename ="/"+filename;

	win.document.write("<body scroll=auto topmargin=0 leftmargin=0><img src='"+filename+"' style='cursor:hand' onclick='self.close();'></body>");
	win.focus();
}