PageSourceSearch

https://weblog.forest.go.kr/wlo/js/wl6.js

js forest.go.kr collected 2026-10-02 05:38:35 UTC 32,192 bytes, 1,227 lines download raw bytes

1/**
2 *  Nethru Script Module
3 *  Copyright 2008 nethru, All Rights Reserved.
4 *
5 *  WiseLog Online Version 6.0.4.5 edit 20190809 by LJK
6 **/
7
8var _n_uid_cookie = "UID";			/* user cookie */
9var _n_sid = location.hostname;			/* log directory */
10
11if(typeof(loggingCustomSid) != "undefined") {   /* custom log directory */
12        _n_sid = loggingCustomSid;
13}
14
15var _n_ls = "http://weblog.forest.go.kr/wlo/Logging";	/* logging server */
16var _n_uls = "http://weblog.forest.go.kr/wlo/UserLogging";	/* user logging server */
17
18var _n_uid = "";			/* uid */
19var _n_first_pcid = false;
20var _n_click_logging_max = 30;
21var _n_click_logging_num = 0;
22var _n_click_images = new Object();
23
24var _n_ptype_param="_wl_ptype";
25var _n_src_param="_wl_src";
26var _n_keyword_param="_wl_keyword";
27var _n_mid_param="_wl_mid";
28var _n_convday_param="_wl_convday";
29var _n_acqmoney_param="_wl_convvalue"
30
31var	_n_src_cookie="NCHANNELSRC";
32var _n_keyword_cookie="NCHANNELKWD";
33var _n_mid_cookie="NCHANNELMID";
34var _n_date_cookie="NCHANNELDATE"
35
36var _n_max_conv_day = 30;
37
38var _n_cookie_convtype="NCONVTYPE";
39var _n_cookie_convkwd="NCONVKWD";
40
41var _n_use_subcookie = false;	/* use sub cookie */
42var _n_use_channel = false;		/* use inflow channel */
43var _n_use_cpc = false;		/* use CPC */
44
45var _n_bank_uid = "";		// bank uid (non cookie uid)
46var _n_bank_uid_name = "WLUID";	// bank uid key name (for log's cookie name)
47
48var _n_bank_pcid = "";
49var _n_bank_pcid_name = "WLBPCID";
50
51var _n_use_async = false;
52
53var _n_use_img_timeout = false;
54var _n_img_timeout_millis = 3000;
55
56var _n_custom_pipe = "%7C%0B";
57
58var _n_custom_param = {};
59
60/* https logging */
61if ( document.location.protocol == "https:" ) {
62	_n_ls = "https://weblog.forest.go.kr/wlo/Logging";
63	_n_uls = "https://weblog.forest.go.kr/wlo/UserLogging";
64}
65
66
67/* Action_logging ó¸®*/
68Nethru = window.Nethru || {};
69Nethru.Logging = window.Nethru.Logging || {};
70
71Nethru.Logging.isEmpty = function(val) {
72	return (val == "" || val == undefined);
73};
74
75var action_logging = function(param) {
76
77
78
79
80
81	if(param == undefined) {
82		return;
83	}
84	var option = {type:'pageview'};
85
86	var click_logging_stem = location.protocol + "//" + location.hostname;
87	var click_logging_param = "";
88	var paramNames = Object.getOwnPropertyNames(param);
89	for(var i = 0 ; i < paramNames.length ; i++) {
90			var name = paramNames[i];
91		var value = param[name];
92
93			if(Nethru.Logging.isEmpty(value)) {
94			continue;
95		}
96
97			if(name == "click_event") {						/* URL logging*/
98			click_logging_stem += "/click_event/" + value;		}
99		else {
100			if (i == paramNames.length -1)
101			{
102				click_logging_param += name + "=" + value;
103				option[name] = value;
104			} else
105			{	
106				click_logging_param += name + "=" + value + "&";
107				option[name] = value;
108			}
109//			click_logging_param += "&_n_p01=" + _n_p01 + "&_n_p02=" + _n_p02 + "&_n_p03=" + _n_p03;  // 
110		}
111
112	}
113
114	if(click_logging_param == "") {
115		return;
116	}
117	click_logging_stem += "/click_event";				/* URL logging*/
118	n_click_logging(click_logging_stem + "?" + click_logging_param,location.href);
119
120};
121
122Nethru.Logging.loggingEventClick = function(param) {
123        action_logging(param);
124};
125/* Action_logging ó¸®*/
126
127var _n_logging_image = new Image();				/* Common Logging Image */
128var _n_user_image = new Image();					/* User Logging  */
129
130for ( var i=0; i<_n_click_logging_max;i++) {
131	_n_click_images[i] = new Image();
132}
133/* @Deprecated 7.0.1.1 */
134function n_loadImageSimple(img, url) {
135	img.src = url;
136}
137/* @Deprecated 7.0.1.1 */
138function n_loadImage(img, url, altUrl, timeout) {
139	img = document.createElement('iframe');
140	img.style.display = 'none';
141	img.height = 1;
142	img.width = 1;
143
144	var timer;
145	function clearTimer() {
146		if ( timer ) {
147			clearTimeout(timer);
148			timer = null;
149		}
150	}
151
152	function handleFail() {
153		this.onload = this.onabort = this.onerror = function() {};
154
155		clearTimer();
156		if ( this.src === url) {
157			this.src = altUrl;
158		}
159		img.removeAttribute('src');
160		img.remove();
161	}
162
163	img.onerror = img.onabort = handleFail;
164	img.onload = function() {
165		clearTimer();
166		img.remove();
167	};
168
169	img.src = url;
170	timer = setTimeout(function(theImg) {
171		return function() {
172			handleFail.call(theImg);
173		}
174	}(img), timeout);
175	document.body.appendChild(img);
176
177	return img;
178}
179
180function n_load_async(url, timeout) {
181	var timer;
182	function clearTimer() {
183		if ( timer ) {
184			clearTimeout(timer);
185			timer = null;
186		}
187	}
188
189	var XMLHttpFactories = [
190		function () {return new XDomainRequest()},
191		function () {return new XMLHttpRequest()},
192		function () {return new ActiveXObject("Msxml2.XMLHTTP")},
193		function () {return new ActiveXObject("Msxml3.XMLHTTP")},
194		function () {return new ActiveXObject("Microsoft.XMLHTTP")}
195	];
196
197	function createXMLHttpObject() {
198		var xmlhttp = false;
199		for (var i=0;i<XMLHttpFactories.length;i++) {
200			try {
201				xmlhttp = XMLHttpFactories[i]();
202			} catch (e) {
203				continue;
204			}
205			break;
206		}
207		return xmlhttp;
208	}
209	var xhr = createXMLHttpObject();
210	if (!xhr) {
211		return;
212	}
213	xhr.onload = xhr.onerror = xhr.onabort = function() {
214		clearTimer()
215	};
216	xhr.open('GET', url, true);
217	xhr.withCredentials = true;
218	xhr.send(null);
219	if ( _n_use_img_timeout ) {
220		setTimeout(function() {
221			xhr.abort();
222		}, timeout);
223	}
224}
225
226function n_getBI()
227{
228	var str = "";
229	var dt = document;
230
231	var strScreenSize = "";
232
233	var ws = window.screen;
234
235	if ( ws != null && ws != "undefined" ) {
236		strScreenSize = screen.width+"x"+screen.height;
237	}
238	str +="n_ss=" + strScreenSize + "; ";
239
240	var cs = "-";
241	var nv = navigator;
242
243	if ( nv.language ) {
244		cs = nv.language.toLowerCase();
245	}
246	else if ( nv.userLanguage ) {
247		cs = nv.userLanguage.toLowerCase();
248	}
249
250	str +="n_cs=" + cs + "; ";
251
252	return str;
253}
254
255function n_getSubCV(cv, offset, escapeFlag, delim)
256{
257	var endstr = cv.indexOf ( delim, offset);
258
259	if ( endstr == -1) endstr = cv.length;
260
261	if ( escapeFlag )
262		return unescape(cv.substring(offset, endstr));
263	else
264		return cv.substring(offset, endstr);
265}
266/* @Deprecated 7.0.1.1 */
267function n_getCV(dc, offset,escapeFlag)
268{
269	var endstr = dc.indexOf (";", offset);
270
271	if (endstr == -1) endstr = dc.length;
272
273	if ( escapeFlag )
274		return unescape(dc.substring(offset, endstr));
275	else
276		return dc.substring(offset, endstr);
277}
278
279function n_GetSubCookie(name, cv)
280{
281	var arg = name + "=";
282	var alen = arg.length;
283	var clen = cv.length;
284	var i = 0;
285
286	while (i < clen)
287	{
288		var j = i + alen;
289
290		if (cv.substring(i, j) == arg) {
291			return n_getSubCV (cv,j,false,"&");
292		}
293
294		i = cv.indexOf("&", i) + 1;
295
296		if (i == 0)
297			break;
298	}
299
300	return null;
301}
302
303function n_GetCookie(name,escapeFlag)
304{
305	var dc = document.cookie;
306	var arg = name + "=";
307	var alen = arg.length;
308	var clen = dc.length;
309	var i = 0;
310
311	while (i < clen)
312	{
313		var j = i + alen;
314
315		if (dc.substring(i, j) == arg) {
316			if ( _n_use_subcookie ) {
317				return n_getSubCV(dc, j, escapeFlag, ";");
318			} else {
319				return n_getCV(dc, j, escapeFlag);
320			}
321		}
322
323		i = dc.indexOf(" ", i) + 1;
324
325		if (i == 0)
326			break;
327	}
328
329	return null;
330}
331
332function n_SetCookie(name, value)
333{
334	var argv = n_SetCookie.arguments;
335	var argc = n_SetCookie.arguments.length;
336	var expires = (2 < argc) ? argv[2] : null;
337	var path = (3 < argc) ? argv[3] : null;
338	var domain = (4 < argc) ? argv[4] : null;
339	var secure = (5 < argc) ? argv[5] : false;
340
341	document.cookie =
342		name + "=" + escape (value)
343		+ ((expires == null) ? "" : ("; expires="+expires.toGMTString()))
344		+ ((path == null) ? "" : ("; path=" + path))
345		+ ((domain == null) ? "" : ("; domain=" + domain))
346		+ ((secure == true) ? "; secure" : "");
347}
348
349function n_DeleteCookie(name, path, domain) {
350	if ( n_GetCookie(name, false) ) {
351		document.cookie = name + "=" +
352			( ( path ) ? ";path=" + path : "") +
353			( (domain ) ? ";domain=" + domain : "") +
354			";expires=Thu, 01-Jan-1970 00:00:01 GMT";
355	}
356}
357
358function n_makePersistentCookie(name,length,path,domain)
359{
360	var today = new Date();
361	var expiredDate = new Date(2100,1,1);
362	var cookie;
363	var value;
364
365	cookie = n_GetCookie(name,true);
366
367	if ( cookie ) {
368		_n_first_pcid = false;
369		return cookie;
370	}
371	_n_first_pcid = true;
372
373	var values = new Array();
374
375	for ( i=0; i < length ; i++ ) {
376		values[i] = "" + Math.random();
377	}
378
379	value = today.getTime();
380
381	for ( i=0; i < length ; i++ ) {
382		value += values[i].charAt(2);
383	}
384
385	n_SetCookie(name,value,expiredDate,path,domain);
386
387	return value;
388}
389
390function n_setCustomParam(k, v) {
391	if(_n_custom_param[k]) {
392		console.warn("'" + k + "' key already has value. the old value is replaced.");
393	}
394	_n_custom_param[k] = v;
395}
396/* @Deprecated 7.0.1.1 */
397function n_Logging_M() {
398		if ( (typeof _n_m01)!="undefined" && _n_m01 ) { n_setCustomParam("_n_m01", _n_m01); }
399		if ( (typeof _n_m02)!="undefined" && _n_m02 ) { n_setCustomParam("_n_m02", _n_m02); }
400		if ( (typeof _n_m03)!="undefined" && _n_m03 ) { n_setCustomParam("_n_m03", _n_m03); }
401		if ( (typeof _n_m04)!="undefined" && _n_m04 ) { n_setCustomParam("_n_m04", _n_m04); }
402		if ( (typeof _n_m05)!="undefined" && _n_m05 ) { n_setCustomParam("_n_m05", _n_m05); }
403		if ( (typeof _n_m06)!="undefined" && _n_m06 ) { n_setCustomParam("_n_m06", _n_m06); }
404		if ( (typeof _n_m07)!="undefined" && _n_m07 ) { n_setCustomParam("_n_m07", _n_m07); }
405		if ( (typeof _n_m08)!="undefined" && _n_m08 ) { n_setCustomParam("_n_m08", _n_m08); }
406		if ( (typeof _n_m09)!="undefined" && _n_m09 ) { n_setCustomParam("_n_m09", _n_m09); }
407		if ( (typeof _n_m10)!="undefined" && _n_m10 ) { n_setCustomParam("_n_m10", _n_m10); }
408}
409/* @Deprecated 7.0.1.1 */
410function n_Logging_P() {
411		if ( (typeof _n_p01)!="undefined" && _n_p01 ) { n_setCustomParam("_n_p01", _n_p01); }
412		if ( (typeof _n_p02)!="undefined" && _n_p02 ) { n_setCustomParam("_n_p02", _n_p02); }
413		if ( (typeof _n_p03)!="undefined" && _n_p03 ) { n_setCustomParam("_n_p03", _n_p03); }
414		if ( (typeof _n_p04)!="undefined" && _n_p04 ) { n_setCustomParam("_n_p04", _n_p04); }
415		if ( (typeof _n_p05)!="undefined" && _n_p05 ) { n_setCustomParam("_n_p05", _n_p05); }
416		if ( (typeof _n_p06)!="undefined" && _n_p06 ) { n_setCustomParam("_n_p06", _n_p06); }
417		if ( (typeof _n_p07)!="undefined" && _n_p07 ) { n_setCustomParam("_n_p07", _n_p07); }
418		if ( (typeof _n_p08)!="undefined" && _n_p08 ) { n_setCustomParam("_n_p08", _n_p08); }
419		if ( (typeof _n_p09)!="undefined" && _n_p09 ) { n_setCustomParam("_n_p09", _n_p09); }
420		if ( (typeof _n_p10)!="undefined" && _n_p10 ) { n_setCustomParam("_n_p10", _n_p10); }
421}
422
423function n_encodeStr(s)
424{
425	if (typeof(encodeURI) == 'function') {
426		s=encodeURI(s);
427		s=s.split("#").join("%23");
428		return s;
429	}
430	else
431		return escape(s);
432}
433
434function n_encodeStr2(s)                   /*n_request ÀüüURLÀ» ¹Þ¾Æ¿À¸é¼­ &¸¦ %26À¸·Î ÀÎÄÚµù¿¡ »ç¿ë*/
435{
436	if (typeof(encodeURI) == 'function') {
437		s=encodeURI(s);
438                s=s.split("#").join("%23");
439                s=s.split("&").join("%26");
440                s=s.split("?").join("%3F");
441                s=s.split("=").join("%3D");
442
443		return s;
444	}
445	else
446		return escape(s);
447}
448function n_paramEncodeStr(s)
449{
450	s=s.split("&").join("|");
451	s=s.split("?").join(" ");
452	s=s.split("/").join("|");
453
454	return n_encodeStr(s);
455}
456
457function n_getDomain()
458{
459	var _host   = document.domain;
460	var so = _host.split('.');
461
462	if ( n_isIpType(so)) {
463		return ( so[0] + '.' + so[1] + '.' + so[2] + '.' + so[3]);
464	}
465
466	if ( so.length != 4 && so.length != 3 ) {
467		return _host;
468	}
469
470	var dm  = so[so.length-2] + '.' + so[so.length-1];
471
472	return (so[so.length-1].length == 2) ? so[so.length-3] + '.' + dm : dm;
473}
474
475function n_getReferrer()
476{
477	var my_ref = self.document.referrer;
478
479	var parent_href = "";
480	var parent_ref = "";
481
482	try {
483		parent_href = top.document.location.href;
484		parent_ref = top.document.referrer;
485	}
486	catch(e) {
487		return my_ref;
488	}
489
490	if ( my_ref == parent_href )
491		return parent_ref;
492
493	return my_ref;
494}
495
496function n_getCookieStr()
497{
498	/* PCID */
499	var pcid = "";
500
501	/* Cookie Field */
502	var _n_c_f = "";
503
504	/* Browser Info */
505	var binfo = n_getBI();
506
507	/* Domain */
508	var domain = "";
509
510	if ( (typeof _n_domain)!="undefined" && _n_domain != "" ) {
511		domain = _n_domain;
512	}
513	else {
514		domain = n_getDomain();
515	}
516
517	pcid = n_makePersistentCookie("PCID",10,"/",domain);
518
519	if ( pcid != null && pcid != "" ) {
520		var cookies = "";
521
522		if ( _n_first_pcid == true ) {
523			n_SetCookie("PCID_publish", "NEW", null, "/", domain);
524		} else {
525			cookies += "PCID" + "=" + pcid + "; ";
526		}
527		
528		if(n_GetCookie("PCID_publish"))
529			cookies += "PCID_publish=NEW; ";
530
531		if ( (typeof _n_bank_pcid) != "undefined" && _n_bank_pcid != "" && (typeof _n_bank_pcid_name) != "undefined" && _n_bank_pcid_name != "" ) {
532			if(n_GetCookie(_n_bank_pcid_name, true)) {
533				cookies += _n_bank_pcid_name + "=" + _n_bank_pcid + "; ";
534			} else {
535				var expiredDate = new Date(2100,1,1);
536				n_SetCookie(_n_bank_pcid_name, _n_bank_pcid, expiredDate, "/", domain);
537			}
538		}
539
540		if ( (typeof _n_uid_cookie)!="undefined" && _n_uid_cookie != "" ) {
541			if ( (typeof _n_f_uid_decode)=="undefined" || _n_f_uid_decode==true ) {
542				_n_uid = n_GetCookie(_n_uid_cookie,true);
543			}
544			else {
545				_n_uid = n_GetCookie(_n_uid_cookie,false);
546			}
547			if ( _n_uid != null && _n_uid != "" ) {
548				if ( _n_use_subcookie && (typeof _n_uid_subcookie) != "undefined" && _n_uid_subcookie != "" ) {
549					_n_uid_sub = n_GetSubCookie(_n_uid_subcookie,_n_uid);
550					if ( _n_uid_sub != null && _n_uid_sub != "" ) {
551						cookies += _n_uid_subcookie + "=" + _n_uid_sub + "; ";
552					}
553				} else
554					cookies += _n_uid_cookie + "=" + _n_uid + "; ";
555			}
556		}
557
558		if ( (typeof _n_bank_uid) != "undefined" && _n_bank_uid != "" ) {
559			cookies += _n_bank_uid_name + "=" + _n_bank_uid + "; ";
560		}
561
562		if ( (typeof _n_c_field1)!="undefined" && _n_c_field1 != "" ) {
563			_n_c_f = n_GetCookie(_n_c_field1, true);
564			if ( _n_c_f != null && _n_c_f != "" ) {
565				cookies += _n_c_field1 + "=" + _n_c_f + "; ";
566			}
567		}
568		if ( (typeof _n_c_field2)!="undefined" && _n_c_field2 != "" ) {
569			_n_c_f = n_GetCookie(_n_c_field2, true);
570			if ( _n_c_f != null && _n_c_f != "" ) {
571				cookies += _n_c_field2 + "=" + _n_c_f + "; ";
572			}
573		}
574		if ( (typeof _n_c_field3)!="undefined" && _n_c_field3 != "" ) {
575			_n_c_f = n_GetCookie(_n_c_field3, true);
576			if ( _n_c_f != null && _n_c_f != "" ) {
577				cookies += _n_c_field3 + "=" + _n_c_f + "; ";
578			}
579		}
580
581		return cookies + binfo;
582	}
583	else {
584		return document.cookie + binfo;
585	}
586}
587
588/* User Attr Logging */
589function n_userattr_logging()
590{
591	var uid_attr1 = "";
592	var uid_attr2 = "";
593	var uid_attr3 = "";
594	var uid_attr4 = "";
595	var uid_attr5 = "";
596	var uid_attr6 = "";
597	var uid_attr7 = "";
598	var	uid_url = "";
599
600	if ( _n_uid == null || _n_uid == "" ) {
601		if ( _n_bank_uid != null && _n_bank_uid != "" )
602			_n_uid = _n_bank_uid;
603		else
604			return;
605	}
606
607	if ( (typeof _n_uid_attr1)!="undefined" && _n_uid_attr1 != "" ) uid_attr1 = _n_uid_attr1;
608	if ( (typeof _n_uid_attr2)!="undefined" && _n_uid_attr2 != "" ) uid_attr2 = _n_uid_attr2;
609	if ( (typeof _n_uid_attr3)!="undefined" && _n_uid_attr3 != "" ) uid_attr3 = _n_uid_attr3;
610	if ( (typeof _n_uid_attr4)!="undefined" && _n_uid_attr4 != "" ) uid_attr4 = _n_uid_attr4;
611	if ( (typeof _n_uid_attr5)!="undefined" && _n_uid_attr5 != "" ) uid_attr5 = _n_uid_attr5;
612	if ( (typeof _n_uid_attr6)!="undefined" && _n_uid_attr6 != "" ) uid_attr6 = _n_uid_attr6;
613	if ( (typeof _n_uid_attr7)!="undefined" && _n_uid_attr7 != "" ) uid_attr7 = _n_uid_attr7;
614	if ( uid_attr1!="" || uid_attr2!="" || uid_attr3!="" || uid_attr4!="" || uid_attr5!="" || uid_attr6!="" || uid_attr7!="" ) {
615		uid_url = _n_uls +
616					"?" +
617					"d=" + "001" +
618					_n_custom_pipe + "dv=" + Math.random() +
619					_n_custom_pipe + "ver=1.0.0" +
620					_n_custom_pipe + "sid=" + n_encodeStr(_n_sid) +
621					_n_custom_pipe + "u=" + n_encodeStr(_n_uid) +
622					_n_custom_pipe + "a1=" + n_encodeStr(uid_attr1) +
623					_n_custom_pipe + "a2=" + n_encodeStr(uid_attr2) +
624					_n_custom_pipe + "a3=" + n_encodeStr(uid_attr3) +
625					_n_custom_pipe + "a4=" + n_encodeStr(uid_attr4) +
626					_n_custom_pipe + "a5=" + n_encodeStr(uid_attr5) +
627					_n_custom_pipe + "a6=" + n_encodeStr(uid_attr6) +
628					_n_custom_pipe + "a7=" + n_encodeStr(uid_attr7);
629
630		if ( _n_use_async ) {
631			n_load_async(uid_url, _n_img_timeout_millis);
632		} else if ( _n_use_img_timeout) {
633			n_loadImage(_n_user_image, uid_url, "#", _n_img_timeout_millis);
634		} else {
635			n_loadImageSimple(_n_user_image, uid_url);
636		}
637
638		//_n_user_image.src = uid_url;
639	}
640}
641
642/* @Deprecated 7.0.1.1 */
643function n_Logging_P_UID() {
644	if ((typeof _n_p_uid ) != "undefined" && _n_p_uid) return true;
645
646	return false;
647}
648
649function n_hasUnsafeCookieValue(cookieValue) {
650	if (!cookieValue) {
651		return false;
652	}
653
654	return cookieValue.indexOf("<script") > -1;
655}
656
657function n_makeCookieSafe(cookieStr) {
658	var cookieArr = cookieStr.split(';');
659	var safeCookieStr = "";
660
661	for (var i=0; i<cookieArr.length; i++) {
662		var value = cookieArr[i].split('=')[1];
663
664		if (!n_hasUnsafeCookieValue(value) && cookieArr[i] != " ") {
665			safeCookieStr += cookieArr[i] + ";";
666		}
667	}
668
669	return safeCookieStr;
670}
671
672
673/* Click Logging */
674function n_click_logging(url)
675{
676	if ( _n_sid == "07010100000" )
677		return;
678
679	var argc = n_click_logging.arguments.length;
680	var argv = n_click_logging.arguments;
681
682	var _n_request = url;
683
684	var _nr = n_getReferrer();
685	var _n_referrer = (1 < argc) ? argv[1] : _nr;
686	var c1 = (2 < argc) ? argv[2] : null;
687	var _n_cookie = n_makeCookieSafe(n_getCookieStr());
688	var _n_agent = navigator.userAgent;
689	var	 _n_title = top.document.title.toString();
690
691
692	var _n_target_url = _n_ls +
693						"?" +
694						"d=" + "001" +
695						_n_custom_pipe + "dv=" + Math.random() +
696						_n_custom_pipe + "ver=1.0.0" +
697						_n_custom_pipe + "sid=" + n_encodeStr(_n_sid) +
698						_n_custom_pipe + "r=" + n_encodeStr(_n_request) +
699	/* URL¿¡ Ãß°¡·Î _n_request ,_n_title, _n_sid ºÙÈú¶§ »ç¿ë  */
700//						"&" +"_n_request=" + n_encodeStr2(_n_request)	+
701//						"&" +"_n_title=" + n_encodeStr2(_n_title)	+
702//						"&" +"_n_referrer=" + n_encodeStr2(_n_referrer)	+
703//						"&" +"_n_sid=" + n_encodeStr2(_n_sid) +
704						_n_custom_pipe + "rf=" + n_encodeStr(_n_referrer) +
705						_n_custom_pipe + "c=" + n_encodeStr(_n_cookie) +
706						_n_custom_pipe + "a=" + n_encodeStr(_n_agent);
707
708	if ( c1 != null ) {
709		_n_target_url += _n_custom_pipe + "_n_p1=" + c1;
710	}
711
712	_n_click_logging_num++;
713	if ( _n_use_async ) {
714		n_load_async(_n_target_url, _n_img_timeout_millis);
715	} else if ( _n_use_img_timeout ) {
716		n_loadImage(_n_click_images[_n_click_logging_num % _n_click_logging_max], _n_target_url, "#", _n_img_timeout_millis);
717	} else {
718		n_loadImageSimple(_n_click_images[_n_click_logging_num % _n_click_logging_max], _n_target_url);
719	}
720	//_n_click_images[_n_click_logging_num % _n_click_logging_max].src = _n_target_url;
721}
722
723function n_get_channel_cookieparam() {
724	var src;
725	var keyword;
726	var convdate;
727	var convday;
728	var mid;
729
730	var retStr = "";
731
732	src = n_GetCookie(_n_src_cookie);
733	keyword = n_GetCookie(_n_keyword_cookie);
734	convdate = n_GetCookie(_n_date_cookie, true);
735	mid = n_GetCookie(_n_mid_cookie);
736
737	var current = new Date();
738	if ( convdate == null ) {
739		convday = 0;
740	}
741	else {
742		convdate = new Date(convdate);
743		convday = Math.floor((current.getTime() + 32400000) / 1000 / 60 / 60 / 24) - Math.floor((convdate.getTime() + 32400000) / 1000 / 60 / 60 / 24);
744	}
745
746	if ( convday <= 0 ) convday = 0;
747	if ( mid == null) mid = "0";
748	if ( src == null) src = "1";
749
750	retStr += _n_custom_pipe + _n_mid_param + "=" + mid;
751	retStr += _n_custom_pipe + _n_src_param + "=" + src;
752	if ( keyword != null ) retStr += _n_custom_pipe + _n_keyword_param + "=" + keyword;
753	retStr += _n_custom_pipe + _n_convday_param + "=" + convday;
754
755	return retStr;
756}
757
758function n_common_logging(_req, _ref, _title) {
759
760	var _n_request = _req;
761	var _n_referrer = _ref;
762	var _n_cookie = n_makeCookieSafe(n_getCookieStr());
763	var _n_agent = navigator.userAgent;
764	var _n_title = _title;
765
766	/* CPC */
767	if ( typeof (_n_use_cpc ) != "undefined" && _n_use_cpc ) {
768		var convType = "";
769		var convKwd = "";
770		var requestTemp = "";
771
772		/* Domain */
773		var domain = "";
774
775		if ( (typeof _n_domain)!="undefined" && _n_domain != "" ) {
776			domain = _n_domain;
777		}
778		else {
779			domain = n_getDomain();
780		}
781
782		convType = n_GetCookie(_n_cookie_convtype, false);
783
784		if ( convType != "" && convType != null) {
785			requestTemp += _n_cookie_convtype + "=" + n_encodeStr(convType);
786
787			n_DeleteCookie(_n_cookie_convtype, "/", domain);
788		}
789
790		convKwd = n_GetCookie(_n_cookie_convkwd, true);
791
792		if ( convKwd != "" && convKwd != null) {
793			requestTemp += "&" + _n_cookie_convkwd + "=" + convKwd;
794
795			n_DeleteCookie(_n_cookie_convkwd, "/", domain);
796		}
797
798		if ( requestTemp != "" ) {
799			if ( _n_request.indexOf("?") != -1 ) {
800				_n_request += "&" + requestTemp;
801			} else {
802				_n_request += "?" + requestTemp;
803			}
804		}
805	}
806
807	/* Make URL Parameter */
808	var _n_target_url = _n_ls +
809						"?" +
810						"d=" + "001" +
811						_n_custom_pipe + "dv=" + Math.round(Math.random()*1999083012) +
812						_n_custom_pipe + "ver=1.0.0" +
813						_n_custom_pipe + "sid=" + n_encodeStr(_n_sid) +
814						_n_custom_pipe + "r=" + n_encodeStr(_n_request) +
815						_n_custom_pipe + "rf=" + n_encodeStr(_n_referrer) +
816						_n_custom_pipe + "c=" + n_encodeStr(_n_cookie) +
817						_n_custom_pipe + "a=" + n_encodeStr(_n_agent);
818
819	if ( (typeof _n_show_title)!="undefined" && _n_show_title )
820		_n_target_url += _n_custom_pipe + "t=" + n_paramEncodeStr(_n_title);
821
822
823	if ( n_Logging_P_UID() ) {
824		_n_target_url += _n_custom_pipe + "_n_p_uid=" + n_paramEncodeStr(_n_p_uid);
825	}
826
827
828	//set custom param
829	n_Logging_M();
830	n_Logging_P();
831	for(var n_pk in _n_custom_param) {
832		var n_pv = _n_custom_param[n_pk];
833		_n_target_url += _n_custom_pipe + n_pk + "=" + n_paramEncodeStr(n_pv);
834	}
835	/* URL¿¡ Ãß°¡·Î _n_request ,_n_title, _n_sid ºÙÈú¶§ »ç¿ë  */
836			_n_target_url += _n_custom_pipe +"_n_request=" + n_encodeStr2(_n_request);
837			_n_target_url += _n_custom_pipe +"_n_title=" + n_encodeStr2(_n_title);
838			_n_target_url += _n_custom_pipe +"_n_referrer=" + n_encodeStr2(_n_referrer);
839			_n_target_url += _n_custom_pipe +"_n_sid=" + n_encodeStr2(_n_sid);
840
841	/* Cookie Information */
842	var info_cookie = "";
843	if ( (typeof _n_info1_cookie)!="undefined" && _n_info1_cookie != "" ) {
844		info_cookie = n_GetCookie(_n_info1_cookie,false);
845		if ( info_cookie != null && info_cookie != "" ) {
846			_n_target_url += _n_custom_pipe + _n_info1_cookie + "=" + n_encodeStr(info_cookie);
847		}
848	}
849	if ( (typeof _n_info2_cookie)!="undefined" && _n_info2_cookie != "" ) {
850		info_cookie = n_GetCookie(_n_info2_cookie,false);
851		if ( info_cookie != null && info_cookie != "" ) {
852			_n_target_url += _n_custom_pipe + _n_info2_cookie + "=" + n_encodeStr(info_cookie);
853		}
854	}
855	if ( (typeof _n_info3_cookie)!="undefined" && _n_info3_cookie != "" ) {
856		info_cookie = n_GetCookie(_n_info3_cookie,false);
857		if ( info_cookie != null && info_cookie != "" ) {
858			_n_target_url += _n_custom_pipe + _n_info3_cookie + "=" + n_encodeStr(info_cookie);
859		}
860	}
861	if ( (typeof _n_info4_cookie)!="undefined" && _n_info4_cookie != "" ) {
862		info_cookie = n_GetCookie(_n_info4_cookie,false);
863		if ( info_cookie != null && info_cookie != "" ) {
864			_n_target_url += _n_custom_pipe + _n_info4_cookie + "=" + n_encodeStr(info_cookie);
865		}
866	}
867	if ( (typeof _n_info5_cookie)!="undefined" && _n_info5_cookie != "" ) {
868		info_cookie = n_GetCookie(_n_info5_cookie,false);
869		if ( info_cookie != null && info_cookie != "" ) {
870			_n_target_url += _n_custom_pipe + _n_info5_cookie + "=" + n_encodeStr(info_cookie);
871		}
872	}
873	if ( (typeof _n_info6_cookie)!="undefined" && _n_info6_cookie != "" ) {
874		info_cookie = n_GetCookie(_n_info6_cookie,false);
875		if ( info_cookie != null && info_cookie != "" ) {
876			_n_target_url += _n_custom_pipe + _n_info6_cookie + "=" + n_encodeStr(info_cookie);
877		}
878	}
879	if ( (typeof _n_info7_cookie)!="undefined" && _n_info7_cookie != "" ) {
880		info_cookie = n_GetCookie(_n_info7_cookie,false);
881		if ( info_cookie != null && info_cookie != "" ) {
882			_n_target_url += _n_custom_pipe + _n_info7_cookie + "=" + n_encodeStr(info_cookie);
883		}
884	}
885
886
887	/* Inflow Channel */
888	if ( (typeof _n_use_channel) != "undefined" && _n_use_channel == true ) {
889
890		var channelparam = "";
891		var channelflag = false;
892
893		if ( (typeof _n_f_buyconv) != "undefined" && _n_f_buyconv == true) {
894			channelparam = n_get_channel_cookieparam()
895			_n_target_url += _n_custom_pipe + _n_ptype_param + "=2";
896			channelflag = true;
897		} else if ( (typeof _n_f_subscriptionconv) != "undefined" && _n_f_subscriptionconv == true) {
898			channelparam = n_get_channel_cookieparam()
899			_n_target_url += _n_custom_pipe + _n_ptype_param + "=3";
900			channelflag = true;
901		} else if ( (typeof _n_f_conv1) != "undefined" && _n_f_conv1 == true) {
902			channelparam = n_get_channel_cookieparam()
903			_n_target_url += _n_custom_pipe + _n_ptype_param + "=4";
904			channelflag = true;
905		} else if ( (typeof _n_f_conv2) != "undefined" && _n_f_conv2 == true) {
906			channelparam = n_get_channel_cookieparam()
907			_n_target_url += _n_custom_pipe + _n_ptype_param + "=5";
908			channelflag = true;
909		} else if ( (typeof _n_f_conv3) != "undefined" && _n_f_conv3 == true) {
910			channelparam = n_get_channel_cookieparam()
911			_n_target_url += _n_custom_pipe + _n_ptype_param + "=6";
912			channelflag = true;
913		}
914
915		if ( channelflag ) {
916			var domain = "";
917			if ( (typeof _n_domain)!="undefined" && _n_domain != "" ) {
918				domain = _n_domain;
919			}
920			else {
921				domain = n_getDomain();
922			}
923
924			//n_DeleteCookie(_n_date_cookie, "/", domain);
925			//n_DeleteCookie(_n_mid_cookie, "/", domain);
926			//n_DeleteCookie(_n_src_cookie, "/", domain);
927			//n_DeleteCookie(_n_keyword_cookie, "/", domain);
928
929			_n_target_url += _n_custom_pipe + _n_acqmoney_param + "=" + n_getParam(_n_acqmoney_param);
930
931			_n_target_url += channelparam;
932
933		}
934
935		n_channel_search();
936	}
937
938	if ( typeof (_n_use_cpc ) != "undefined" && _n_use_cpc ) {
939		n_cpc_search();
940	}
941	if ( _n_use_async ) {
942		n_load_async(_n_target_url, _n_img_timeout_millis);
943	} else if ( _n_use_img_timeout ) {
944		n_loadImage(_n_logging_image, _n_target_url, "#", _n_img_timeout_millis);
945	} else {
946		n_loadImageSimple(_n_logging_image, _n_target_url);
947	}
948
949	//_n_logging_image.src = _n_target_url;
950
951	/* Call User Logging Function */
952	n_userattr_logging();
953}
954
955
956/* Logging Function */
957function n_logging() {
958
959	/* Customer ID Test */
960	if ( _n_sid == "07010100000" )
961		return;
962
963	function callCommonLogging() {
964		if ( document.location.protocol == "file:" ) {
965			n_common_logging( document.location.pathname + document.location.search, n_getReferrer(), document.title.toString() );
966		} else {
967			n_common_logging( document.location.href, n_getReferrer(), document.title.toString() );
968		}
969	}
970
971	/* Call Common Logging Function */
972	if(window.addEventListener){
973		window.addEventListener('load', callCommonLogging, false);
974	} else {
975		window.attachEvent('onload', callCommonLogging);
976	}
977}
978
979/* Parent Logging */
980function n_parent_logging() {
981
982	if ( _n_sid == "07010100000" )
983		return;
984
985	var parent_href = "";
986	var parent_ref = "";
987	var parent_title = "";
988
989	try {
990		parent_href = top.document.location.href;
991		parent_ref = top.document.referrer;
992		parent_title = top.document.title.toString();
993		n_common_logging(parent_href, parent_ref, parent_title);
994	}
995	catch(e) {
996		/* Nothing */
997	}
998}
999
1000function n_getParam(name) {
1001	var param = name + "=";
1002	var url = "" + self.document.location.search;
1003	var turl = "";
1004
1005	eval("try{ turl=top.document.location.search; }catch(_e){}");
1006
1007	url = url + "&" + turl;
1008
1009	if ( url.indexOf(param) != -1) {
1010		var x = url.indexOf(param) + param.length;
1011		var y = url.substr(x).indexOf("&");
1012		if ( y != -1 ) return url.substring(x, x+y);
1013		else return url.substr(x);
1014	}
1015
1016	return "";
1017}
1018
1019/* Channel Search */
1020function n_channel_search() {
1021	var ptype = n_getParam(_n_ptype_param);
1022
1023	var keyword = "";
1024
1025	if ( ptype == "1") {
1026		var currentDate = new Date();
1027		var mid = n_getParam(_n_mid_param);
1028		var src = n_getParam(_n_src_param);
1029
1030
1031		if ( src == "2" ) {
1032			keyword = n_getParam("OVKEY");
1033		} else if ( src == "3") {
1034			keyword = n_getParam("NVKWD");
1035		} else {
1036			keyword = n_getParam(_n_keyword_param);
1037		}
1038
1039		n_create_channel_cookie(mid, src, currentDate, keyword);
1040	}
1041}
1042
1043function n_create_channel_cookie(mid, src, date, keyword) {
1044	var domain = "";
1045	var expiredDate = new Date();
1046
1047	if ( (typeof _n_domain)!="undefined" && _n_domain != "" ) {
1048		domain = _n_domain;
1049	}
1050	else {
1051		domain = n_getDomain();
1052	}
1053
1054	if ( mid == "") mid = "0";
1055	if ( src == "") src = "1";
1056
1057	expiredDate.setTime(Math.floor((date.getTime() + 32400000) / 86400000) * 86400000 - 32400000 + 1000 * 60 * 60 * 24 * (_n_max_conv_day + 1) - 1);
1058
1059	n_SetCookie(_n_date_cookie, date, expiredDate, "/", domain);
1060	n_SetCookie(_n_mid_cookie, mid, expiredDate, "/", domain);
1061	n_SetCookie(_n_src_cookie, src, expiredDate, "/", domain);
1062
1063	if ( keyword != "") {
1064		n_SetCookie(_n_keyword_cookie, keyword, expiredDate, "/", domain);
1065	} else {
1066		n_DeleteCookie(_n_keyword_cookie, "/", domain);
1067	}
1068}
1069
1070
1071function n_set_conversion(convtype) {
1072
1073	_n_f_conv = true;
1074	if ( convtype == "BUYCONV") {
1075		_n_f_buyconv = true;
1076	} else if ( convtype == "SUBSCRIPTIONCONV") {
1077		_n_f_subscriptionconv = true;
1078	} else if ( convtype == "USERDEF1CONV") {
1079		_n_f_conv1 = true;
1080	} else if ( convtype == "USERDEF2CONV") {
1081		_n_f_conv2 = true;
1082	} else if ( convtype == "USERDEF3CONV") {
1083		_n_f_conv3 = true;
1084	}
1085
1086}
1087
1088/* CPC SEARCH */
1089function n_cpc_search() {
1090
1091	var ref = n_getReferrer();
1092	var tref = "";
1093
1094	eval("try{ tref = top.document.referrer; }catch(_e){}");
1095
1096	var bFormat = false;
1097
1098	if ( ref == tref ) {
1099		ref = tref;
1100		bFormat = true;
1101	}
1102
1103	if ( ref == 'undefined' ) ref = "";
1104
1105	var buykeyword = "";
1106	var nv_ar = "";
1107	var cpc_src = "";
1108
1109	/* Domain */
1110	var domain = "";
1111
1112	if ( (typeof _n_domain)!="undefined" && _n_domain != "" ) {
1113		domain = _n_domain;
1114	}
1115	else {
1116		domain = n_getDomain();
1117	}
1118
1119	if ( bFormat ) {
1120		var expiredDate = new Date();
1121
1122		expiredDate.setTime(expiredDate.getTime() + 1000 * 60 * 60 * 24 * _n_max_conv_day);
1123
1124		buykeyword = n_getParam("OVKEY");
1125
1126		if ( buykeyword != "" ) {
1127			// ADD COOKIE (OVERTURE)
1128			n_SetCookie(_n_cookie_convtype, "OVERTURE", expiredDate, "/", domain);
1129			n_SetCookie(_n_cookie_convkwd, buykeyword, expiredDate, "/", domain);
1130		}
1131
1132		buykeyword = n_getParam("NVADKWD");
1133
1134		if ( buykeyword != "") {
1135			nv_ar = n_getParam("NVAR");
1136
1137			n_SetCookie(_n_cookie_convtype, "NAVER_" + nv_ar, expiredDate, "/", domain);
1138			n_SetCookie(_n_cookie_convkwd, buykeyword, expiredDate, "/", domain);
1139
1140
1141//			if ( nv_ar == "PL" || nv_ar == "BZ" ) {
1142//				// ADD COOKIE ( NAVER CPC );
1143//				n_SetCookie(_n_cookie_convtype, "NAVERCPC", expiredDate, "/", domain);
1144//				n_SetCookie(_n_cookie_convkwd, buykeyword, expiredDate, "/", domain);
1145//			} else if ( nv_ar == "PSLK" ) {
1146//				// ADD COOKIE ( NAVER CPT );
1147//				n_SetCookie(_n_cookie_convtype, "NAVERCPT", expiredDate, "/", domain);
1148//				n_SetCookie(_n_cookie_convkwd, buykeyword, expiredDate, "/", domain);
1149//			}
1150		}
1151
1152		buykeyword = n_getParam("nkwd");
1153
1154		if ( buykeyword != "") {
1155			cpc_src = n_getParam("nsrc");
1156
1157			if ( cpc_src == "daum") {
1158				// ADD COOKIE ( DAUM );
1159				n_SetCookie(_n_cookie_convtype, "DAUM", expiredDate, "/", domain);
1160				n_SetCookie(_n_cookie_convkwd, buykeyword, expiredDate, "/", domain);
1161			} else if ( cpc_src == "google") {
1162				// ADD COOKIE ( GOOGLE );
1163				n_SetCookie(_n_cookie_convtype, "GOOGLE", expiredDate, "/", domain);
1164				n_SetCookie(_n_cookie_convkwd, buykeyword, expiredDate, "/", domain);
1165			} else if ( cpc_src == "nate") {
1166				// ADD COOKIE ( NATE );
1167				n_SetCookie(_n_cookie_convtype, "NATE", expiredDate, "/", domain);
1168				n_SetCookie(_n_cookie_convkwd, buykeyword, expiredDate, "/", domain);
1169			}
1170		}
1171	}
1172}
1173
1174function n_isIpType(val) {
1175	if ( val.length != 4 ) return false;
1176
1177	for ( var i=0; i < 4; i++) {
1178		if ( !n_isInteger(val[i]) ) {
1179			return false;
1180		}
1181	}
1182
1183	return true;
1184}
1185/* @Deprecated 7.0.1.1 */
1186function n_isInteger(val) {
1187	if (n_isBlank(val)) {
1188		return false;
1189	}
1190
1191	for ( var i=0; i < val.length;i++) {
1192		if ( !n_isDigit(val.charAt(i))) {
1193			return false;
1194		}
1195	}
1196
1197	return true;
1198}
1199/* @Deprecated 7.0.1.1 */
1200function n_isDigit(num) {
1201	if ( num.length>1) {
1202		return false;
1203	}
1204
1205	var string="1234567890";
1206
1207	if ( string.indexOf(num) != -1) {
1208		return true;
1209	}
1210
1211	return false;
1212}
1213/* @Deprecated 7.0.1.1 */
1214function n_isBlank(val) {
1215	if (val == null) {
1216		return true;
1217	}
1218
1219	for (var i=0; i < val.length; i++) {
1220		if ( (val.charAt(i) != ' ') && (val.charAt(i) != "\t")&&(val.charAt(i) != "\n") && (val.charAt(i)!= "\r")) {
1221			return false;
1222		}
1223	}
1224
1225	return true;
1226}
1227n_logging();

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.