//============================================================================0
function gallery_open(url) 
{
	window.open(url, '','width=673,height=620,topmargin=0,leftmargin=0,resizable=no,scrollbars=no');
}

function mov_open(url){

	window.open(url, '','width=900,height=628,topmargin=0,leftmargin=0,resizable=no,scrollbars=no');
}

// ============================ Cookie °ü·Ã ÇÔ¼ö =============================0
function delCookie(name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

function setCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function getCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return null;
}
// ============================ Cookie °ü·Ã ÇÔ¼ö =============================0
//============================================================================0
//============================================================================
// ============================ Font °ü·Ã ÇÔ¼ö =============================
		
	var article_fontSize = parseInt(getCookie("article_fontSize")); 		


	function initFont() { 

		if ( (article_fontSize < 10) || (article_fontSize > 18) || (isNaN(article_fontSize) == true)) {
			article_fontSize = 10;	
		}

		setFont(article_fontSize);
	}
	
	function setFont(article_fontSize) { 		
		document.getElementById("articleBody").style.fontSize = article_fontSize+"pt";
		setFontCookie(article_fontSize);
	}	
	
	function setFontCookie(article_fontSize)
	{
		var expiry = new Date();
		var path = "/";
		var domain = ".joins.com";
		var secure = "";


		expiry.setTime(expiry.getTime() + 90 * (24 * 60 * 60 * 1000));

		setCookie("article_fontSize",article_fontSize,expiry,path,domain,secure);
	}	
	
	function fontPlus() {		
		if (article_fontSize < 17) {
			article_fontSize = article_fontSize + 1; 
			setFont(article_fontSize); 
		}
	}

	function fontMinus() {
		if (article_fontSize > 9) {
			article_fontSize = article_fontSize - 1; 
			setFont(article_fontSize); 
		}
	}	
// ============================ Font °ü·Ã ÇÔ¼ö =============================
//============================================================================

//========================= Cookie ÀÚµ¿ »èÁ¦ ¹æÁö¸¦ À§ÇØ¼­ È£Ãâ ÇÏ´Â ºÎºÐ(»èÁ¦ ±ÝÁö)===========
	var tmp_login_memtype    = getCookie("Joins_MemType");
	var tmp_login_userName   = getCookie("Joins_MemName");
	var tmp_login_userID     = getCookie("Joins_MemID");
	var tmp_login_Joins_Blog = getCookie("Joins_Blog");
//==============================================================================================

function bookmark(){
	window.external.ImportExportFavorites(true,"http://help.joins.com/bookmark.htm");
}


function gallery_open2(url) { 
	window.open(url, '','width=790,height=535,topmargin=0,leftmargin=0,resizable=no,scrollbars=no');
	window.open(url , 'cnngallery' ,'scrollbars=no,width=796,height=541,left=50,top=50');
}