<script language="javascript">
	//var arrText = new Array();
	//var arrLink = new Array();
	var adsText = null;
	var adsLink = null;
	var ELEMENT_NODE = 1;
	//var index_text = 0;
	//var index_link = 0;
	
	function searchArticle( node) 
	{
		if( adsText == null && node.className == 'admin' && node.nodeType == ELEMENT_NODE) //admin class div ÀÏ °æ¿ì ÀúÀåÇÑ´Ù.
		{
			adsText = node;
		}else if( adsLink == null && node.className == 'entry-content' && node.nodeType == ELEMENT_NODE) //entry-content class div ÀÏ °æ¿ì ÀúÀåÇÑ´Ù.
		{
			adsLink = node;
		}
		
		if( adsText != null && adsLink != null) return;
		
		if( node.hasChildNodes()) //ÀÚ½Ä ³ëµå°¡ ÀÖÀ» °æ¿ì Ã¹ ÀÚ½Ä ³ëµå·Î Àç±ÍÈ£ÃâÇÑ´Ù.
		{
			searchArticle( node.childNodes[0])
		}
		
		if( node.nextSibling != null) //´ÙÀ½ ³ëµå°¡ ÀÖÀ» °æ¿ì ´ÙÀ½ ³ëµå·Î Àç±ÍÈ£ÃâÇÑ´Ù.
		{
			node = node.nextSibling;
			searchArticle( node);
		}
	}
	
	window.onload = function()
	{
		var adText = document.getElementById('adSense_text');
		var adLink = document.getElementById('adSense_link');
		searchArticle( document.getElementById( 'content'));
		
		var displayValue = 'table'; // default
		if( navigator.appVersion.indexOf("MSIE 8") < 0) // not IE8
		{
			if( navigator.appVersion.indexOf("MSIE 6") > -1
				|| navigator.appVersion.indexOf("MSIE 7") > -1) // IE6 or 7?
			{
				displayValue = 'table-header-group';
			}
		}
		
		if( adsText != null)
		{
			adsText.appendChild( adText); //textÇüÅÂÀÇ ±¤°í
			adText.style.display = displayValue; //¸ðµç ÀÛ¾÷À» ¿Ï·áÇÏ°í ±¤°í div¸¦ Ç¥½ÃÇÕ´Ï´Ù.(´Ù¸¥ objectÀÇ Ä§¹üÀ» ¸·´Â´Ù.)
		}
		if( adsLink != null) 
		{
			adsLink.appendChild( adLink); //linkÇüÅÂÀÇ ±¤°í
			adLink.style.display = displayValue; //¸ðµç ÀÛ¾÷À» ¿Ï·áÇÏ°í ±¤°í div¸¦ Ç¥½ÃÇÕ´Ï´Ù.(´Ù¸¥ objectÀÇ Ä§¹üÀ» ¸·´Â´Ù.)
		}
	}
</script>

<div id="adSense_text" style="width:100%; display:none;">
	<div id="adSense_text1" style="float: left;">
		<!-- ÀÌ°÷¿¡ »ó´Ü ÁÂÃøÀÇ ÅØ½ºÆ® ±¤°í ÄÚµå¸¦ »ðÀÔÇÕ´Ï´Ù. -->
	</div>
	<div id="adSense_text2" style="float:right;">
		<!-- ÀÌ°÷¿¡ »ó´Ü ¿ìÃøÀÇ ÅØ½ºÆ® ±¤°í ÄÚµå¸¦ »ðÀÔÇÕ´Ï´Ù. -->
	</div>
</div>

<div id="adSense_link" style="width:100%; display:none;">
	<div id="adSense_link1">
		<!-- ÀÌ°÷¿¡ ÇÏ´ÜÀÇ ¸µÅ© ±¤°í ÄÚµå¸¦ »ðÀÔÇÕ´Ï´Ù. -->
	</div>
</div>
