var NL_CODE='';
var NL_ref='',NL_rl='',NL_ad_key='',NL_rl='',NL_url_dm='';

NL_ref=document.referrer;

var NL_pre_url='';var NL_frm=false; 
if( typeof top.frames.length=='number' && top.frames.length > 0 ){
NL_frm = true;
}; 
if(NL_frm){
eval("try{NL_pre_url = top.document.URL;}catch(_e){NL_pre_url='';};");
if( NL_pre_url.indexOf('#') > 0 ) NL_pre_url=NL_pre_url.substring(0,NL_pre_url.indexOf('#'));
if( NL_ref.indexOf('#') > 0 ) NL_ref=NL_ref.substring(0,NL_ref.indexOf('#'));
if( NL_pre_url.charAt(NL_pre_url.length-1)=='/') NL_pre_url = NL_pre_url.substring(0,NL_pre_url.length-1);
if( NL_ref.charAt(NL_ref.length-1)=='/') NL_ref = NL_ref.substring(0,NL_ref.length-1); 
if( NL_ref == NL_pre_url || NL_ref == '' ){
eval("try{NL_ref=top.document.referrer;}catch(_e){NL_ref='';}");
if( document.cookie.indexOf('ACE_CK=') > -1 ){ 
NL_ref = NL_pre_url;
}else{
if(NL_pre_url.indexOf('?')>0) NL_ad_key = NL_pre_url.substring(NL_pre_url.indexOf('?')+1,NL_pre_url.length);
if( NL_pre_url.indexOf('OVRAW=') > 0 ){
NL_ad_key = 'src=overture';};};
   };
}
else{
if( NL_ref.indexOf('#') > 0 ) NL_ref=NL_ref.substring(0,NL_ref.indexOf('#'));
if(document.URL.indexOf('?')>0) NL_ad_key = document.URL.substring(document.URL.indexOf('?')+1,document.URL.length);
}

NL_rl=document.URL;

if(NL_rl.indexOf('#')>0) NL_rl=NL_rl.substring(0,NL_rl.indexOf('#'));
if(NL_rl.charAt(NL_rl.length)=='/') NL_rl=NL_rl.substring(0,NL_rl.length-1);
if(NL_rl.indexOf('://')>0) NL_rl=NL_rl.substring(NL_rl.indexOf('://')+3,NL_rl.length);
if(NL_ref.charAt(NL_ref.length)=='/') NL_ref=NL_ref.substring(0,NL_ref.length-1);
if(NL_ref.indexOf('://')>0) NL_ref=NL_ref.substring(NL_ref.indexOf('://')+3,NL_ref.length);
if( (NL_ref=='undefined')||( NL_ref == '' )) NL_ref = 'bookmark' ;





NL_url_dm = NL_rl + '/';
NL_url_dm = NL_url_dm.substring(0,NL_url_dm.indexOf('/'));

var VLST = Array(0);

var CLST = Array(
'AI1A31125818574','AI1A31125818574','AI2A31125818557','AI1A31125818558','AI2A31125818573', // 0 ~
'AI2A31125818559','AI2A31125818559','AI2A31125818559','AI1A31125818560','AI2A31125818561', // 5 ~
'AS2A32955018562','AI1A31125818562','AI2A31125818563','AI1A31125818564','AI1A31125818564', // 10 ~
'AI2A31125818565','AI2A31125818565','AI1A31125818566','AI1A31125818566','AI2A31125818567', // 15 ~
'AI2A31125818567','AI1A31125818568','AI1A31125818568','AI1A31125818568','AI1A31125818568', // 20 ~
'AI2A31125818569','AI2A31125818569','AI1A31125818570','AI1A31125818570','AI1A31125818570', // 25 ~
'AI1A31125818570','AI2A31125818571','AI2A31125818571','AI1A31125818572','AI1A31125818572', // 30 ~
'AI2A31140618657','AI1A31140618658','AI1A31164418793','AI1A31164418793','AI1A31164418793', // 35 ~
'AI1A31164418793','AI1A31166518802','AI1A31166518802','AI1A31233719158','AI1A31233719158', // 40 ~
'AI2A31233719157','AI2A31233719157','AI1A31293619444','AI1A31293619444','AI2A31293619443', // 45 ~
'AI2A31293619443','AI2A31375619842','AI2A31375619842','AI1A31375619841','AI1A31375619841', // 50 ~
'AI2A31378519864','AI1A31378519865','AI2A31378519866','AI2A31378519866','AI1A31378519867', // 55 ~
'AI1A31378519867','AI2A31385819937','AI2A31385819937','AI1A31433620186','AI1A31433620186', // 60 ~
'AI2A31452820286','AI2A31452820286','AI1A31452820287','AI2A31452820288','AI1A31461820334', // 65 ~
'AI1A31461820334','AI2A31481120462','AI2A31481120462','AI2A31536620768','AI1A31536620767', // 70 ~
'AI2A31536620766','AI2A31543620788','AI2A31543620788','AI3A31580121318','AI3A31580121318', // 75 ~
'AI3A31580221319','AI3A31580221319','AI3A31580221320','AI3A31580221320','AI3A31702322152', // 80 ~
'AI3A31762222479','AI3A31762222479','AI3A31788822868','AI3A31788822868','AI3A31788822870', // 85 ~
'AI3A31788822870','AI3A31788822870','AI3A31788822870','AI3A31815223097','AI3A31815223097', // 90 ~
'AI3A31815223097','AI3A31815223097','AI3A31901523771','AI3A31901523771','AI4A32086124929', // 95 ~
'AI4A32086124929','AI4A32086124930','AI4A32086124930','AI4A32086124931','AI4A32086124931', // 100 ~
'AI4A32086124932','AI4A32086124932','AI4A32086124933','AI4A32086124933','AI4A32086124934', // 105 ~
'AI4A32086124934','AI4A32086124937','AI4A32086124937','AI4A32086124938','AI4A32086124938', // 110 ~
'AI4A32115225069','AI4A32115225069','AI4A32149025252','AI4A32149025252','AI4A32158625326', // 115 ~
'AI4A32158625326','AI4A32158625326','AI4A32158625326','AI4A32241625934','AI4A32241625934', // 120 ~
'AI4A32241625933','AI4A32241625933','AI4A32326526497','AI4A32456227356','AI4A32456227357', // 125 ~
'AI4A32456327358','AI4A32456327359','AI4A32457727361','AI3A32587228019','AI3A32587228019', // 130 ~
'AI3A32587228019','AI3A32587228019','AI4A32702828557','AI3A32704928573','AI3A32704928573', // 135 ~
'AI4A32456327358','AI4A32729328692','AI4A32736828711','AI3A32736828712','AI4A32760428851', // 140 ~
'AI4A32755928820','AI4A32796229000','AI4A32796229000','AI4A32911929551','AI4A32926229631', // 145 ~
'AI3A32926329632','AI4A32926329633','AI3A32926329635','AI4A32926329637','AI4A32926329637', // 150 ~
'AI3A32926429638','AI4A32926429639','AI3A32926429641','AI3A32926429641','AI4A32926529642', // 155 ~
'AI4A32926529642','AI4A32930629681','AI4A32930629681','AS2A32955018562','AI3A33127930418', // 160~
'AI3A33127930418','AI4A33276631041','AI3A33351031385','AI3A33446831743','AI3A33446831743', // 165~
'AI4A33446831745','AI4A33446831745','AI3A33446831746','AI4A33446831747','AI3A33446831748', // 170~
'AI3A33446831748','AI4A33446831749','AI4A33446831749','AI3A33446831750','AI3A33497631986', // 175~
'AI4A33497631952','AI4A33497631987','AI3A33497631988','AI4A33497631990','AI3A33497631991', // 180~
'AI4A33497631992','AI3A33497631993','AI4A33497631994','AI3A33497631995','AI4A33497631996', // 185~
'AI3A33497631997','AI4A33497631998','AI3A33497631999','AI4A33497632000','AI3A33497632001', // 190~
'AI4A33499932010','AI4A33499932010','AI2A33545332249','AI2A31125818561','AI2A31125818561', // 195~
'AI2A33703832973','AI2A33703832973' // 200~
);

VLST[0] = 'www.modetour.com';
VLST[1] = 'modetour.com';
VLST[2] = 'samsungtne.modetour.co.kr';
VLST[3] = 'shinhan.modetour.co.kr';
VLST[4] = 'chb.modetour.co.kr';
VLST[5] = 'abroad.travel.naver.com';
VLST[6] = 'travel.naver.com';
VLST[7] = 'mode.travel.naver.com';
VLST[8] = 'modetour.cjmall.com';
VLST[9] = 'tour.homeplus.co.kr';
VLST[10] = 'www.emodetour.co.kr';
VLST[11] = 'emodetour.co.kr';
VLST[12] = 'travelshop.chosun.com';
VLST[13] = 'www.iroh.com';
VLST[14] = 'iroh.com';
VLST[15] = 'www.eyeofeagle.co.kr';
VLST[16] = 'eyeofeagle.co.kr';
VLST[17] = 'www.mode-tour.com';
VLST[18] = 'mode-tour.com';
VLST[19] = 'www.yes-modetour.com';
VLST[20] = 'yes-modetour.com';
VLST[21] = 'www.modetravel.com';
VLST[22] = 'modetravel.com';
VLST[23] = 'www.modetour.cc';
VLST[24] = 'modetour.cc';
VLST[25] = 'www.modotour.co.kr';
VLST[26] = 'modotour.co.kr';
VLST[27] = 'www.tourmaul.com';
VLST[28] = 'tourmaul.com';
VLST[29] = 'www.tourmaul.co.kr';
VLST[30] = 'tourmaul.co.kr';
VLST[31] = 'www.e-modetour.co.kr';
VLST[32] = 'e-modetour.co.kr';
VLST[33] = 'www.gomodetour.co.kr';
VLST[34] = 'gomodetour.co.kr';
VLST[35] = 'l-club.modetour.co.kr';
VLST[36] = 'lggolf.modetour.co.kr';
VLST[37] = 'www.modetourcall.com';
VLST[38] = 'modetourcall.com';
VLST[39] = 'www.modetourcall.co.kr';
VLST[40] = 'modetourcall.co.kr';
VLST[41] = 'www.modetourplus.com';
VLST[42] = 'modetourplus.com';
VLST[43] = 'www.modetour4u.com';
VLST[44] = 'modetour4u.com';
VLST[45] = 'www.vip-modetour.com';
VLST[46] = 'vip-modetour.com';
VLST[47] = 'www.i-modetour.com';
VLST[48] = 'i-modetour.com';
VLST[49] = 'www.tourmode.com';
VLST[50] = 'tourmode.com';


VLST[51] = 'www.modetourgreen.com';
VLST[52] = 'modetourgreen.com';
VLST[53] = 'www.poscotour.com';
VLST[54] = 'poscotour.com';


VLST[55] = 'modetour.daum.net';
VLST[56] = 'abroad.empas.com';
VLST[57] = 'www.onlinemodetour.com';
VLST[58] = 'onlinemodetour.com';
VLST[59] = 'www.mode.ne.kr';
VLST[60] = 'mode.ne.kr';

VLST[61] = 'www.tourich.co.kr';
VLST[62] = 'tourich.co.kr';
VLST[63] = 'www.modernair.co.kr';
VLST[64] = 'modernair.co.kr';

VLST[65] = 'www.mode-tour.net';
VLST[66] = 'mode-tour.net';
VLST[67] = 'golfsamsung.modetour.co.kr';
VLST[68] = 'nonghyup.modetour.co.kr';

VLST[69] = 'www.modetour.cn';
VLST[70] = 'modetour.cn';
VLST[71] = 'www.modetournet.co.kr';
VLST[72] = 'modetournet.co.kr';
VLST[73] = 'travelmod.tour.daum.net';
VLST[74] = 'travelmod.tourexpress.com';
VLST[75] = 'modetour.tourcabin.com';
VLST[76] = 'www.yestour.co.kr';
VLST[77] = 'yestour.co.kr';
VLST[78] = 'www.modetour2u.com';
VLST[79] = 'modetour2u.com';
VLST[80] = 'www.emodetours.co.kr';
VLST[81] = 'emodetours.co.kr';
VLST[82] = 'www.okcashbagtour.com';
VLST[83] = 'okcashbagtour.com';
VLST[84] = 'samsungtne.modetour.co.kr';
VLST[85] = 'modetour.shinsegae.com';
VLST[86] = 'mall.shinsegae.com';
VLST[87] = 'www.modemate.com';
VLST[88] = 'modemate.com';
VLST[89] = 'www.emodutour.com';
VLST[90] = 'emodutour.com';
VLST[91] = 'www.emodutour.co.kr';
VLST[92] = 'emodutour.co.kr';
VLST[93] = 'www.gmodetour.co.kr';
VLST[94] = 'gmodetour.co.kr';
VLST[95] = 'www.gmodetour.com';
VLST[96] = 'gmodetour.com';
VLST[97] = 'www.sunmodetour.com';
VLST[98] = 'sunmodetour.com';
VLST[99] = 'www.modetour.gs';
VLST[100] = 'modetour.gs';
VLST[101] = 'www.modetourkorea.com';
VLST[102] = 'modetourkorea.com';
VLST[103] = 'www.mymodetour.co.kr';
VLST[104] = 'mymodetour.co.kr';

VLST[105] = 'vip.modetour.co.kr';
VLST[106] = 'vip.modetour.co.kr';

VLST[107] = 'www.modetravel.co.kr';
VLST[108] = 'modetravel.co.kr';
VLST[109] = 'www.modutour.org';
VLST[110] = 'modutour.org';

VLST[111] = 'www.imodetour.com';
VLST[112] = 'imodetour.com';
VLST[113] = 'www.topmodetour.net';
VLST[114] = 'topmodetour.net';
VLST[115] = 'www.modutravel.com';
VLST[116] = 'modutravel.com';
VLST[117] = 'www.modtour.co.kr';
VLST[118] = 'modtour.co.kr';
VLST[119] = 'www.modetourtravel.com';
VLST[120] = 'modetourtravel.com';
VLST[121] = 'www.modetour.info';
VLST[122] = 'modetour.info';
VLST[123] = 'www.mode.ne.kr';
VLST[124] = 'mode.ne.kr';
VLST[125] = 'go.modetour.co.kr';
VLST[126] = 'modutouro.com';
VLST[127] = 'mall.modetour.co.kr';
VLST[128] = 'joins.modetour.co.kr';
VLST[129] = 'tourjockey.modetour.co.kr';
VLST[130] = 'www.modetour1004.com';
VLST[131] = 'thy.modetour.co.kr';

VLST[132] = 'www.modetour.co.kr/tour_agent/nomadtour/main.asp';

VLST[133] = 'www.freemode.co.kr';
VLST[134] = 'freemode.co.kr';
VLST[135] = 'www.freemode.com';
VLST[136] = 'freemode.com';

VLST[137] = 'free.modetour.co.kr';
VLST[138] = 'www.themodetour.com';
VLST[139] = 'themodetour.com';
VLST[140] = 'modetour1004.com';
VLST[141] = 'modetour.gseshop.co.kr';

VLST[142] = 'samsungtne.korea.com';
VLST[143] = 'shinhancard.modetour.co.kr';

VLST[144] = 'tour.interpark.com';
VLST[145] = 'tourpkg.interpark.com';

VLST[146] = 'www.modetourn.kr';
VLST[147] = 'modetourn.kr';
VLST[148] = 'samsungtne1.modetour.co.kr';
VLST[149] = 'blue.modetour.co.kr';

VLST[150] = 'wj.modetour.co.kr';
VLST[151] = 'modetour.justgo.kr';
VLST[152] = 'ctlplus.modetour.co.kr';
VLST[153] = 'modecall.com';
VLST[154] = 'www.modecall.com';

VLST[155] = 'www.modecall.co.kr';
VLST[156] = 'homever.modetour.co.kr';
VLST[157] = 'www.izonetour.com';
VLST[158] = 'izonetour.com';
VLST[159] = 'www.i-parktour.co.kr';

VLST[160] = 'i-parktour.co.kr';
VLST[161] = 'www.modesmart.com';
VLST[162] = 'modesmart.com';

VLST[163] = 'emodetour.co.kr';

VLST[164] = 'www.modetourdot.com';
VLST[165] = 'modetourdot.com';

VLST[166] = 'amway.modetour.co.kr';

VLST[167] = 'kbmall.modetour.co.kr';

// 2008-02-27 Ãß°¡
VLST[168] = 'www.yesmodetour.com';
VLST[169] = 'yesmodetour.com';
VLST[170] = 'www.i-modetour.net';
VLST[171] = 'i-modetour.net';
VLST[172] = 'ke.modetour.co.kr';
VLST[173] = 'best.modetour.co.kr';
VLST[174] = 'www.modetourcall.net';
VLST[175] = 'modetourcall.net';
VLST[176] = 'www.misotour.co.kr';
VLST[177] = 'misotour.co.kr';
VLST[178] = 'nol.modetour.co.kr';

//2008-03-01 modetour.com ÀÇ ¼­ºê µµ¸ÞÀÎ µî·Ï
VLST[179] = 'asia.modetour.com';
VLST[180] = 'japan.modetour.com';
VLST[181] = 'china.modetour.com';
VLST[182] = 'america.modetour.com';
VLST[183] = 'pacific.modetour.com';
VLST[184] = 'europe.modetour.com';
VLST[185] = 'africa.modetour.com';
VLST[186] = 'pus.modetour.com';
VLST[187] = 'honey.modetour.com';
VLST[188] = 'jm.modetour.com';
VLST[189] = 'free.modetour.com';
VLST[190] = 'air.modetour.com';
VLST[191] = 'hotel.modetour.com';
VLST[192] = 'backpack.modetour.com';
VLST[193] = 'domestic.modetour.com';
VLST[194] = 'golf.modetour.com';

// 2008-03-20 Ãß°¡
VLST[195] = 'modetourline.com';
VLST[196] = 'www.modetourline.com';

VLST[197] = 'golf.chosun.com';		//2008-04-08 Ãß°¡

VLST[198] = 'www.homeplustour.co.kr';		//2008-05-29 Ãß°¡
VLST[199] = 'homeplustour.co.kr';		

VLST[200] = 'www.jmspecial.com';		//2008-06-13 Ãß°¡
VLST[201] = 'jmspecial.com';		

NL_url_dm = NL_rl + '/';
NL_url_dm = NL_url_dm.substring(0,NL_url_dm.indexOf('/'));

var NL_dir = '';
if( NL_rl.indexOf('/') > 0 ){
	NL_dir = NL_url_dm + NL_rl.substring(NL_rl.indexOf('/'),NL_rl.length);
}

// µµ¸ÞÀÎ ¸ÅÄª ÄÚµå ÇÒ´ç
if( NL_CODE.length == 0 ){
 for( i = 0 ; i < VLST.length ; i ++){
 if( NL_dir.indexOf(VLST[i]) == 0 )	NL_CODE = CLST[i];
 }
}





function ACE_Tracking(targeturl,mode,xidx){

	if( typeof mode == 'undefined' ) var mode = 'FLASH';
	if( typeof xidx == 'undefined' ) var xidx = '0';
	mode = mode.toUpperCase();

	if( typeof NU_x_rl == 'undefined' ) var NU_x_rl = 'http://gtb1.acecounter.com:5252';

	if(typeof NL_CODE != 'undefined' && NL_CODE.length > 9 ){
	    var ACE_F_URL = document.URL;
		if(targeturl.indexOf('://') < 0 ){
			var ACE_T_URL = '';
			if( ACE_F_URL.indexOf('?') > 0 ){
				ACE_F_URL = ACE_F_URL.substring(0,ACE_F_URL.indexOf('?'));
			}

			var spurl = ACE_F_URL.split('/') ;
			for(var ti=0;ti < spurl.length ; ti ++ ){
				if( ti == spurl.length-1 ) break ;
				if( ACE_T_URL == '' ) ACE_T_URL = spurl[ti]; 
				else ACE_T_URL += '/'+spurl[ti]; 
			}

			var ACE_URL_ARG = '';
			if( targeturl.indexOf('?') > 0 ){
				ACE_URL_ARG = targeturl.substring(targeturl.indexOf('?'),targeturl.length);
				targeturl = targeturl.substring(0,targeturl.indexOf('?'));
			}

			var spurlt = targeturl.split('/') ;
			if( spurlt.length > 0 ) targeturl = spurlt[spurlt.length-1];
			targeturl = ACE_T_URL+'/'+targeturl+ACE_URL_ARG;
			ACE_F_URL=document.URL;
		}
		ACE_F_URL = ACE_F_URL.substring(ACE_F_URL.indexOf('//')+2,ACE_F_URL.length);
		var ACE_server_url = NU_x_rl+'/?xuid='+NL_CODE+'&url='+ACE_F_URL+'&xlnk='+targeturl+'&fdv='+mode+'&xidx='+xidx+'&';
		var ACE_F_img = new Image();
		ACE_F_img.src = ACE_server_url;

		if( mode == 'FLASH' ){
			window.location.href = targeturl;
		}
	}
}
