function setCookie(name,value,expires) { document.cookie=name + "=" + escape(value) + ((expires == null)? "" : (" ; expires=" + expires.toGMTString())); } 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){ var end = document.cookie.indexOf(";",j); if(end == -1) end = document.cookie.length; return unescape(document.cookie.substring(j,end)); } i=document.cookie.indexOf(" ",i)+1; if (i==0) break; } return null; } function getFontCookie() { var cookie = getCookie("news_font_size"); if ( cookie == null ) return 16; if ( cookie.length ) return cookie; else return 16; } function scaleFont(val) { var content, lineHeight; content = document.getElementById("content"); if (val > 0) { if (fontSize <= 18) { fontSize = fontSize + val; lineHeight = fontSize+Math.round(1.1*fontSize); content.style.fontSize = fontSize + "px"; } } else { if (fontSize > 12) { fontSize = fontSize + val; lineHeight = fontSize+Math.round(1.1*fontSize); content.style.fontSize = fontSize + "px"; } } var mydate = new Date; mydate.setDate(mydate.getDate()+1000); setCookie("news_font_size", fontSize, mydate); } var fontSize = parseInt(getFontCookie()); function topPage() { document.body.scrollTop = 0; } function bookmark(){ window.external.AddFavorite('http://news.naver.com/', '³×À̹ö ´º½º - ´ç½ÅÀ» À§ÇÑ ¸ðµç ´º½º'); } function VodOpen(url) { if (url) { window.open( url, 'VOD', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=no,scrollbars=yes,width=310,height=230,top=30,left=230'); } } function print(office_id, article_id) { window.open('/print_form.php?office_id='+office_id+'&article_id='+article_id,'win','top=10,left=10,toolbar=no,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=0,width=650,height=500'); } function mail(office_id, article_id) { window.open('/mail_rd.php?office_id='+office_id+'&article_id='+article_id,'win','top=10,left=10,toolbar=no,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=550,height=470'); } function scrap(office_id, article_id) { w = screen.availWidth / 2 - 200; h = screen.availHeight / 2 - 150; window.open('/scrap/action.php?mode=2&office_id='+office_id+'&article_id='+article_id,'win','top='+h+',left='+w+',toolbar=no,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=410,height=270'); } function NewWindow(url) { if (url) { window.open( url, 'VOD', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=no,width=710,height=500,top=30,left=230'); } } function setClientSize( w, h ) { window.resizeBy(w-document.body.clientWidth, h-document.body.clientHeight); } var keyenable = 0; function changeKeywords() { objs = document.getElementsByName("keyword"); if (keyenable) { keyenable = 0; for(i = 0; i < objs.length; i++) { obj = objs[i]; obj.style.color='black'; obj.style.textDecorationNone='true'; } } else { keyenable = 1; for(i = 0; i < objs.length; i++) { obj = objs[i]; obj.style.color='#0033CC'; obj.style.textDecorationUnderline='true'; } var keydate = new Date; keydate.setDate(keydate.getDate()+1000); setCookie("keyenable", keyenable, keydate); } } function KeyOver(obj) { if (keyenable) { obj.style.color='#FF0000'; obj.style.cursor='hand'; }} function KeyOut(obj) { if (keyenable) { obj.style.color='#0033CC'; obj.style.cursor='default'; } } function OnClick(id) { if (keyenable) { window.open( 'http://stock.naver.com/sise/ksc_main.php?code='+id, 'stock' ); } } function MM_swapImgRestore() { var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i" + title + ""; this.itemcount = this.itemcount + 1; }; this.start = function () { if ( this.itemcount == 1 ) { this.add(this.item[0]); } this.display(); this.currentspeed = this.scrollspeed; this.stop = true; setTimeout(this.name+'.scroll()',this.currentspeed); window.setTimeout(this.name+".stop = false", this.pausedelay); }; this.display = function () { document.write('
'); for(var i = 0; i < this.itemcount; i++) { if ( this.type == 1) { document.write('
'); document.write(this.item[i]); document.write('
'); } else if ( this.type == 2 ) { document.write('
'); document.write(this.item[i]); document.write('
'); } } document.write('
'); }; this.scroll = function () { if ( this.pause == true ) { window.setTimeout(this.name+".scroll()",this.pausedelay); this.pause = false; } else { this.currentspeed = this.scrollspeed; if ( !this.stop ) { for (i = 0; i < this.itemcount; i++) { obj = document.getElementById(this.name+'item'+i).style; if ( this.type == 1 ) { obj.top = parseInt(obj.top) - 1; if ( parseInt(obj.top) <= this.height * (-1) ) obj.top = this.height * (this.itemcount-1); if ( parseInt(obj.top) == 0 ) this.currentspeed = this.pausedelay; } else if ( this.type == 2 ) { obj.left = parseInt(obj.left) - 1; if ( parseInt(obj.left) <= this.width * (-1) ) obj.left = this.width * (this.itemcount-1); if ( parseInt(obj.left) == 0 ) this.currentspeed = this.pausedelay; } } } window.setTimeout(this.name+".scroll()",this.currentspeed); } }; this.onmouseover = function () { if ( this.pausemouseover ) { this.stop = true; } }; this.onmouseout = function () { if ( this.pausemouseover ) { this.stop = false; } }; this.next = function() { this.stop = true; for (i = 0; i < this.itemcount; i++) { obj = document.getElementById(this.name+'item'+i).style; if ( parseInt(obj.left) < 1 ) { width = this.width + parseInt(obj.left); break; } } for (i = 0; i < this.itemcount; i++) { obj = document.getElementById(this.name+'item'+i).style; if ( parseInt(obj.left) < 1 ) { obj.left = this.width * (this.itemcount-1); } else { obj.left = parseInt(obj.left) - width; } } this.stop = false; this.pause = true; } this.prev = function() { this.stop = true; for (i = 0; i < this.itemcount; i++) { obj = document.getElementById(this.name+'item'+i).style; if ( parseInt(obj.left) < 1 ) { width = parseInt(obj.left) * (-1); break; } } if ( width == 0 ) { total_width = this.width * (this.itemcount-1); for (i = 0; i < this.itemcount; i++) { obj = document.getElementById(this.name+'item'+i).style; if ( parseInt(obj.left) + 1 > total_width ) { obj.left = 0; } else { obj.left = parseInt(obj.left) + this.width; } } } else { for (i = 0; i < this.itemcount; i++) { obj = document.getElementById(this.name+'item'+i).style; if ( parseInt(obj.left) < 1 ) { obj.left = 0; } else { obj.left = parseInt(obj.left) + width; } } } this.stop = false; this.pause = true; } } function hancoin() { var width = (screen.width / 2) - 800; var height = (screen.height / 2) - 510; window.open("https://billing.naver.com/ips/acct2/acct_main.ips?site=02", "win" , "toolbar=no,scrollbars=yes,width=670,height=485,top="+height+",left="+width); } function cpop() { obj = document.getElementById("blog"); if (obj.style.display == "block") obj.style.display = "none"; else obj.style.display = "block"; } function scrap_blog(target, office_id, article_id) { window.open('/blog.nhn?target='+target+'&office_id='+office_id+'&article_id='+article_id,'win','top=10,left=10,toolbar=no,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=410,height=380'); obj = document.getElementById("blog"); obj.style.display = "none"; } function selectChange(baseUrl, value) { if(value != '') { document.location.href=baseUrl+value; } } function premier(n) { for(var i = 1; i < 4; i++) { obj = document.getElementById('premier'+i); img = document.getElementById('premier_button'+i); if ( obj ) { if ( n == i ) { obj.style.display = "block"; img.height = 21; img.src = "http://imgnews.naver.com/image/news/2004n/tab11on"+i+".gif"; } else { obj.style.display = "none"; img.height = 19; img.src = "http://imgnews.naver.com/image/news/2004n/tab11off"+i+".gif"; } } } } function resizeIFrame2(sFrameName) { var isIE = (navigator.userAgent.toLowerCase().indexOf("msie")!=-1 && window.document.all) ? true:false; var objBody = window.frames[sFrameName].document.body; var objFrame = document.getElementById(sFrameName); if ( objFrame ) { ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight); if (ifrmHeight > 10) { objFrame.style.height = ifrmHeight; } else { objFrame.style.height = 230; } } }