﻿function fn_right_joinsland_top_ad(){
	document.write('<!-- 광고 -->');
	document.write('<div id="ad">');
	document.write('				<iframe frameborder="0" scrolling="no" style="border:0px;margin:0px;padding:0px;width:300px;height:250px;" src="http://land.joinsmsn.com/include/right/ad_portal_right_realestate_300_250.html"></iframe>');
	document.write('</div>');
	document.write('<!-- //광고 -->');
	document.write('<hr />');
}

function fn_right_joinsland_shoppingbox(){
	document.write('<!-- 쇼핑 -->');
	document.write('<div id="shopping_area">');
	document.write('<iframe src="http://shoppingbox.joinsmsn.com/sbox/box/Joinsmsn/SBox" title="쇼핑박스" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>');
	document.write('</div>');
	document.write('<!-- //쇼핑 -->');
	document.write('<hr />');
}

function fn_right_joinsland_sponsor_link(){
	document.write('<!-- 스폰서 링크 -->');
	document.write("<iframe id=\"sponsor_link_right\" src=\"http://static.joinsmsn.com/common/ui/ad/ad_portal_right_sponsor_link.html?purl="+encodeURI(document.location.href)+"\" title=\"스폰서링크\" frameborder=\"0\" scrolling=\"no\"></iframe>");
	document.write('<!-- //스폰서 링크 -->');
}

function fn_right_joinsland_many_news(){
    document.write('	<!-- 많이 본 기사 -->');
	document.write('	<div class="listtype_num" id="land_many">');
	document.write('		<div class="hd"><h2>많이 본 기사</h2></div><!-- /hd -->');
	document.write('		<div class="bd tab_type tab_type3">	');
	document.write('			<h3 class="tab1" id="title_tab1"><a href="#">재테크</a></h3><!-- 클릭시 on 클래스 추가해주세요! -->');
	document.write('			<ol class="ranking list_cr" id="list_tab1"><!-- 탭 클릭시 on 클래스 추가해주세요! -->');
	document.write('			</ol>');
	
	document.write('			<h3 class="tab2 on" id="title_tab2"><a href="#">부동산</a></h3><!-- 클릭시 on 클래스 추가해주세요! -->');
	document.write('			<ol class="ranking list_cr on" id="list_tab2"><!-- 탭 클릭시 on 클래스 추가해주세요! -->');
	document.write('			</ol>');

	document.write('			<h3 class="tab3" id="title_tab3"><a href="#">증권</a></h3><!-- 클릭시 on 클래스 추가해주세요! -->');
	document.write('			<ol class="ranking list_cr" id="list_tab3"><!-- 탭 클릭시 on 클래스 추가해주세요! -->');
	document.write('			</ol>');
	
	document.write('		</div><!-- /bd -->');
	document.write('	</div><!-- //많이 본 기사 -->');
	document.write('	<hr />');	
	
	document.write( "<scr" + "ipt type"+"='text/jav"+"ascript' sr"+"c='http://satic.joinsmsn.com/portal/ui/test_right1.js"+"'></sc"+"ript>");
	document.write('	<hr />');	
	document.write( "<scr" + "ipt type"+"='text/jav"+"ascript' sr"+"c='http://satic.joinsmsn.com/portal/ui/test_right2.js"+"'></sc"+"ript>");
	
	document.write('	<hr />');		

	$.getScript("http://static.joinsmsn.com/portal/data/land/auto/portal_land_ranking_news_1102.js",function() {

		if(typeof(RANKING_JSON_1102) == "undefined") return;
		else tjson = RANKING_JSON_1102;
        var item,count;
		var str1 = "";

		if(tjson.data.length > 10){
			count=10
		}else{ 
			count = tjson.data.length	
		}

		for(i=0;i< count ;i++){
			item = tjson.data[i];
			if(i==4){
			str1= str1+ "<li class=\"divide n"+(i+1)+"\"><a href='http://finance.joinsmsn.com/news_land/article/article.asp?ctg="+item.ctg+"&Total_ID="+item.total_id+"'>"+(item.title).substr(0,20)+".."+"</a></li>";
			
			}
			else{
			str1= str1+ "<li class=\"n"+(i+1)+"\"><a href='http://finance.joinsmsn.com/news_land/article/article.asp?ctg="+item.ctg+"&Total_ID="+item.total_id+"'>"+(item.title).substr(0,20)+".."+"</a></li>";
						}
		}
		
		$("#list_tab1").html(str1);
    });

	$.getScript("http://static.joinsmsn.com/portal/data/land/auto/portal_land_ranking_news_1104.js",function() {

		if(typeof(RANKING_JSON_1104) == "undefined") return;
		else tjson = RANKING_JSON_1104 ;
        var item,count;
		var str2 = "";
		if(tjson.data.length > 10){
			count=10
		}else{ 
			count = tjson.data.length
			}
		
		for(i=0;i< count ;i++){
			item = tjson.data[i];
			if(i==4){
			str2=str2+ "<li class=\"divide n"+(i+1)+"\"><a href='http://finance.joinsmsn.com/news_land/article/article.asp?ctg="+item.ctg+"&Total_ID="+item.total_id+"'>"+(item.title).substr(0,20)+".."+"</a></li>";
			
			}
			else{
			str2= str2+ "<li class=\"n"+(i+1)+"\"><a href='http://finance.joinsmsn.com/news_land/article/article.asp?ctg="+item.ctg+"&Total_ID="+item.total_id+"'>"+(item.title).substr(0,20)+".."+"</a></li>";
						}
		}
		
		$("#list_tab2").html(str2);
    });

	
	$.getScript("http://static.joinsmsn.com/portal/data/land/auto/portal_land_ranking_news_1103.js",function() {

		if(typeof(RANKING_JSON_1103) == "undefined") return;
		else tjson = RANKING_JSON_1103 ;
        var item,count;
		var str3 = "";
		if(tjson.data.length > 10){
			count=10
		}else{ 
			count = tjson.data.length	
		}
		for(i=0;i< count ;i++){
			item = tjson.data[i];
			if(i==4){
			str3= str3+ "<li class=\"divide n"+(i+1)+"\"><a href='http://finance.joinsmsn.com/news_land/article/article.asp?ctg="+item.ctg+"&Total_ID="+item.total_id+"'>"+(item.title).substr(0,20)+".."+"</a></li>";
			
			}
			else{
			str3= str3+ "<li class=\"n"+(i+1)+"\"><a href='http://finance.joinsmsn.com/news_land/article/article.asp?ctg="+item.ctg+"&Total_ID="+item.total_id+"'>"+(item.title).substr(0,20)+".."+"</a></li>";
						}
		}
		
		$("#list_tab3").html(str3);
    });
    
    $(function(){	
		$("#land_many h3").hover(function() {
		var obj = $(this)
		obj.addClass('on');
		obj.siblings().removeClass('on');
		obj.next().addClass(" on");

		});
	});
}
