
	
	//SMSÀ¯·áÃæÀü¾È³»
	function smsinfo() {
		window.open('/wkn_mini_home/admin/sms/pop_smsinfo.jsp','SmallBox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=350,height=400,top=100,left=400');
	}

	
	//»çÁøµî·ÏÆË¾÷
	function upload() {
		window.open('/wkn_mini_home/admin/mini/pop_upload.jsp','SmallBox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=160,top=100,left=400');
	}

	//¿ìÆí¹øÈ£Ã£±âÆË¾÷
	function zipsearch() {
		window.open('/wkn_mini_home/admin/mini/zipsearch.jsp','SmallBox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=395,top=100,left=400');
	}

	//´Þ·Âº¸±âÆË¾÷
	function cal() {
		window.open('/wkn_mini_home/admin/mini/pop_cal.jsp','SmallBox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=200,height=230,top=100,left=400');
	}

	//ÁÖ¿ä³óÀÛ¹°µî·ÏÆË¾÷
	function farm_product() {
		window.open('/wkn_mini_home/admin/mini/pop_farm_product.jsp','SmallBox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=290,top=100,left=400');
	}

	//ÁÖº¯°ü±¤Áöµî·ÏÆË¾÷
	function sight_insert() {
		window.open('/wkn_mini_home/admin/mini/pop_sight_insert.jsp','SmallBox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=290,top=100,left=400');
	}

	//ÁÖº¯°ü±¤Áö¼öÁ¤ÆË¾÷
	function sight_edit() {
		window.open('/wkn_mini_home/admin/mini/pop_sight_edit.jsp','SmallBox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=290,top=100,left=400');
	}

	//Å«½ºÅ²ÀÌ¹ÌÁöº¸±âÆË¾÷
	function view_big(fileName) {
		window.open('/wkn_mini_home/admin/design/pop_view_big.jsp?fileNm='+fileName,'SmallBox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=820,height=900,top=0,left=0');
	}

	//Ã¼Çè»çÁøÅ©°Ôº¸±âÆË¾÷
	function board_big() {
		window.open('/wkn_mini_home/board/pop_view_big.jsp','SmallBox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=820,height=900,top=0,left=0');
	}

	//´ä±Û´Þ±âÅ¬¸¯½Ã±Û¾²±âÀÔ·ÂÃ¢º¸¿©ÁÜ
	var previd = null;

    function displaySub(subID)
	{
        if (previd != null)
		{
			if (previd != subID)
			{
			    previd.style.display = "none";
			}
		}

		if (subID.style.display == "none") 
		{
			subID.style.display = "block";
		}
		else
		{
			subID.style.display = "none";
		}

		previd = subID;
        //titleID.style.bold = true;

		//ifHeight();
	}
	
	//¸Þ´º ¼±ÅÃ(ÀÏ¹Ý,°ü¸®ÀÚ)
	function fMenuChg(flag, blogId) {
		if (flag == "1") {
			location.href = "/wkn_mini_home/index_blog.jsp?blogId="+blogId;
		} else {
			location.href = "/wkn_mini_home/admin/info/info_my.jsp?blogId="+blogId;
		}
	}
	
	//¸Þ´º¿¡¼­ Ç×¸ñ ¼±ÅÃ
	function fUrlChg(tar, blogId) {
			location.href = tar+"?blogId="+blogId;
	}
	
	//»ç¿ëÀÚ Á¤ÀÇ ¸Þ´º Ç×¸ñ ¼±ÅÃ
	function fUrlChg2(tar, otherVa) {
			location.href = tar+otherVa;
	}
	
	//´Ù¿î·Îµå
  function fdownload(nm, orgNm){
  	var urlNm = "/wkn_mini_home/common/download.jsp"
  	document.location.href = urlNm+"?fileNm="+nm+"&orgNm="+orgNm;
	}
	
	//¹Ì´ÏÈ¨ÇÇ ¿ÀÇÂ(¸ÞÀÎ)
	function miniOpen(blogId) {
		//window.open('/'+blogId,'minihome');
		window.open('/wkn_mini_home/index_blog.jsp?blogId='+blogId,'minihome');
	}
	
	//¹Ì´ÏÈ¨ÇÇ ¿ÀÇÂ(ÁöÁ¤)
	function miniOpenTwo(sendURL) {
		window.open(sendURL,'minihome');
	}
	
	//Ã¼Å©¹Ú½º °Ù¼ö ¼¼±â
	function countCheckeBox( checkBox ) {
	    var count = 0;
	    if ( checkBox != undefined ) {
	        if ( checkBox.length != undefined ) {
	            count = checkBox.length;
	        } else {
	            count = 1;
	        }
	    }
	    return ( count );
	}
	
	//Ã¼Å©¹Ú½º¿¡ Ã¼Å©µÈ °Ù¼ö ¸®ÅÏ
	function countChecked( checkBox ) {
	    var count = 0;
	    if ( checkBox != undefined ) {
	        if ( checkBox.length != undefined ) {
	            for ( inx = 0 ; inx < checkBox.length ; inx++ ) {
	                if ( checkBox[inx].checked ) {
	                    count++;
	                }
	            }
	        } else {
	            if ( checkBox.checked ) {
	                count++;
	            }
	        }
	    }
	    return ( count );
	}
	
	//¼¿·ºÆ® ¹Ú½º Ã¼Å©ÇÏ±â
  function SelectCheckToValue(frmName, orgNm, tarNm){
  	var orgFrm = eval(frmName+"."+orgNm);
  	var tarFrm = eval(frmName+"."+tarNm);
  	var cnt = countCheckeBox(tarFrm);

  	if (orgFrm.checked == true) {
  		if (cnt == 1) {
  			tarFrm.checked = true;
  		} else {
  			for(var i=0; i<cnt; i++) {
  				tarFrm[i].checked = true;
  			}
  		}
  	} else {
  		if (cnt == 1) {
  			tarFrm.checked = false;
  		} else {
  			for(var i=0; i<cnt; i++) {
  				tarFrm[i].checked = false;
  			}
  		}
  	}
  }
  
  var popInt = 0;
  
  //¹Ì´ÏÈ¨ÇÇ Å¸ÀÌÆ² ¼öÁ¤Ã¢ È£Ãâ
	function fTitleMod(blogNm) {
	    var contents = "<table width=400 cellspacing=0 cellpadding=0 border=0 align=center><tr><td height=60><img src=/mini_img/pop_titleedit.gif></td></tr><tr><td height=60><input type=text size=30 name=blogTitleNm>&nbsp;&nbsp;<a href=javascript:fTitleSave('"+blogNm+"')><img src=/mini_img/butt_ssave.gif></a>&nbsp;<a href=javascript:hidebox('modfiyPop"+popInt+"')><img src=/mini_img/butt_scancel.gif></a></td></tr></table>";

	    new popUp(200, 100, 433, 160, "modfiyPop"+popInt, contents, "white", "black", "9pt tahoma,µ¸¿ò", "Å¸ÀÌÆ² ¼öÁ¤", "navy", "white", "#dddddd", "gray", "black", true, true, false, true, false);
	    popInt ++;
	}
	
	//¹Ì´ÏÈ¨ÇÇ Å¸ÀÌÆ² ¼öÁ¤
	function fTitleSave(blogNm) {
	    var saveContent = document.getElementById('blogTitleNm').value;
	    hiddenFr.location = "/wkn_mini_home/common/titleModfiy.jsp?blogId="+blogNm+"&save="+saveContent;
	}
	
	//·Î±×ÀÎÃ¢
	function fLogin() {
		var re_top = Math.floor((screen.height/2)-(180/2)); 
    var re_left = Math.floor((screen.width/2)-(350/2));
		window.open('https://www.weeknfarm.co.kr:30443/wkn_login/pop_login.jsp','LoginBox','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=350,height=180,top='+re_top+',left='+re_left);
	}
	
	//¸®·Îµå
	function fReload() {
	  var formElement = document.getElementsByTagName("form");
	  var nm = "";
	
	  for (var i=0; i<formElement.length; i++) {
	  	nm = formElement[i].name;
	  }
	  nm = eval('document.'+nm);
	  nm.action = window.location.href;
    //frm.action = window.location.href;
    nm.submit();
  }
  
  //»õ·Î°íÄ§ 
  function fPostReload(){
  	var formElement = document.getElementsByTagName("form");
	  var nm = "";
	
	  for (var i=0; i<formElement.length; i++) {
	  	nm = formElement[i].name;
	  }
	  nm = eval('document.'+nm);
	  nm.action = window.location.href;
    //frm.action = window.location.href;
    nm.submit();
	}
	
  //Ãú°ÜÃ£±â Ãß°¡ ½ºÅ©¸³Æ®
	function addZi( targetUrl, urlName ) {
	    window.external.AddFavorite(targetUrl,urlName);
	}
	
	//°ü½É³óÀå ´ã±â
	function fViewNon(blogNm) {
		  if(confirm("°ü½É³óÀåÀ¸·Î µî·ÏÇÏ½Ã°Ú½À´Ï±î?") != true) {
	      return;
	    }
	    hiddenFr.location = "/wkn_mini_home/common/add_favor.jsp?blogId="+blogNm;
	}


	//°ü½É»óÇ° ´ã±â
	function fViewGoods(oidx, svc_type, goods_type, goods_nm, farm_id, user_id, farm_nm, contract_date, start_date, goods_price, last_day) {
		  if(confirm("°ü½É»óÇ°À¸·Î µî·ÏÇÏ½Ã°Ú½À´Ï±î?") != true) {
	      return;
	    }
	    hiddenFr.location = "/wkn_mini_home/common/add_favor_goods.jsp?oidx="+oidx +"&svc_type="+ svc_type +"&goods_type="+ goods_type +"&goods_nm="+ goods_nm + "&farm_id=" +farm_id + "&user_id=" +  user_id + "&farm_nm="+ farm_nm +"&contract_date=" +  contract_date + "&start_date=" +  start_date + "&goods_price=" +  goods_price + "&last_day=" + last_day;
	}
	
	//»ó¼¼Á¤º¸º¸±â
	function fViewDetailS(ty, blogId) {
		if(ty == "A") {
			window.open('/wkn_mini_home/sale/sale.jsp?blogId='+blogId,'minihome');
		} else {
			window.open('/wkn_mini_home/sale/stay.jsp?blogId='+blogId,'minihome');
		}
	}
	
	//¿¹¾àÇÏ±â
	function fViewDetailS2(ty, blogId, gid) {
		if(ty == "A") {
			//window.open('/wkn_mini_home/sale/sale_regist.jsp?blogId='+blogId+"&idx="+gid,'minihome');
			window.open('/wkn_mini_home/sale/sale.jsp?blogId='+blogId,'minihome');

		} else {
			window.open('/wkn_mini_home/sale/stay_regist.jsp?blogId='+blogId+"&idx="+gid,'minihome');
		}
	}
	
	//·£´ý ºí·Î±×
	function fRandomBlog() {
	    document.location = "/wkn_mini_home/common/function.jsp?target=random";
	}
	
	//¼ýÀÚÀÔ·Â Ã¼Å©
	function fOnlyNumber(obj){
    if (event.keyCode >= 48 && event.keyCode <= 57) { //¼ýÀÚÅ°¸¸ ÀÔ·Â
      return true;
    } else {
      event.returnValue = false;
    }
  }
  
  //»óÇ°¼ö·® Ã¼Å©
	function fMaxCntAChk(obj, maxA, orgCnt){
    if (obj.value < maxA) {
      alert("ÀÌ¹Ì ½ÅÃ»µÈ ¼öº¸´Ù »óÇ°¼ö·®ÀÌ ÀûÀ» ¼ö ¾ø½À´Ï´Ù.");
      obj.value = orgCnt;
      obj.focus();
    }
  }
  
  //±Ý¾× 3ÀÚ¸®¸¶´Ù , Âï±â(½Ç½Ã°£¿ë)
  function fComma(obj)
	{
		var str = obj.value;
		str = fRmComma(str);
		var retValue = "";
		var maxlen = str.length+1;
		for(i=0; i<maxlen; i++)
		{
			if(i > 0 && (i%3)==0) {
							retValue = str.charAt(maxlen - i -1) + "," + retValue;
			 } else {
							retValue = str.charAt(maxlen - i -1) + retValue;
			}
		}
		obj.value = retValue;
	}
	
	//±Ý¾× 3ÀÚ¸®¸¶´Ù , Âï±â(±×³É)
  function fComma2(obj)
	{
		var str = obj.value;
		str = fRmComma(str);
		var retValue = "";
		var maxlen = str.length;
		for(i=0; i<maxlen; i++)
		{
			if(i > 0 && (i%3)==0) {
							retValue = str.charAt(maxlen - i -1) + "," + retValue;
			 } else {
							retValue = str.charAt(maxlen - i -1) + retValue;
			}
		}
		obj.value = retValue;
	}
	
	//±Ý¾× 3ÀÚ¸®¸¶´Ù , Âï±â(º¯¼ö¿ë)
  function fComma3(str)
	{
		str = fRmComma(str);
		var retValue = "";
		var maxlen = str.length;
		for(i=0; i<maxlen; i++)
		{
			if(i > 0 && (i%3)==0) {
							retValue = str.charAt(maxlen - i -1) + "," + retValue;
			 } else {
							retValue = str.charAt(maxlen - i -1) + retValue;
			}
		}
		return retValue;
	}
	
	//ÄÄ¸¶Á¦°Å
  function fRmComma(str){  
    reg = new RegExp(",","g");  
	  return str.replace(reg,'');
  }
  
  //ÄÄ¸¶Á¦°ÅÈÄ value¿¡ ¹Ù·Î ¹Ý¿µ
  function fRmComma2(obj){  
    obj.value = fRmComma(obj.value);
  }
  
  //Æ¯Á¤¹®ÀÚ Á¦°Å
	function fRmChar(strString, strChar) {
	    var i;
	    var delChar = strChar;
	    var strTmp = "";
	    for(i=0;i<strString.length;i++){
	        if(strString.charAt(i) != delChar) {
	            strTmp += strString.charAt(i);
	        }
	    }
	    return strTmp;
	}
	
	//ÀÌ¸ÞÀÏ Ã¼Å©
	function isEmail(emailStr) {
		var emailPat   = /^(.+)@(.+)$/;
		var userPat    = /^[a-zA-Z0-9\._-]+$/;
		var domainPat  = /^[a-zA-Z0-9\.-]+$/;
		var invalid0   = /^(.+)\.(.+)\.(.+)$/;
		var invalid1   = /^\.(.+)/;
		var invalid2   = /(.+)\.$/;
		var invalid3   = /\.\./;
		var eMailArray = emailStr.match(emailPat);
	
		if (eMailArray == null)
			return false;
	
		var user = eMailArray[1];
		var dom = eMailArray[2];
		if (user.match(userPat) == null
			//|| user.match(invalid0) != null
			|| user.length < 2
			|| user.match(invalid1) != null
			|| user.match(invalid2) != null
			|| user.match(invalid3) != null)
		{
			return false;
		}
	
		if (dom.match(domainPat) == null
			|| dom.indexOf('.') == -1
			|| dom.length < 4
			|| dom.match(invalid1) != null
			|| dom.match(invalid2) != null
			|| dom.match(invalid3) != null)
		{
			return false;
		}
	
		return true;
	}
	
	//ÀÌ¸ÞÀÏ È®ÀÎ Ã¼Å©
	function EmailCheck(objEmail){
		if(!(isEmail(objEmail.value))){
			alert("Àß¸øµÈ ÀÌ¸ÞÀÏ Çü½ÄÀÔ´Ï´Ù.\n\nÀÌ¸ÞÀÏÀ» Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
			objEmail.focus();
			objEmail.select();
			return false;
		}
		return true;
	}
	
	//ÀÌ¸ÞÀÏ È®ÀÎ Ã¼Å©2
	function EmailCheck2(objEmail){
		if(!(isEmail(objEmail.value))){
			alert("Àß¸øµÈ ÀÌ¸ÞÀÏ Çü½ÄÀÔ´Ï´Ù.\n\nÀÌ¸ÞÀÏÀ» Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿À.");
			//objEmail.focus();
			//objEmail.select();
			return false;
		}
		return true;
	}




	


	
	