/*
====================================================================
ÇÔ¼ö·Î ¸¸µç ÇÃ·¡½Ã ºÒ·¯¿À±â-->ÇÃ·¡½Ã ÆÄÀÏÀÌ ¿©·¯°³ÀÏ¶§ Æí¸®ÇÔ
====================================================================
*/
function flashLoad(src, w, h, bgColor){

var wmode = '' ;
var wParam = '';
if(bgColor )
{
	bgColors = 'bgcolor="' +bgColor+ '"';
}
else
	{
	 wmode = 'wmode="transparent"';
	 bgColors = 'bgcolor="#FFFFFF"';
	 bgColor = '#FFFFFF';
	 wParam =  '<param name="wmode" value="transparent" />';
	}



var html = '';
html += '<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="'+h+'" width="'+w+'" >';
html += '<PARAM NAME="Movie" VALUE="'+src+'" />';
html += '<PARAM NAME="Src" VALUE="'+src+'" />';
html += '<param name="bgcolor" value="'+bgColor+'" />';
html += '<param name="quality" value="best" />';
html += '<param name="allowscriptaccess" value="samedomain">';
html += '<PARAM NAME="Play" VALUE="1">';
html += '<PARAM NAME="Loop" VALUE="-1">';
html += wParam;            
html += '<embed src="'+src+'" width="'+w+'" height="'+h+'" quality="high" '+bgColors+' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" '+wmode+'  ></embed>';
html += '</OBJECT>';

try{
	document.writeln(html);
}catch(e)
{
// alert(e);
}


}

/*
====================================================================
load image Link source
====================================================================
*/

function ImgLoad(src , nWidth, linkURL)
{
	
	var html = "";
	if(linkURL) 
	{
		html = '<a href="'+ linkURL + '" target="_blank"><img src="'+src+'" width="' + nWidth + '" border=0/> </a>';	
	}
	else
	{
		html = '<img src="'+src+'" width="' + nWidth + '"  border=0/>';
	}
	document.writeln(html);
}


/*
====================================================================
cookie °ü·Ã ÇÔ¼ö
====================================================================
*/

function SetBUSCookie(name, val)
{

var argc = SetBUSCookie.arguments.length;
var argv = SetBUSCookie.arguments;


var expires = ( argc > 2) ? argv[2]:null;
var path = ( argc > 3) ? argv[3]:null;
var domain = ( argc > 4) ? argv[4]:null;
var secure = ( argc > 5) ? argv[5]:false;

document.cookie = name + "=" + escape(val) +
((expires == null) ? "" : ("; expires =" + expires.toGMTString())) +
((path == null) ? "" : ("; path =" + path)) +
((domain == null) ? "" : ("; domain =" + domain)) +
((domain == true) ? "; secure" : "");

}



function GetBUSCookie(name) {

var dcookie = document.cookie;
var cname = name + "=";
var clen = dcookie.length;
var cbegin = 0;
	while (cbegin < clen) 
	{
		var vbegin = cbegin + cname.length;
		if (dcookie.substring(cbegin, vbegin) == cname) 
		{
			var vend = dcookie.indexOf (";", vbegin);
			if (vend == -1) vend = clen;
			return unescape(dcookie.substring(vbegin, vend));
		}
		cbegin = dcookie.indexOf(" ", cbegin) + 1;
		if (cbegin == 0) break;
	}
return 0;
}

//±ÛÀÚÅ©±â¹Ù²Ù±â
function fontsize(arg){

	var object = document.getElementById('ArticleBody');

	var fontsize = object.getAttribute('font-size');
	if(object)
	{

		var oldsize = document.getElementById('ArticleBody').style.fontSize;
		var size1 = oldsize.split('px');
		if(arg=="-"){
			if(size1[0]>10) size2 = eval(size1[0]) - 1;
			document.getElementById('ArticleBody').style.fontSize = size2 + 'px';
			document.getElementById('ArticleBody').style.lineHeight = '140%';
		}
		if(arg=="+"){
			if(size1[0]<20) size2 = eval(size1[0]) + 1;
			document.getElementById('ArticleBody').style.fontSize = size2 + 'px';
			document.getElementById('ArticleBody').style.lineHeight = '140%';
		}
	}
}


function SetFontSize(arg)
{
	var id = '#article_text';
	var nFontSize =	parseInt( $(id).css('font-size') );
	if( nFontSize > 0) 
	{
		if(arg=="-")
		{
			$(id).css('font-size' , --nFontSize + 'px');
		}
		else if(arg=="+")
		{
			$(id).css('font-size' , ++nFontSize + 'px');
		}

	}
}

var nCntRollingAD = 0;
nCntRollingAD = GetBUSCookie('CntRollingAD');
if(nCntRollingAD == "") nCntRollingAD =0;
if(nCntRollingAD >1000)  nCntRollingAD = 0;
++nCntRollingAD;



SetBUSCookie('CntRollingAD' , nCntRollingAD , null, null, "www.atlantachosun.com");
SetBUSCookie('CntRollingAD' , nCntRollingAD , null, null, "atlantachosun.com");






