/**************************************************************
1. ¼½¼Çº° ÀÌ¸§ ¾²±â
2. ÀÛ¼ºÀÚ : 2009.03.16 Append by KMS
3. »ç¿ë¹ý
**************************************************************/
function SetSectionName(){
	try{
		var szSecName;
		// szSecName=document.getElementById('SectionName');
		if(szSection=="economy") szSecName="<a href=\"/economy/economy.htm\">°æÁ¦</a>";
		else if (szSection=="stock") szSecName="<a href=\"/stock/stock.htm\">Áõ±Ç</a>";
		else if (szSection=="estate") szSecName="<a href=\"/estate/estate.htm\">ºÎµ¿»ê</a>";
		else if (szSection=="industry") szSecName="<a href=\"/industry/industry.htm\">»ê¾÷</a>";
		else if (szSection=="worldecono") szSecName="<a href=\"/worldecono/world.htm\">±¹Á¦</a>";
		else if (szSection=="politics") szSecName="<a href=\"/politics/politics.htm\">Á¤Ä¡</a>";
		else if (szSection=="society") szSecName="<a href=\"/society/society.htm\">»çÈ¸</a>";
		else if (szSection=="entv") szSecName="<a href=\"/entv/entv.htm\">¹®È­&nbsp;&#149;&nbsp;½ºÆ÷Ã÷</a>";
		else if (szSection=="opinion") szSecName="<a href=\"/opinion/opinion.htm\">¿ÀÇÇ´Ï¾ð</a>";
		else szSecName="<a href=\"/economy/economy.htm\">°æÁ¦</a>";
		document.write(szSecName);
	}catch(e){}
}

/**************************************************************
1. Font Size Á¶Àý
2. ÀÛ¼ºÀÚ : 2007.11.12 Append by KMS
3. »ç¿ë¹ý
	GisaFont = new SetFontSize();			// ÅÇ ÇÔ¼ö ¼±¾ð
	GisaFont.name = "GisaFont";				// ÅÇ ÇÔ¼ö ÀÌ¸§ ¼±¾ð
	GisaFont.scaleFont(1);						// ÆùÆ® »çÀÌÁî Á¶Àý(-1: 1°¨¼Ò,1: 1Áõ°¡)
**************************************************************/
function SetFontSize(){
	this.fontSize;
	this.version = "0.1";
	this.name = "SetFontSize";
	
	this.getFontCookie = function(){
		var cookie = getCookie("cur_font_size");
		if ( cookie == null ) {
			return 13;
		}
		if ( cookie.length ){return cookie;
		}else{ return 13;}
	};
	this.scaleFont = function(val){
		var content, lineHeight;
		if(document.getElementById("content")){
			content = document.getElementById("content");
		}else{
			content = document.getElementById("GS_Content");
		}
		if (val > 0){
			if (this.fontSize <= 18) {
				this.fontSize = this.fontSize + val;
				lineHeight = this.fontSize+Math.round(1.1*this.fontSize);
				content.style.fontSize = this.fontSize + "px";
			}
		} else {
			if (this.fontSize > 13) {
				this.fontSize = this.fontSize + val;
				lineHeight = this.fontSize+Math.round(1.1*this.fontSize);
				content.style.fontSize = this.fontSize + "px";
			}
		}
		var mydate = new Date;
		mydate.setDate(mydate.getDate()+1000);
		setCookie("cur_font_size", this.fontSize, mydate);
	};
	this.fontSize= parseInt(this.getFontCookie());
}

/**************************************************************
1. ±â»ç¸ÞÀÏ º¸³»±â
2. ÀÛ¼ºÀÚ : 2007.11.12 Append by KMS
3. »ç¿ë¹ý
	GisaMail(uid,path) //uid : ±â»ç ¾ÆÀÌµð, path : °æ·Î(0631)
**************************************************************/
function GisaMail(uid,path){
	this.Cookievalue;
	this.urls = location.host + location.pathname + location.search;
	this.Cookievalue = GetCookie('mlogin_cookie');
	this.TimetoString = function(date) {
    		var year  = date.getFullYear();
    		var month = date.getMonth() + 1; // 1¿ù=0,12¿ù=11ÀÌ¹Ç·Î 1 ´õÇÔ
    		var day   = date.getDate();
    		var hour  = date.getHours();
    		var min   = date.getMinutes();
    		var sec   = date.getSeconds();
		var rnd_val = Math.ceil(100*Math.random());
		if (("" + month).length == 1) { month = "0" + month; }
		if (("" + day).length   == 1) { day   = "0" + day;   }
		if (("" + hour).length  == 1) { hour  = "0" + hour;  }
		if (("" + min).length   == 1) { min   = "0" + min;   }
		if (("" + sec).length   == 1) { sec   = "0" + sec;   }
		if (("" + rnd_val).length   == 1) { rnd_val   = "0" + rnd_val;   }
		return ("" + year + month + day + hour + min + sec + rnd_val)
	}
	this.SetGisaMailCookie = function(name, value, expmimutes) {
  		var todayDate = new Date(); 
  		todayDate.setMinutes( todayDate.getMinutes() +  expmimutes);
  		document.cookie = name + "=" + value + "; path=/; expires=" + todayDate.toGMTString() + ";domain=.hankooki.com";
	}
	if(this.Cookievalue == "") {
		alert("È¸¿ø·Î±×ÀÎÀ» ÇÏ¼Å¾ß º¼¼ö ÀÖ´Â ÆäÀÌÁö ÀÔ´Ï´Ù.");
		location.href="http://member.hankooki.com/member/login.php?path="+path+"&url=" + this.urls;
	}else{
		//Á¤»óÀûÀÎ ¹æ¹ýÀ¸·Î Ã¢À» ¶ç¿ü´ÂÁö È®ÀÎÇÏ±â À§ÇØ Äí±â ÀÌ¿ë
		tmp = new Date();    
		cookval=this.TimetoString(tmp);
		this.SetGisaMailCookie("GisaMail",cookval,10); 
		mailurl = "http://www.hankooki.com/common/GisaMail/GisaMailForm.php?uid="+uid+"&certify="+cookval;
		MM_openBrWindow(mailurl, 'WinGisaMail','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=100,top=10,width=602,height=427');
	}
}

/**************************************************************
1. ±â»ç ÇÁ¸°Æ®
2. ÀÛ¼ºÀÚ : 2007.11.12 Append by KMS
3. »ç¿ë¹ý
	PrintOpen(srcurl) //srcurl : ÇÁ¸°Æ® ÇÒ URL
**************************************************************/
function PrintOpen(srcurl){
	printurl = "/service/print/Print.php?po="+srcurl;
	MM_openBrWindow(printurl, '','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=100,top=10,width=700,height=758');
}

/**************************************************************
1. ±â»ç ÇÁ¸°Æ®,ÀÌ¸ÞÀÏ, ÆùÆ® »çÀÌÁî Á¶Àý
2. ÀÛ¼ºÀÚ : 2007.11.15 Append by KMS
3. »ç¿ë¹ý
	SetGisaPrintForm(LayerID,GSURL,GSNO) //(·¹ÀÌ¾î ¾ÆÀÌµð,ÇÁ¸°Æ® ÇÒ URL,±â»ç ¹øÈ£)
**************************************************************/
function SetGisaPrintForm(LayerID,GSURL,GSNO){
		var gisaprint="";
		GisaFont = new SetFontSize();			// ÅÇ ÇÔ¼ö ¼±¾ð
		GisaFont.name = "GisaFont";				// ÅÇ ÇÔ¼ö ÀÌ¸§ ¼±¾ð
	
		gisaprint +="<table border=0 cellpadding=0 cellspacing=0>\n";
		gisaprint +="<tr>\n";
		gisaprint +="<td width=42><a href=\"javascript:GisaFont.scaleFont(1);\"><img src=\"http://img.hankooki.com/news/2009/02/btn_view_1.gif\" border=\"0\"></a></td>\n";
		gisaprint +="<td width=42><a href=\"javascript:GisaFont.scaleFont(-1);\"><img src=\"http://img.hankooki.com/news/2009/02/btn_view_2.gif\" border=\"0\"></a></td>\n";
		gisaprint +="<td width=25><a href=\"javascript:PrintOpen('"+GSURL+"');\"><img src=\"http://img.hankooki.com/news/2009/02/btn_view_3.gif\" border=0></a></td>\n";
		gisaprint +="<td width=25><a href=\"javascript:GisaMail('"+GSNO+"','0501');\"><img src=\"http://img.hankooki.com/news/2009/02/btn_view_4.gif\" border=0></a></td>\n";
		gisaprint +="</tr>\n";
		gisaprint +="</table>\n";
		if(document.getElementById(LayerID)){
			document.getElementById(LayerID).innerHTML=gisaprint;
		}
}

/**************************************************************
1. ÆÄÀÏ¼öÁ¤½Ã°£ ¾ò±â
2. ÀÛ¼ºÀÚ : 2007.11.20 Append by KMS
3. »ç¿ë¹ý
	SetFileModify() //(·¹ÀÌ¾î ¾ÆÀÌµð,ÇÁ¸°Æ® ÇÒ URL,±â»ç ¹øÈ£)
**************************************************************/
function SetFileModify(){
	var ModifyTime=document.lastModified;
	mod_year =ModifyTime.substr(6,4);
	mod_month =ModifyTime.substr(0,2);
	mod_day =ModifyTime.substr(3,2);
	mod_hour =ModifyTime.substr(11,2);
	mod_minute =ModifyTime.substr(14,2);
	mod_second =ModifyTime.substr(17,2);
	mod_tot=mod_year+'/'+mod_month+'/'+mod_day+' '+mod_hour+':'+mod_minute+':'+mod_second;

	//ÆÄÀÏ»ý¼º½Ã°£ ÆÄÀÏ·ÎºÎÅÍ ¾ò±â
	var crt_temp = document.URL;
	var end_pt = crt_temp.lastIndexOf('.htm');
	crt_year = crt_temp.substr(end_pt-19,4);
	crt_month = crt_temp.substr(end_pt-15,2);
	crt_day = crt_temp.substr(end_pt-13,2);
	crt_hour = crt_temp.substr(end_pt-11,2);
	crt_minute = crt_temp.substr(end_pt-9,2);
	crt_second = crt_temp.substr(end_pt-7,2);
	crt_tot=crt_year+'/'+crt_month+'/'+crt_day+' '+crt_hour+':'+crt_minute+':'+crt_second;

	mod_make = new Date(mod_year,mod_month-1, mod_day, mod_hour,mod_minute);
	crt_make = new Date(crt_year,crt_month-1,crt_day,crt_hour,crt_minute);
	rem_min = (mod_make - crt_make) / 1000 /60;

	if(rem_min >= 3){
		mod_text="¼öÁ¤½Ã°£ : "+mod_tot;
		if(document.getElementById('modify_gisa')){
			document.getElementById('modify_gisa').innerHTML=mod_text;
		}
	}
}

/**************************************************************
1. ÆÄÀÏ ÀÔ·Â½Ã°£
2. ÀÛ¼ºÀÚ : 2009.02.26 Append by KMS
3. »ç¿ë¹ý
	Input_Time() //(·¹ÀÌ¾î ¾ÆÀÌµð,ÇÁ¸°Æ® ÇÒ URL,±â»ç ¹øÈ£)
**************************************************************/
function Input_Time(intime){
	var Time_Data="<table width=\"579\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	Time_Data = Time_Data +"<tr>";
	Time_Data = Time_Data +"<td height=\"30\" align=\"left\"> ";
	Time_Data = Time_Data +"<font color=\"585858\">ÀÔ·Â½Ã°£ : "+intime+" <span id=modify_gisa></span></font>";
	Time_Data = Time_Data +"</td>";
	Time_Data = Time_Data +"<td width=150 align=\"right\"><a href=\"http://news.hankooki.com\"><img src=\"http://img.hankooki.com/news/2007/12/btn_newshome.gif\" width=\"91\" height=\"19\" border=0></a><a href=\"#\"><img src=\"http://img.hankooki.com/news/2007/12/btn_top.gif\" width=\"59\" height=\"19\" border=0></a></td>";
	Time_Data = Time_Data +"</tr>";
	Time_Data = Time_Data +"</table>";
	if(document.getElementById('Input_Time')){
		//±â»ç ÀÔ·Â½Ã°£
		document.getElementById('Input_Time').innerHTML=Time_Data;
	}
	if(document.getElementById('modify_gisa')){
		//±â»ç ¼öÁ¤½Ã°£
		SetFileModify();
	}
}

/**************************************************************
1. °ü·Ã ÀÌ¹ÌÁö È®´ë º¸±â
2. ÀÛ¼ºÀÚ : 2009.02.26 Append by KMS
3. »ç¿ë¹ý
	ImageGoUrl()-Å¬¸¯URL,ImageClose() - ´Ý±â,ImageOpen - ¿­±â
**************************************************************/
function ImageGoUrl(gourl){
	document.getElementById('PhotoView').style.display="none";
	location.href=gourl;
}
function ImageClose(){
	document.getElementById('PhotoView').style.display="none";
}
function ImageOpen(pUrl,EncPhotoSummary,clickevent){
	var PhotoSummary;
	var imgT;
	photourl=pUrl.replace("http://", "");
	PhotoSummary=decodeURI(EncPhotoSummary);

	var newImg = new Image(); 
	newImg.src = "http://"+photourl; 
	var imgW = newImg.width; 
	var imgH = newImg.height;
	if(imgW > 600){
		imgW = 598;
		imgH = Math.ceil((newImg.height*800)/newImg.width);
	}
	var FrameH = imgH + 300;
		
	var PhotoView_Data="";
	PhotoView_Data=PhotoView_Data+"<div class=\"BigPhoto_contain\">";
	PhotoView_Data=PhotoView_Data+"<h2 class=\"BigPhoto_title01\"><img src=http://img.hankooki.com/news/2008/08/view_photo_02.jpg border=0 usemap=\"#PhotoViewTit\"></h2>";
	PhotoView_Data=PhotoView_Data+"<div class=\"BigPhoto_containBG\">";
	PhotoView_Data=PhotoView_Data+"	<iframe src='http://www.hankooki.com/common/PhotoView/PhotoList.htm' width=598 height=75 frameborder=0 scrolling=no></iframe>";
	PhotoView_Data=PhotoView_Data+" <img src=\"http://"+photourl+"\" width="+imgW+" onclick=\"ImageClose()\" border=\"0\">";
	PhotoView_Data=PhotoView_Data+"</div>";
	PhotoView_Data=PhotoView_Data+"	<div class=\"BigPhoto_description\">"+PhotoSummary+"</div>";
	PhotoView_Data=PhotoView_Data+"</div>";
	PhotoView_Data=PhotoView_Data+"<map name=\"PhotoViewTit\"><area shape=\"rect\" coords=\"571,6,593,30\" href=\"#\" onclick=\"ImageClose()\"></map>";

	document.getElementById('PhotoView').innerHTML=PhotoView_Data;
	// PhotoView.style.top=clickevent.y+document.body.scrollTop - 100;
	if (typeof(window.pageYOffset) == "number") {
		imgT =  window.pageYOffset+ 50;
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		imgT = document.documentElement.scrollTop+ 50;
	} else {
		imgT = 0;
	}
	document.getElementById('PhotoView').style.top=imgT+"px";
	document.getElementById('PhotoView').style.left="100px";
	document.getElementById('PhotoView').style.display="";
}

/**************************************************************
1. °ü·Ã ÀÌ¹ÌÁö º¸±â
2. ÀÛ¼ºÀÚ : 2009.02.26 Append by KMS
3. »ç¿ë¹ý
	ImageView(ÀÌ¹ÌÁöURL,ÀÌ¹ÌÁö ¾ÆÀÌµð, Á¤·Ä, ÀÌ¹ÌÁö »çÀÌÁî)
**************************************************************/
function ImageView(PhotoUrl,PhotoID,ImageAlign,ImageSize){
	var PhotoSummary="";
	var EncPhotoSummary="";
	var photo_list="";
	var ToolTip="";
	var SumLay=eval("document.getElementById('Sum_"+PhotoID+"')");

	if(SumLay){
		try{
			if(SumLay.outerHTML){
				PhotoSummary=SumLay.outerHTML;
				PhotoSummary=PhotoSummary.replace("</DIV>","");
			}else{
				outData=(new XMLSerializer).serializeToString(SumLay);
				PhotoSummary=PhotoSummary.replace("</DIV>","");
			}
			objStrip = /<( )*DIV([^>])*>/gi;
			PhotoSummary = PhotoSummary.replace(objStrip, "");
		}catch (e){
			PhotoSummary=" ";
		}
		EncPhotoSummary=encodeURI(PhotoSummary);
		var re=/'/g;
		EncPhotoSummary=EncPhotoSummary.replace(re,"\\\'");
	}
	try{
		var szPhoto=eval("document.getElementById('"+PhotoID+"')");
		var TWidth1=new Number(ImageSize)+20;
		var TWidth2=new Number(ImageSize)+14;
		var TWidth3=new Number(ImageSize);
		if(ImageAlign=="default"){
			ImageAlign="center";
			document.getElementById('GS_RelPhoto').style.width="280px";
			ToolTip="<div id=Tool_"+PhotoID+" class=\"ToolBox\"></div>";
		}else if(ImageAlign=="center"){
			szPhoto.style.width="700px";
			szPhoto.style.display="block";
			szPhoto.style.float="center";
		}else{
			szPhoto.style.width="280px";
			szPhoto.style.display="block";
			szPhoto.style.float="center";
		}
  	
		photo_list ="<table width=\""+TWidth1+"\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#F0F1F0\" align=\""+ImageAlign+"\">";
		photo_list +="<tr> ";
		photo_list +=" <td >";
		photo_list +="	<table width=\""+TWidth2+"\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#E1E1E1\">";
		photo_list +="	<tr> ";
		photo_list +="	 <td align=\"center\" bgcolor=\"#FFFFFF\">";
		photo_list +="		<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"268\">";
		photo_list +="		<tr> ";
		photo_list +="		 <td><div style=\"POSITION: relative;width:"+TWidth3+"px;\">"+ToolTip+"<div id=SmallPhoto><img src=\""+PhotoUrl+"\" border=0 width="+ImageSize+" onclick=\"ImageOpen('"+PhotoUrl+"','"+EncPhotoSummary+"',event)\" style=\"cursor:pointer\" alt='Å¬¸¯ÇÏ½Ã¸é ¿øº» ÀÌ¹ÌÁö¸¦ º¸½Ç¼ö ÀÖ½À´Ï´Ù'></div></div></td>";
		photo_list +="		</tr>";
		if(PhotoSummary !="" && PhotoSummary != undefined && PhotoSummary != "\r\n"){
			photo_list +="		<tr> ";
			photo_list +="		 <td style='padding:10px 5px 5px 5px;'><div class='Rel_Summary'>"+PhotoSummary+"</div></td>";
			photo_list +="		</tr>";
		}
		photo_list +="		</table>";
		photo_list +="	 </td>";
		photo_list +="	</tr>";
		photo_list +="	</table>";
		photo_list +=" </td>";
		photo_list +="</tr>";
		photo_list +="</table><p style='margin-top:5px'>";
  	
		if(ImageAlign=="center"){
			eval("document.getElementById('Sum_"+PhotoID+"')").style.width="579px";
		}
		eval("document.getElementById('Sum_"+PhotoID+"')").style.float=ImageAlign;
		document.write(photo_list);
		if(PhotoID==GetFirstPhoto()){
			szPhoto.style.display='inline';
		}
	}catch(E){}
}
function ChangePhoto(layerID)
{
	var n= document.getElementById('GS_RelPhoto');
	var children=n.childNodes;
	for(var i=0;i<children.length;i++){
		if(children[i].nodeName=="DIV"){
			if(children[i].id != "Gisa_NPMid_Ad26080"){
				var szID=children[i].id;
				if(szID==layerID){
					children[i].style.display='inline';
				}else{
					children[i].style.display='none';
				}
			}
		}
	}
}
function GetFirstPhoto()
{
	var j=0;
	var firstID="";
	try
	{
		var n= document.getElementById('GS_RelPhoto');
		var children=n.childNodes;
		for(var i=0;i<children.length;i++){
			if(children[i].nodeName=="DIV" && children[i].id != "Gisa_NPMid_Ad26080"){
				j++;
				if(j==1) firstID=children[i].id;
				else break;
			}
		}
		return firstID;
	}catch (E){return "";}
}
function GetImageList(k)
{
	var imgList="";
	var j=0;
	try
	{
		var n= document.getElementById('GS_RelPhoto');
		var children=n.childNodes;
		for(var i=0;i<children.length;i++){
			if(children[i].nodeName=="DIV" && children[i].id != "Gisa_NPMid_Ad26080"){
				j++;
				if(j==k) imgList +="<span id=ListNum_"+children[i].id+" onmouseover=\"ChangePhoto('"+children[i].id+"')\" class=\"selPhoto\">"+j+"</span>&nbsp;";
				else imgList +="<span id=ListNum_"+children[i].id+" onmouseover=\"ChangePhoto('"+children[i].id+"')\" class=\"noselPhoto\">"+j+"</span>&nbsp;";
			}
		}
		return imgList;
	}catch (E){return "";}
}
function SetImageList()
{
	var imgList="";
	var j=0;
	try
	{
		var n= document.getElementById('GS_RelPhoto');
		var children=n.childNodes;
		for(var i=0;i<children.length;i++){
			if(children[i].nodeName=="DIV" && children[i].id != "Gisa_NPMid_Ad26080"){
				j++;
				imgList=GetImageList(j);
				eval("document.getElementById('Tool_"+children[i].id+"')").innerHTML=imgList;
			}
		}
	}catch (E){}
}

/**************************************************************
1. °ü·Ã»çÁø ÀÖÀ»¶§ ±¤°í Æû
2. ÀÛ¼ºÀÚ : 2009.02.26 Append by KMS
3. »ç¿ë¹ý
	SetAdFormWithPhoto(±¤°í URL)
**************************************************************/
function SetAdFormWithPhoto(AdUrl,W,H)
{
	var adformList="";
	adformList ="<table width=\"280\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" bgcolor=\"#F0F1F0\" align=\"right\">";
	adformList +="<tr> ";
	adformList +=" <td align=\"center\">";
	adformList +="	<table width=\"274\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#E1E1E1\"  align=\"right\">";
	adformList +="	<tr> ";
	adformList +="	 <td align=\"right\" bgcolor=\"#FFFFFF\">";
	adformList +="		<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"187\">";
	adformList +="		<tr> ";
	adformList +="		 <td align=\"center\"><iframe id=frm_P26080 frameborder=0 scrolling=no height="+H+" width="+W+" marginheight=0 marginwidth=0 src="+AdUrl+"></iframe></td>";
	adformList +="		</tr>";
	adformList +="		</table>";
	adformList +="	 </td>";
	adformList +="	</tr>";
	adformList +="	</table>";
	adformList +=" </td>";
	adformList +="</tr>";
	adformList +="</table>";
	return adformList;
}

/**************************************************************
1. ÀÎ±â/ °ü·Ã±â»ç º¸±â
2. ÀÛ¼ºÀÚ : 2009.02.26 Append by KMS
3. »ç¿ë¹ý
	SetPopRelList()
**************************************************************/
function GetHtmlDataFromLayer(LayerID)
{
	try{
		var outData="";
		var n= eval("document.getElementById('"+LayerID+"')");
		if (n.outerHTML) {
			outData=n.outerHTML;
			//outData=outData.replace("<DIV style=\"DISPLAY: none\" id="+LayerID+">","");
			outData=outData.replace("</DIV>","");
		} else {
			outData=(new XMLSerializer).serializeToString(n);
			//outData=outData.replace("<DIV style=\"display: none\" id=\""+LayerID+"\">","");
			outData=outData.replace("</DIV>","");
		}
		objStrip = /<( )*DIV([^>])*>/gi;
		outData = outData.replace(objStrip, "");

		return outData;
	}catch(e){
		return "";
	}
}

function SetPopRelList()
{
	var IsRelGisa;

	var PopList01="";
	var PopList02="";
	var PopList03="";
	var PopMoreImg="";
	var RelTitle="";

	var RelList01="";
	var RelList02="";
	var RelList03="";
	var RelMoreImg="";

	IsRelGisa=false;
	RelMoreImg ="<div id=\"Rel_GisaTitle2\" class=\"pdhkb10\">&nbsp;</div>";
	//°ü·Ã±â»ç¸®½ºÆ®
	try
	{
		var outData=GetHtmlDataFromLayer("GS_PopRelGisa");			//°ü·Ã±â»ç ¸®½ºÆ®
		var RelTitle=GetHtmlDataFromLayer("GS_PopRelGisatitle");	//°ü·Ã±â»ç Å¸ÀÌÆ²
		outData=outData.replace(/^\s+|\s+$/g, '');
		if(outData != "" && outData != " " && outData){
			var RelList = outData.split("<!-- s -->");
			for(var i=0;i<RelList.length;i++){
				if(i == 0) RelList01 =RelList[i];
				else if (i == 1) RelList02 =RelList[i];
				else if (i == 2) RelList03 =RelList[i];
				else break;
			}
			//°ü·Ã±â»ç°¡ 6°³ ÀÌ»óÀÏ¶§¸¸ ´õº¸±â ¹öÆ°
			if( i == 1) {
				RelMoreImg ="<div id=\"Rel_GisaTitle2\" class=\"pdhkb10\">"+RelTitle+" °ü·Ã±â»ç</div>";
			}else if(i > 1){
				RelMoreImg ="<div id=\"Rel_GisaTitle2\" class=\"pdhkb10\">"+RelTitle+" °ü·Ã±â»ç<img src=\"http://img.hankooki.com/news/2009/02/regisa_more.gif\" align=\"absmiddle\" class=\"mleft5\" onClick='openRellist()' style='cursor:pointer'/></div>";
			}
			//°ü·Ã±â»ç°¡ 12°³ ÀÌÇÏ ÀÏ¶§ ÆË¾÷ µÎÁÙ·Î º¸ÀÌ±â
			if(PopList03 != ""){
				RelList03=RelList02;
				RelList02=RelList01;
			}
			IsRelGisa=true;
		}else{
		}
		
	}catch(E){
	}

	//ÀÎ±â±â»ç ¸®½ºÆ®
	try
	{
		for(i=0;i<gstitle.length;i++)
		{
			if(i < 6) PopList01 +="<a href=\""+gsurl[i]+"\" target=_top><span id=\"Rel_GisaLine\"> "+gstitle[i]+"</span></a><br>";
			else if (i >= 6 && i <12) PopList02 +="<a href=\""+gsurl[i]+"\" target=_top><span id=\"Rel_GisaLine\"> "+gstitle[i]+"</span></a><br>";
			else if (i >= 12 && i <18) PopList03 +="<a href=\""+gsurl[i]+"\" target=_top><span id=\"Rel_GisaLine\"> "+gstitle[i]+"</span></a><br>";
			else break;
		}
		//°ü·Ã±â»ç ¾øÀ»¶§ ¿À¸¥ÂÊ ºÎºÐ ÀÎ±â±â»ç·Î Ã¼¿ò
		if(IsRelGisa==false){
			RelList01=PopList02;
		}

		//ÀÎ±â±â»ç°¡ 6°³ ÀÌ»óÀÏ¶§¸¸ ´õº¸±â ¹öÆ°
		if(i >= 6) PopMoreImg ="<img src=\"http://img.hankooki.com/news/2009/02/regisa_more.gif\" align=\"absmiddle\" class=\"mleft5\" onClick='openPoplist()' style='cursor:pointer'/>";
		
		//ÀÎ±â±â»ç°¡ 12°³ ÀÌÇÏ ÀÏ¶§ ÆË¾÷ µÎÁÙ·Î º¸ÀÌ±â
		if(PopList03 == ""){
			PopList03=PopList02;
			PopList02=PopList01;
		}
		
		var popTotList="<div id=\"GS_RelGisa\">";
		popTotList += "<div style='display:none' id='popshowlist'>";
		popTotList += "	<div id=\"Pop_GisaTitle2\" class=\"pdhkb10\"><span style=\"float:left;\">ÀÎ±â±â»ç ¸®½ºÆ®</span><img style='cursor:pointer;' src='http://img.hankooki.com/news/2009/02/regisa_close.gif' onClick='closePopRellist()'></div>";
		popTotList += "	<ul>";
		popTotList += "		<li>";
		popTotList += "		<!-- ¸®½ºÆ® ÁÂÃø -->";
		popTotList += 		PopList02;
		popTotList += "		<!-- //¸®½ºÆ® ÁÂÃø -->";
		popTotList += "		</li>";
		popTotList += "		<li>";
		popTotList += "		<!-- ¸®½ºÆ® ¿ìÃø -->";
		popTotList += 		PopList03;
		popTotList += "		<!-- //¸®½ºÆ® ¿ìÃø -->";
		popTotList += "		</li>";
		popTotList += "	</ul> ";
		popTotList += "</div>";
		popTotList += "<div style='display:none' id='relshowlist'>";
		popTotList += "	<div id=\"Pop_GisaTitle2\" class=\"pdhkb10\"><span style=\"float:left;color:#f16d1a;\">°ü·Ã±â»ç ¸®½ºÆ®</span><img style='cursor:pointer' src='http://img.hankooki.com/news/2009/02/regisa_close.gif' onClick='closePopRellist()'></div>";
		popTotList += "	<ul>";
		popTotList += "		<li>";
		popTotList += "		<!-- ¸®½ºÆ® ÁÂÃø -->";
		popTotList += 		RelList02;
		popTotList += "		<!-- //¸®½ºÆ® ÁÂÃø -->";
		popTotList += "		</li>";
		popTotList += "		<li>";
		popTotList += "		<!-- ¸®½ºÆ® ¿ìÃø -->";
		popTotList += 		RelList03;
		popTotList += "		<!-- //¸®½ºÆ® ¿ìÃø -->";
		popTotList += "		</li>";
		popTotList += "	</ul> ";
		popTotList += "</div>";
		popTotList += "<ul>";
		popTotList += "<li>";
		popTotList += "<!-- ÀÎ±â±â»ç -->";
		popTotList += "<div id=\"Pop_GisaTitle2\" class=\"pdhkb10\">ÀÎ±â±â»ç"+PopMoreImg+"</div>";
		popTotList += 		PopList01;
		popTotList += "<!-- //ÀÎ±â±â»ç -->";
		popTotList += "</li>";
		 
		popTotList += "<li>";
		popTotList += "<!-- °ü·Ã±â»ç -->";
		popTotList += RelMoreImg;
		popTotList += RelList01;
		popTotList += "<!-- //°ü·Ã±â»ç -->";
		popTotList += "</li>";
		popTotList += "</ul> ";
		popTotList += "</div>";

		if(document.getElementById('GS_PopRelGisa')){
			document.getElementById('GS_PopRelGisa').innerHTML=popTotList;
			document.getElementById('GS_PopRelGisa').style.display="";
		}
	}catch(E){
	}
}
function openPoplist(){
	document.getElementById('popshowlist').style.display='';
	document.getElementById('relshowlist').style.display='none';
	//document.getElementById('PopRel6').style.display='none';
}
function closePopRellist(){
	document.getElementById('popshowlist').style.display='none';
	document.getElementById('relshowlist').style.display='none';
	//document.getElementById('PopRel6').style.display='';
}
function openRellist(){
	document.getElementById('popshowlist').style.display='none';
	document.getElementById('relshowlist').style.display='';
	//document.getElementById('PopRel6').style.display='none';
}
document.write("<script language=JavaScript src=http://www.hankooki.com/common/popGisa/sk_pop.js></script>");

/**************************************************************
1. ¿ÀÇÇ´Ï¾ð ¸·´Ü¿¡¼­ ÇØ´ç ±â»ç ¸®½ºÆ® º¸±â
2. ÀÛ¼ºÀÚ : 2009.02.26 Append by KMS
3. »ç¿ë¹ý
	GetOpinionBtn(ÇöÀç Å¸ÀÌÆ²)
**************************************************************/
function GetOpinionBtn(cur_title)
{
	var list_gisa;
	if(cur_title .search('±âÀÚÀÇ ´«') > 0) list_gisa="<a href='http://economy.hankooki.com/opinion/column_reporter.htm' target='_top'><img src=http://img.hankooki.com/sedaily/2008/03/btn_collist_01.gif style='margin:3 0 0 0;' border=0></a>";
	else if(cur_title .search('±â°í') > 0) list_gisa="<a href='http://economy.hankooki.com/opinion/contribute.htm' target='_top'><img src=http://img.hankooki.com/sedaily/2008/03/btn_collist_02.gif style='margin:3 0 0 0;' border=0></a>";
	else if(cur_title .search('µ¥½ºÅ© Ä®·³') > 0) list_gisa="<a href='http://economy.hankooki.com/opinion/column_desk.htm' target='_top'><img src=http://img.hankooki.com/sedaily/2008/03/btn_collist_03.gif style='margin:3 0 0 0;' border=0></a>";
	else if(cur_title .search('¼ÛÇöÄ®·³') > 0) list_gisa="<a href='http://economy.hankooki.com/opinion/column_songhyun.htm' target='_top'><img src=http://img.hankooki.com/sedaily/2008/03/btn_collist_04.gif style='margin:3 0 0 0;' border=0></a>";
	else if(cur_title .search('µ¿½ÊÀÚ°¢') > 0) list_gisa="<a href='http://economy.hankooki.com/opinion/column_dong.htm' target='_top'><img src=http://img.hankooki.com/sedaily/2008/03/btn_collist_05.gif style='margin:3 0 0 0;' border=0></a>";
	else if(cur_title .search('Å¬¸¯! ¸®¼­Ä¡') > 0) list_gisa="<a href='http://economy.hankooki.com/opinion/column_click.htm' target='_top'><img src=http://img.hankooki.com/sedaily/2008/03/btn_collist_06.gif style='margin:3 0 0 0;' border=0></a>";
	else list_gisa="";

	return list_gisa;
}


/**************************************************************
1. ÆÄ¿ö ºñÀü ±¤°í ½ÃÀÛ
2. ÀÛ¼ºÀÚ : 2009.02.26 Append by KMS
3. »ç¿ë¹ý
**************************************************************/
var ntom_width = 576;   	//µ¿¿µ»ó °¡·Î »çÀÌÁî
var ntom_height = 324;  	//µ¿¿µ»ó ¼¼·Î »çÀÌÁî
var ntom_top = 1050;    	//ÇÏ´Ü¿¡¼­ºÎÅÍ ÆÄ¿öºñÀü »ó´ÜÀÇ À§Ä¡
var ntom_Full_width = 280;	//È®ÀåÀü µ¿¿µ»ó °¡·Î»çÀÌÁî¿¡¼­ È®ÀåµÇ¸é¼­ ´Ã¾î³¯ »çÀÌÁî ¿¹-512->1008 °æ¿ì 496À¸·Î Àû¾îÁÖ½Ã¸é µË´Ï´Ù.
try {urls=new String(document.location);}
catch(e){
	if(cur_url.search("pstock.co.kr") > 0){
		urls="http://economy.hankooki.com/lpage/economy/";
	}else{
		urls="http://economy.hankooki.com/lpage/etc/";
	}
}
if(urls.search("/economy/") > 0 || 
	urls.search("/stock/") > 0 || 
	urls.search("/estate/") > 0 || 
	urls.search("surenet.hankooki.com") > 0 || 
	urls.search("sizac.hankooki.com") > 0 || 
	urls.search("lands.hankooki.com") > 0 || 
	urls.search("economy.hankooki.com/ad") > 0 || 
	urls.search("/industry/") > 0 ||
	urls.search("/world/") > 0 || 
	urls.search("/worldecono/") > 0){
        var ntom_tag = "http://provider-cdn.ntomap.com/js.mpx/hankooki/economy@power";	//°æÁ¦
}else if(urls.search("/politics/") > 0 ){
        var ntom_tag = "http://provider-cdn.ntomap.com/js.mpx/hankooki/politics@power";	//Á¤Ä¡
}else if(urls.search("/society/") > 0 ){
        var ntom_tag = "http://provider-cdn.ntomap.com/js.mpx/hankooki/national@power";	//»çÈ¸/¹®È­
}else if(urls.search("/entv/") > 0 ){
        var ntom_tag = "http://provider-cdn.ntomap.com/js.mpx/hankooki/sports@power";	//½ºÆ÷Ã÷
}else{
        var ntom_tag = "http://provider-cdn.ntomap.com/js.mpx/hankooki/etc@power";	//±âÅ¸
}
