1/* 2¿ìÃø ¹è³Ê ´ÙÁß»ý¼ºÀ» À§ÇÑ ½ºÅ©¸³Æ®. 32009-02-11, À̽Âȯ 4*/ 5 6// µð¹ö±ë½Ã¿¡ ¹«ÇÑ·çÇÁ¿¡ ºüÁ®¼ ¹«ÇÑ alertÀÌ µÇ´Â°É °Á¦·Î ¸·´Â ½ºÅ©¸³Æ®. »ç¿ë½Ã¿¡ ÇÔ¼ö³¡¿¡ ();¸¦ ºÙÀ̸é Ȱ¼ºÈ µÊ. 7(function() { 8 window._alert = window.alert; 9 window.alert = function(s) { 10 var f = arguments.callee; 11 if (f.ignore) return; 12 f.count = (new Date().getTime() - f.last < 500) ? f.count + 1 : 0; 13 if (f.count >= 5) { 14 if (confirm('¾ÕÀ¸·Î alert ¹«½Ã?')) f.ignore = true; 15 f.count = 0; 16 } 17 18 var r; 19 if (!f.ignore) r = window._alert(s); 20 f.last = new Date().getTime(); 21 return r; 22 }; 23 window.alert.count = 0; 24 window.alert.last = 0; 25})(); 26 27var isDOM = (document.getElementById ? true : false); 28var isNS4 = (document.layers ? true : false); 29var isNS = navigator.appName == "Netscape"; 30var userAgent = navigator.userAgent; 31 32var cherrypicker_check = false; 33/* 34buffer : ÇöÀç js·Î ³Ñ¾î¿Â ¿øº» µ¥ÀÌÅ͸¦ ±×´ë·Î °¡Áö°í ÀÖ´Ù. [ BannerID//filename||subject||leftmenu,BannerID... ] 35entity : ÇöÀç js·Î ³Ñ¾î¿Â µ¥ÀÌÅ͸¦ ºÐÇØÇÏ¿© ¹è¿Á¤º¸·Î °¡Áö°í ÀÖ´Ù. 36moveInfo : °¢°¢ÀÇ ·¹À̾ µ¿½Ã¿¡ ¿òÁ÷ÀÌ´Â È¿°ú¸¦ °¡Áö±â À§ÇØ onresize½Ã¿¡ ¹öÆÛ ¿ªÇÒÀ» ÇÑ´Ù. WindReset() ÂüÁ¶. 37offset_left : makebannerÀÇ offsetLeft ¸¦ ±¸ÇÒ ¼ö ¾øÀ»¶§ getOffsetLeft ¸¦ ÅëÇØ¼ ±¸Çس»´Âµ¥ À̶§¿¡ ÇÊ¿äÇÑ Àü¿ªº¯¼ö 38offset_obj : offset_left ¿Í µ¿ÀÏÇÑ ¸ñÀû 39*/ 40var buffer, entity; 41var moveInfo = new Array(); 42var offset_left = 0; 43var offset_obj = document.getElementById('makebanner'); 44var banner_position_type = 'LEFT'; 45 46if (offset_obj == null && banner_position_type) { 47 offset_obj = document; 48} 49 50var fixed_first = 0; 51// makebannerÀÇ À§Ä¡¸¦ ±¸ÇÒ ¼ö ¾ø´Â »óȲ¿¡¼.. 52/* 53function getOffsetLeft(obj) { 54 var left = 0; 55 if (obj.offsetParent.tagName.toLowerCase() != 'body') { 56 left = getOffsetLeft(obj.offsetParent); 57 } 58 return left + offset_obj.offsetLeft; 59}; 60 61function getOffsetTop(obj) { 62 var top = 0; 63 if (obj.offsetParent.tagName.toLowerCase() != 'body') { 64 top = getOffsetTop(obj.offsetParent); 65 } 66 return top + offset_obj.offsetTop; 67}; 68*/ 69// À§ ÁÖ¼®Ã³¸®ÇÑ ºÎºÐ°ú ºñ½ÁÇϸ鼵µ...Ʋ¸®³×... 70function getOffsetLeft(element) { 71 var valueL = 0; 72 if (document.getElementById('dgnset_wrap') != null && banner_position_type == 'CENTER') { 73 element = document.getElementById('dgnset_wrap'); 74 } 75 if (element == document) { 76 if (banner_position_type == 'CENTER') { 77 valueL = element.body.clientWidth / 2; 78 } 79 } else { 80 do { 81 valueL += element.offsetLeft || 0; 82 element = element.offsetParent; 83 } while (element); 84 } 85 if (document.getElementById('dgnset_wrap') != null && banner_position_type == 'CENTER') { 86 valueL += document.getElementById('dgnset_wrap').style.width ? parseInt(document.getElementById('dgnset_wrap').style.width) / 2 : 0; 87 } 88 89 return valueL; 90} 91 92function getOffsetTop(element) { 93 var valueT = 0; 94 do { 95 valueT += element.offsetTop || 0; 96 element = element.offsetParent; 97 } while (element); 98 return valueT; 99} 100 101// ÃÖÃÊ·Î µ¥ÀÌÅ͸¦ ¹Þ´Â ÇÔ¼ö. ·¹À̾ È£ÃâÇÒ¶§¿¡ ÀÌ ÇÔ¼ö·Î µ¥ÀÌÅ͸¸ ³Ñ°ÜÁÖ¸é µÈ´Ù. 102function BannerHandler(row) { 103 var data = Array(); 104 var row_tmp = row.split(','); 105 buffer = row; 106 HandlerData(); 107 108 // ÇÁ·¹ÀÓ¼ÂÀ» »ç¿ëÇÏ¸ç ¾Èµå·ÎÀ̵å Á©¸®ºó¿¡¼ onresize°¡ ¹«ÇÑ·çÇÁµ¹±â¿¡ »ç¿ëÇÏÁö ¾Êµµ·Ï ó¸®ÇÔ 109 if (top.frames.topmenu == undefined || !userAgent.match(/Android/i)) { 110 window.onresize = WindReset; 111 } 112 WindReset(); 113 114 for (var i = 0; i < moveInfo.length; i++) { 115 if (moveInfo[i]['leftmenu'] == 'G') { 116 var y = moveInfo[i]['henum'] - fixed_first; 117 new move_type_2(document.getElementById(moveInfo[i]['bannerid']), y, moveInfo[i]['henum']); 118 } 119 } 120} 121 122// ID¸¸ ¹è¿·Î ¸®ÅÏÇÑ´Ù. 123function HandlerIdArr() { 124 var data = Array(); 125 var ids = Array(); 126 var row_tmp = buffer.split(','); 127 128 for (var i = 0; i < row_tmp.length; i++) { 129 data[i] = row_tmp[i].split('//'); 130 ids[i] = data[i][0]; 131 } 132 return ids; 133} 134 135// µ¥ÀÌÅ͸¦ Âɰ³¼ Àü¿ªº¯¼ö¿¡ ¹è¿ÇüÅ·Πµî·ÏÇØµÐ´Ù. BannerHander()°¡ È£ÃâµÇ¸é¼ Çѹø¸¸ ½ÇÇàµÈ´Ù. 136function HandlerData() { 137 var data = Array(); 138 var field = Array(); 139 var row_tmp = buffer.split(','); 140 for (var i = 0; i < row_tmp.length; i++) { 141 data[i] = row_tmp[i].split('//'); 142 field[i] = data[i][1].split('||'); 143 } 144 entity = field; 145 return field; 146} 147 148function getHeightNum(size) { 149 if (typeof getCookiefss == 'function') { 150 if (getCookiefss('yahoofss') == 'yahoo') { 151 henum = parseInt(size) + 43; 152 } else if (getCookiefss('refurl') == 'auction_open') { 153 henum = parseInt(size) + 45; 154 } else henum = size; 155 } else henum = size; 156 return parseInt(henum); 157} 158 159function WindReset() { 160 var bannerid = HandlerIdArr(); 161 for (var i = 0; i < bannerid.length; i++) { 162 var henum = getHeightNum(entity[i][0]); 163 var obj = document.getElementById(bannerid[i]); 164 var leftOffs; 165 166 if (obj === null) { 167 return false;
168 } 169 170 if (isNS4) { 171 bannerid[i].top = top.pageYOffset + henum; 172 bannerid[i].visibility = 'visible'; 173 if (entity[i][2] == 'Y') MoveRightBanner(); 174 } else if (isDOM) { 175 var objVisibility = "visible"; 176 if(entity[i][0] == " " || entity[i][0] == "" ) { 177 objVisibility = "hidden"; 178 entity[i][0] = 0; 179 henum = getHeightNum(entity[i][0]); 180 } 181 if(entity[i][1] == " " || entity[i][1] == "" ) { 182 objVisibility = "hidden"; 183 entity[i][1] = 0; 184 } 185 186 if (document.getElementById('makebanner') == null) { 187 var mol = document.body.offsetLeft; 188 } else { 189 var mol = document.getElementById('makebanner').offsetLeft; 190 } 191 192 //obj.style.top = (entity[i][2] == 'N' || entity[i][2] == '' || entity[i][2] == 'undefined') ? henum + 'px' : parseInt(getOffsetTop(offset_obj)) + henum + 'px'; 193 obj.style.top = (entity[i][2] == 'N' || entity[i][2] == '' || entity[i][2] == 'undefined') ? henum + 'px' : document.body.scrollHeight + henum + 'px'; 194 195 if (mol == 'undefined' || mol == '' || mol == 0) { 196 leftOffs = parseInt(getOffsetLeft(offset_obj)) + parseInt(entity[i][1]); 197 } else { 198 leftOffs = parseInt(mol) + parseInt(entity[i][1]); 199 } 200 201 obj.style.left = leftOffs + 'px'; 202 obj.style.visibility = objVisibility; 203 moveInfo[i] = new Array(); 204 moveInfo[i]['bannerid'] = bannerid[i]; 205 moveInfo[i]['henum'] = henum; 206 moveInfo[i]['leftmenu'] = entity[i][2]; 207 } // endif 208 } // endfor 209 get_henum_minimum(); 210 MoveRightBanner(); 211 if (cherrypicker_check == false) { 212 cherrypicker_check = true; 213 } else { 214 if (typeof load_cherrypicker != 'undefined') { 215 load_cherrypicker(); 216 } 217 } 218} 219 220// henum Áß °¡Àå ÀÛÀº °ªÀ» ±¸ÇصдÙ. 221function get_henum_minimum() { 222 var h = Array(); 223 var j = 0; 224 for (var i = 0; i < moveInfo.length; i++) { 225 if (moveInfo[i]['leftmenu'] == 'G') { 226 h[j] = moveInfo[i]['henum']; 227 j++; 228 } 229 } 230 fixed_first_tmp = h.sort(function(a, b) { return a-b; }); 231 fixed_first = fixed_first_tmp[0]; 232 return true; 233} 234 235function getScrollXY() { 236 var scrOfX = 0, scrOfY = 0; 237 if (typeof(window.pageYOffset) == 'number') { 238 //Netscape compliant 239 scrOfY = window.pageYOffset; 240 scrOfX = window.pageXOffset; 241 } else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) { 242 //DOM compliant 243 scrOfY = document.body.scrollTop; 244 scrOfX = document.body.scrollLeft; 245 } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) { 246 //IE6 standards compliant mode 247 scrOfY = document.documentElement.scrollTop; 248 scrOfX = document.documentElement.scrollLeft; 249 } 250 return [scrOfX, scrOfY]; 251} 252 253function MoveRightBanner() { 254 var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck; 255 for (var i = 0; i < moveInfo.length; i++) { 256 if (moveInfo[i]['leftmenu'] == 'Y') { 257 var bannerid = moveInfo[i]['bannerid']; 258 var henum = parseInt(moveInfo[i]['henum']); 259 var scroll_offset = getScrollXY(); 260 261 if (isNS4) { 262 yMenuFrom = bannerid.top; 263 } else if (isDOM) { 264 yMenuFrom = parseInt(document.getElementById(bannerid).style.top,10); 265 } 266 267 yMenuTo = scroll_offset[1] + henum; 268 269 timeoutNextCheck = 30; 270 if (yMenuFrom != yMenuTo) { 271 yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20); 272 273 if (yMenuTo < yMenuFrom) { 274 yOffset = -yOffset; 275 } 276 277 if (isNS4) { 278 bannerid.top += yOffset; 279 } else if (isDOM) { 280 document.getElementById(bannerid).style.top = parseInt(document.getElementById(bannerid).style.top, 10) + yOffset + 'px'; 281 timeoutNextCheck = 10; 282 } 283 } 284 } // endif 285 } // endfor 286 setTimeout("MoveRightBanner()", timeoutNextCheck); 287} 288 289function setCookiedis(cookieName, cookieValue, nDays) { 290 var today = new Date(); 291 var expire = new Date(); 292 expire.setTime(today.getTime() + 3600000 * 24 * nDays); 293 cookie_temp = cookieName + '=' + escape(cookieValue) + '; path=/;'; 294 if (nDays != 0) cookie_temp += 'expires=' + expire.toGMTString(); 295 document.cookie = cookie_temp; 296} 297 298function dischange() { 299 if (document.all) { 300 disname = document.all('lastviewdiv').style; 301 } else if (document.getElementById) { 302 disname = document.getElementById('lastviewdiv').style; 303 } else if (document.layers) { 304 disname = document.layers['lastviewdiv']; 305 } 306 307 if (disname.display == 'none') { 308 disname.display = 'block';
309 setCookiedis('disname', 0, 0); 310 } else { 311 disname.display = 'none'; 312 setCookiedis('disname', 'Y', 0); 313 } 314} 315 316function minihanashopfree(shopfree_id, shopfree_dir) { 317 if (shopfree_id.length == 10) { 318 if (shopfree_dir == 'Y') { 319 window.open('http://www.hanaNplaza.com/loading.do?hnp=003&goods_cd=009&cohnp_cd=' + shopfree_id); 320 } else { 321 location.href = '/shop/hana_shopfree.html'; 322 } 323 } 324} 325 326function move_type_2(obj, scrollY, topY) { 327 this.obj = obj; 328 this.scrollY = (scrollY) ? scrollY : 0; 329 this.topY = (topY) ? topY : 0; 330 this.obj.style.position = 'absolute'; 331 this.Body = null; 332 this.setTimeOut = null; 333 this.Run(); 334} 335 336move_type_2.prototype.Run = function() { 337 if (document.documentElement.scrollTop > document.body.scrollTop) { 338 this.Body = document.documentElement; 339 } else { 340 this.Body = document.body; 341 } 342 343 var This = this; 344 var objTop = (this.obj.style.top) ? parseInt(this.obj.style.top, 10) : this.obj.offsetTop; 345 var top = this.Body.scrollTop; 346 //var top = this.Body.scrollTop + this.scrollY; ü¸®ÇÇÄ¿¿Í °°ÀÌ »ç¿ëÇÒ °æ¿ì ÃÖ±Ù º» »óǰÀÌ À§¾Æ·Î·¡ °è¼Ó À̵¿ÇÔ 347 var moveY = Math.abs(objTop - top); 348 349 if (top > this.topY) { 350 if (objTop < top) { 351 this.obj.style.top = objTop + Math.ceil(moveY / 2) + 'px'; 352 } else { 353 this.obj.style.top = top + 'px'; 354 } 355 } else { 356 this.obj.style.top = this.topY + 'px'; 357 } 358 359 window.clearTimeout(this.setTimeOut); 360 this.setTimeOut = window.setTimeout( function () { This.Run(); }, 10 ); 361}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.