<!--

	//°ßÀû¹®ÀÇ ÀÔ·Â½Ã ¾×¼Ç¹× ÅØ½ºÆ® Ã¼Å©
	function AddEstimateBtn()
  {
    if (CheckEstimate() == 0) {
      document.estimate.action = "./estimate_post.php?thp=estimate";
    } else {
	    return (false);
    }
  }

	//°ßÀû¹®ÀÇ ÀÔ·Â½Ã ÅØ½ºÆ® Ã¼Å©
  function CheckEstimate()	
  {

    if (document.estimate.name.value == "") {
       alert("´ã´çÀÚ¼º¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.name.focus();
       return 1;
    }

		//ÇÑ°³ÀÇ ÀüÈ­¹øÈ£µµ ¾øÀ»¶§
    if (document.estimate.tel1.value == "" && document.estimate.tel2.value == "" && document.estimate.tel3.value == "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value == "" && document.estimate.hp3.value == "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }

/*
    if (document.estimate.tel1.value != "" && document.estimate.tel2.value == "" && document.estimate.tel3.value == "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value == "" && document.estimate.hp3.value == "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }

    if (document.estimate.tel1.value == "" && document.estimate.tel2.value != "" && document.estimate.tel3.value == "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value == "" && document.estimate.hp3.value == "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }
    if (document.estimate.tel1.value += "" && document.estimate.tel2.value == "" && document.estimate.tel3.value != "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value == "" && document.estimate.hp3.value == "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }
    if (document.estimate.tel1.value != "" && document.estimate.tel2.value == "" && document.estimate.tel3.value == "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value != "" && document.estimate.hp3.value == "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }
    if (document.estimate.tel1.value == "" && document.estimate.tel2.value == "" && document.estimate.tel3.value == "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value == "" && document.estimate.hp3.value != "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }
*/

    if (document.estimate.tel1.value == "") {
       alert("ÀüÈ­¹øÈ£ Áö¿ª¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }
    if (document.estimate.tel2.value == "") {
       alert("ÀüÈ­¹øÈ£ ±¹¹øÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel2.focus();
       return 1;
    }
    if (document.estimate.tel3.value == "") {
       alert("ÀüÈ­¹øÈ£ µÞÀÚ¸®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel3.focus();
       return 1;
    }
//    if (document.estimate.email.value == "") {
//       alert("E-mailÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
//       document.estimate.email.focus();
//       return 1;
//    }
//    if (document.estimate.hp1.value == "") {
//       alert("ÇÚµåÆù Áö¿ª¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
//       document.estimate.hp1.focus();
//       return 1;
//    }
//    if (document.estimate.hp2.value == "") {
//       alert("ÇÚµåÆù ±¹¹øÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
//       document.estimate.hp2.focus();
//       return 1;
//    }
//    if (document.estimate.hp3.value == "") {
//       alert("ÇÚµåÆù µÞÀÚ¸®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
//       document.estimate.hp3.focus();
//       return 1;
//    }
//    if (document.estimate.comments.value == "") {
//       alert("»ó´ã³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
//       document.estimate.comments.focus();
//       return 1;
//    }

    return 0;
  }
/*
  function canclebtn()
  {
		document.forms[0].reset();
  }
*/

	//°ßÀû¹®ÀÇ ÀÔ·Â Ãë¼Ò¹öÆ°
  function CancleEstbtn()
  {
		document.estimate.reset();
  }

	//¹æ¹®»ó´ã ÀÔ·Â Ãë¼Ò¹öÆ°
  function CancleVisitbtn()
  {
		document.visit.reset();
  }

	//°ßÀû¹®ÀÇ °Ë»ö
	function SearchEstimateFrm()
	{
		if (document.keywords.value == "")
		 {
			 alert("³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
			 document.keywords.focus();
			 return (false);
		 }
	}

	//¹æ¹® »ó´ã ÀÔ·Â½Ã ¾×¼Ç¹× Ã¼Å©
  function AddVisitBtn()
  {
    if (CheckVisit() == 0) {
      document.visit.action = "./visit_post.php?thp=visit";
    } else {
	    return (false);
    }
  }

	//¹æ¹® »ó´ã ÀÔ·Â Ã¼Å©
  function CheckVisit()
  {
    if (document.visit.name.value == "") {
       alert("´ã´çÀÚ¼º¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.visit.name.focus();
       return 1;
    }

		//ÇÑ°³ÀÇ ÀüÈ­¹øÈ£µµ ¾øÀ»¶§
    if (document.visit.tel1.value == "" && document.visit.tel2.value == "" && document.visit.tel3.value == "" &&
				document.visit.hp1.value == "" && document.visit.hp2.value == "" && document.visit.hp3.value == "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.visit.tel1.focus();
       return 1;
    }

/*
    if (document.estimate.tel1.value != "" && document.estimate.tel2.value == "" && document.estimate.tel3.value == "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value == "" && document.estimate.hp3.value == "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }

    if (document.estimate.tel1.value == "" && document.estimate.tel2.value != "" && document.estimate.tel3.value == "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value == "" && document.estimate.hp3.value == "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }
    if (document.estimate.tel1.value += "" && document.estimate.tel2.value == "" && document.estimate.tel3.value != "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value == "" && document.estimate.hp3.value == "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }
    if (document.estimate.tel1.value != "" && document.estimate.tel2.value == "" && document.estimate.tel3.value == "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value != "" && document.estimate.hp3.value == "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }
    if (document.estimate.tel1.value == "" && document.estimate.tel2.value == "" && document.estimate.tel3.value == "" &&
				document.estimate.hp1.value == "" && document.estimate.hp2.value == "" && document.estimate.hp3.value != "")
		{
       alert("ÃÖ¼Ò ÇÑ°³ÀÇ ÀüÈ­¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.estimate.tel1.focus();
       return 1;
    }
*/
//    if (document.visit.company.value == "") {
//       alert("È¸»ç¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
//       document.visit.company.focus();
//       return 1;
//    }
    if (document.visit.tel1.value == "") {
       alert("ÀüÈ­¹øÈ£ Áö¿ª¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.visit.tel1.focus();
       return 1;
    }
    if (document.visit.tel2.value == "") {
       alert("ÀüÈ­¹øÈ£ ±¹¹øÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.visit.tel2.focus();
       return 1;
    }
    if (document.visit.tel3.value == "") {
       alert("ÀüÈ­¹øÈ£ µÞÀÚ¸®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.visit.tel3.focus();
       return 1;
    }

//    if (document.visit.hp1.value == "") {
//       alert("ÇÚµåÆù Áö¿ª¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
//       document.visit.hp1.focus();
//       return 1;
//    }
//    if (document.visit.hp2.value == "") {
//       alert("ÇÚµåÆù ±¹¹øÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
//       document.visit.hp2.focus();
//       return 1;
//    }
//    if (document.visit.hp3.value == "") {
//       alert("ÇÚµåÆù µÞÀÚ¸®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
//       document.visit.hp3.focus();
//       return 1;
//    }
//    if (document.visit.comments.value == "") {
//       alert("»ó´ã³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
//       document.visit.comments.focus();
//       return 1;
//    }

    return 0;
  }

	//°ü¸®ÀÚ¸ðµå °øÁö»çÇ× ÀÔ·Â Ã¼Å© 
	function NoticeValidator(theForm)
	{
		if (theForm.subject.value == "")
			 {
				 alert("Á¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
				 theForm.subject.focus();
				 return (false);
			 }
		if (theForm.start_len.value == "")
			 {
				 alert("½ÃÀÛ Ä­¼ö¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä\n\n ±âº» Ä­¼ö´Â 0 ÀÔ´Ï´Ù.");
				 theForm.start_len.focus();
				 return (false);
			 }
		if (theForm.end_len.value == "")
			 {
				 alert("³¡ Ä­¼ö ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä\n\n ±âº» Ä­¼ö´Â 0 ÀÔ´Ï´Ù.");
				 theForm.end_len.focus();
				 return (false);
			 }
		if (theForm.name.value == "")
			 {
				 alert("ÀÌ¸§À» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
				 theForm.name.focus();
				 return (false);
			 }
		if (theForm.comments.value == "")
			 {
				 alert("º»¹®À» ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
				 theForm.comments.focus();
				 return (false);
			 }
		if (IsNumeric(theForm.start_len.value) == false)
		{
			 alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
			 theForm.start_len.focus();
			 return (false);
		}

		if (IsNumeric(theForm.end_len.value) == false)
		{
			 alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
			 theForm.end_len.focus();
			 return (false);
		}
}

	//ºü¸¥ »ó´ã¹®ÀÇ ÀÔ·Â½Ã ¾×¼Ç¹× Ã¼Å©
  function AddQuickBtn()
  {
    if (CheckQuick() == 0) {
      document.quick.action = "../include/quick_post.php?thp=quick";
    } else {
	    return (false);
    }
  }

	//¸ÞÀÎ ¸Þ´º ºü¸¥ »ó´ã¹®ÀÇ ÀÔ·Â½Ã ¾×¼Ç¹× Ã¼Å©
  function AddQuickMainBtn()
  {
    if (CheckQuick() == 0) {
      document.quick.action = "./include/quick_post.php?thp=quick";
    } else {
	    return (false);
    }
  }

	//ºü¸¥ »ó´ã¹®ÀÇ ÀÔ·Â½Ã Ã¼Å©
  function CheckQuick()
  {
    if (document.quick.name.value == "") {
       alert("´ã´çÀÚ¼º¸íÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.quick.name.focus();
       return 1;
    }
    if (document.quick.tel1.value == "") {
       alert("ÀüÈ­¹øÈ£ Áö¿ª¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.quick.tel1.focus();
       return 1;
    }
    if (document.quick.tel2.value == "") {
       alert("ÀüÈ­¹øÈ£ ±¹¹øÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.quick.tel2.focus();
       return 1;
    }
    if (document.quick.tel3.value == "") {
       alert("ÀüÈ­¹øÈ£ µÞÀÚ¸®¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
       document.quick.tel3.focus();
       return 1;
    }

		if (IsNumeric(document.quick.tel1.value) == false)
		{
			 alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
			 document.quick.tel1.value = "";
			 document.quick.tel1.focus();
			 return 1;
		}

		if (IsNumeric(document.quick.tel2.value) == false)
		{
			 alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
			 document.quick.tel2.value = "";
			 document.quick.tel2.focus();
			 return 1;
		}

		if (IsNumeric(document.quick.tel3.value) == false)
		{
			 alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
			 document.quick.tel3.value = "";
			 document.quick.tel3.focus();
			 return 1;
		}

    return 0;
  }

	//¹æ¹®»ó´ã ÀÔ·Â½Ã ¿ìÆí¹øÈ£ °Ë»öÃ¢ ¶ç¿ì±â
	function ZipWindow(ref,what) {
		var window_left = (screen.width-640)/2;
		var window_top = (screen.height-480)/2;
		ref = ref + "?what=" + what;
		window.open(ref,"zipWin",'width=550,height=200,status=no,top=' + window_top + ',left=' + window_left + '');
	}

	//ÆË¾÷ ¶ç¿ì±â
	function MM_openBrWindow(theURL,winName,features) { //v2.0
		window.open(theURL,winName,features);
	}

	// ¾ËÆÄºª & ¼ýÀÚ Ã¼Å© Functoin 
	function IsNumeric(checkStr)
	{
		var checkOK = "0123456789";

		for (i = 0;  i < checkStr.length;  i++)
		{
			ch = checkStr.charAt(i);

			for (j = 0;  j < checkOK.length;  j++)
			if (ch == checkOK.charAt(j))
				break;

			if (j == checkOK.length)
			{
				return false;
				break;
			}
		}
		return true;
	}

