var outbanner_toast_file_path = []; var outbanner_toast_link = []; var outbanner_toast_codes = []; outbanner_toast_file_path[0] = 'http://outbanner.hu.co.kr/@files/human_banner_file/2018/20180706/banner20180706152313.png'; outbanner_toast_link[0] = 'http://wrd.appstory.co.kr/rd.flad?n=36581'; outbanner_toast_codes[0] = '36581'; outbanner_toast_file_path[1] = 'http://outbanner.hu.co.kr/@files/human_banner_file/2018/20180716/banner20180716174323.png'; outbanner_toast_link[1] = 'http://wrd.appstory.co.kr/rd.flad?n=36756'; outbanner_toast_codes[1] = '36756'; var toast_rand_num = Math.floor((Math.random()*outbanner_toast_codes.length)); var layer_banner_name = "dt_banner_layout"; var backup_layer_banner_name = ''; /* 디지털타임즈에 들어가 배너 */ function cross_hide_shape(){ document.getElementById(layer_banner_name).style.display = 'none'; } /* 쿠키생성함수 */ function setCookie_dt(name,value,expiredays) { var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" } //쿠키값가져오기 function getCookie_dt (cookieName) { var cookieValue = null; var posName = document.cookie.indexOf(escape(cookieName) + '='); if (posName != -1) { var posValue = posName + (escape(cookieName) + '=').length; var endPos = document.cookie.indexOf(';', posValue); if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos)); else cookieValue = unescape(document.cookie.substring(posValue)); } return cookieValue; } function today_close_banner(){ setCookie_dt('dtbanner_cookie','done',1); cross_hide_shape(); } var banner_tag = ''; banner_tag += ''; document.write(banner_tag); var cookiedata = document.cookie; /*배너높이*/ var currentPosition = 220; var move_banner_mode = ''; var scroll_state = 'off'; var doctype = 1; if($.browser.msie==true){ doctype = 2;//익스플로러 //if(navigator.appVersion.indexOf('Trident/7.0') >= 0)doctype = 1;//익스11은 허용 } function go_move_banner() { if(scroll_state == 'off')return;//7초후 실행 if(doctype == '1'){//jquery 1.7대에는 $(window).scrollTop 버그가 있는데 디타에서 안바꾸고 있어 윈도우에서만 처리 var scroll_top = parseInt($(window).scrollTop()); }else{ var scroll_top = parseInt($("html, body").scrollTop()); } if(scroll_top == 0){ var scroll_top = parseInt(document.documentElement.scrollTop); } //console.log(scroll_top); var window_height = window.innerHeight ? window.innerHeight : $(window).height(); if(doctype == '1'){//jquery 1.7대에는 $(window).scrollTop 버그가 있는데 디타에서 안바꾸고 있어 윈도우에서만 처리 var move_top = scroll_top+window_height-currentPosition; // 현재 스크롤바의 위치값을 반환합니다. }else{ var move_top = scroll_top+window_height-currentPosition; // 현재 스크롤바의 위치값을 반환합니다. } //디지털타임즈 하단광고로 96픽셀 위로 올린다 2017-03-09 권오용 move_top = move_top-96; /*제일 처음엔 아래서 올라오게 한다*/ if(move_banner_mode == ''){ var default_top = move_top+(currentPosition*2); $("#"+layer_banner_name).css({"top":default_top+"px"}); $("#"+layer_banner_name).show(); move_banner_mode = 1; $("#"+layer_banner_name).stop().animate({"top":move_top+"px"},2000); }else{ $("#"+layer_banner_name).stop().animate({"top":move_top+"px"},1000); } } if ( cookiedata.indexOf("dtbanner_cookie=done") < 0 ){//오늘 하루 안띄움 쿠키가 없을때 $(document).ready(function(){ $(window).scroll(function(){go_move_banner()}); }); /* setTimeout(function(){scroll_state = 'on';go_move_banner(); document.getElementById('logcount_img').src = 'http://outbanner.hu.co.kr/@files/banner/dt_logcount.proc.php?code='; }, 7000); */ scroll_state = 'on'; go_move_banner(); document.getElementById('logcount_img').src = 'http://logbanner.hu.co.kr/@files/human_banner/dt_logcount.proc.php?code='+outbanner_toast_codes[toast_rand_num]; } function clickcount_dt_toast(code){ $("#clickcount_dt_toast_img").attr('src', 'http://logbanner.hu.co.kr/@files/human_banner/dt_logcount.proc.php?type=clickcount&code='+code); }