function openImage(file, width, height) {
	var window_left = (screen.width-640)/2;
	var window_top = (screen.height-480)/2;

	image = window.open('', '', 'width=' + width + ', height=' + height + ', scrollbars=no,top=' + window_top + ',left=' + window_left + ''); 
	image.document.write('<body topmargin=0 leftmargin=0 marginheight=0 marwidth=0>');
	image.document.write('<a href=javascript:window.close() title=Ã¢´Ý±â>');
	image.document.write('<img src=\"' + file + '\" width=' + width + ', height=' + height + ' border=0></a></body>');
}
// ±×¸² ÀÌ¹ÌÁö ºñ·Ê Á¶Á¤
function resizeImg(target_img,s_width,s_height)
{
 var newX;
 var newY;
 var newHeight;
 var newWidth;
 var maxWidth = s_width;
 var maxHeight = s_height;
 var newImg = new Image();
 newImg.src = target_img.src;
 imgw = newImg.width;
 imgh = newImg.height;
 if (imgw > maxWidth || imgh > maxHeight)
 {
	if (imgw > imgh)
	{
	   if (imgw > maxWidth)
		  newWidth = maxWidth;
	   else
		  newWidth = imgw;
	   newHeight = Math.round((imgh * newWidth) / imgw);
	}
	else
	{
	   if (imgh > maxHeight)
		  newHeight = maxHeight;
	   else
		  newHeight = imgh;
	   newWidth = Math.round((imgw * newHeight) / imgh);
	}
 }
 else
 {
	newWidth = imgw;
	newHeight = imgh;
 }
  newX = maxWidth / 2 - newWidth / 2;
  newY = maxHeight / 2 - newHeight / 2;
  target_img.onload = null;
  target_img.src = newImg.src;
  target_img.width = newWidth;
  target_img.height = newHeight;
}

// ¸Þ¸ð ÀÔ·Â½Ã ÀÔ·Â°ª °Ë»çÇÏ±â
function checkMemo() {
	if(!document.frm_memo.f_name.value) {
		alert('ÀÌ¸§¸¦ ÀÔ·ÂÇÏ¼¼¿ä !!');
		document.frm_memo.f_name.focus();
		return;
	}
	if(!document.frm_memo.f_passwd.value) {
		alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä !!');
		document.frm_memo.f_passwd.focus();
		return;
	}
	if(!document.frm_memo.f_memo.value) {
		alert('¸Þ¸ð¸¦ ÀÔ·ÂÇÏ¼¼¿ä !!');
		document.frm_memo.f_memo.focus();
		return;
	}

	document.frm_memo.submit();
}
function deleteMemo() {
	if(!document.frm_memo.f_passwd.value) {
		alert('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä !!');
		document.frm_memo.f_passwd.focus();
		return;
	}

	document.frm_memo.submit();
}

function search()
{
  document.search.submit();
}

