 /** ÄíÅ°°ª ÃßÃâ
  * @param cookieName ÄíÅ°¸í
  */
 function getCookie( cookieName){
     var search = cookieName + "=";
     var cookie = document.cookie;

	  // ÇöÀç ÄíÅ°°¡ Á¸ÀçÇÒ °æ¿ì
	  if( cookie.length > 0 ){

		  // ÇØ´ç ÄíÅ°¸íÀÌ Á¸ÀçÇÏ´ÂÁö °Ë»öÇÑ ÈÄ Á¸ÀçÇÏ¸é À§Ä¡¸¦ ¸®ÅÏ.
		 startIndex = cookie.indexOf( cookieName );

		 // ¸¸¾à Á¸ÀçÇÑ´Ù¸é
		 if( startIndex != -1 ) {

			 // °ªÀ» ¾ò¾î³»±â À§ÇØ ½ÃÀÛ ÀÎµ¦½º Á¶Àý
			 startIndex += cookieName.length;

			 // °ªÀ» ¾ò¾î³»±â À§ÇØ Á¾·á ÀÎµ¦½º ÃßÃâ
			 endIndex = cookie.indexOf( ";", startIndex );

			 // ¸¸¾à Á¾·á ÀÎµ¦½º¸¦ ¸øÃ£°Ô µÇ¸é ÄíÅ° ÀüÃ¼±æÀÌ·Î ¼³Á¤
			 if( endIndex == -1) endIndex = cookie.length;

			 // ÄíÅ°°ªÀ» ÃßÃâÇÏ¿© ¸®ÅÏ
			 return unescape( cookie.substring( startIndex + 1, endIndex ) );
			}
		 else{ // ÄíÅ° ³»¿¡ ÇØ´ç ÄíÅ°°¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì
				return false;
		  }
	  }
	  else{   // ÄíÅ° ÀÚÃ¼°¡ ¾øÀ» °æ¿ì
		  return false;
	   }
 }

 
  /*** ÄíÅ° ¼³Á¤
  * @param cookieName ÄíÅ°¸í
  * @param cookieValue ÄíÅ°°ª
  * @param expireDay ÄíÅ° À¯È¿³¯Â¥
  */
  function setCookieArticleCount( cookieName, cookieValue, expireDate )
  {

	  var today = new Date();
	  //  today.setDate( today.getDate() + parseInt( expireDate ) );
	  today.setDate( today.getDate() +  parseInt( expireDate )  );
	  var domain = ".joins.com";

	  document.cookie = cookieName + "=" + escape( cookieValue ) + "; path=/; expires=" + today.toGMTString() + ";"
  }



function joinsArticleCounterCheck(total_id,tmpCtg_ID,strMaster_Code){
		
	
	var tmpstr = getCookie("vFlagJoinsArticle");

	if(tmpstr==false) tmpstr = "";
	if(tmpstr.indexOf(total_id)<0){

		setCookieArticleCount("vFlagJoinsArticle",tmpstr +","+ total_id, 1);
		
		document.write('<iframe src="http://service2.joins.com/counter/article_count2006.asp?Total_ID='+total_id+'&Ctg_ID='+tmpCtg_ID+'&Master_Code='+strMaster_Code+'&gubun=r" width=0 height=0 frameborder=0 marginheight=0 topmargin=0 scrolling=no></iframe>');
	}
}