function get_ace_Value(str,name,div){
        str = str + div ;
	while(str.indexOf(div)>0){
		tmpstr = str.substring(0,str.indexOf(div));
		str = str.substring(str.indexOf(div)+1,str.length);
		if( tmpstr.indexOf(name+'=') == 0 ){
			return tmpstr.substring(name.length+1,tmpstr.length);
		}
	}
	return '';
}

if( typeof NL_CODE == 'undefined' ){
var NL_CODE='',NL_sec=0,NL_kisa='',NL_top='',NL_PID=0,NL_TID=0;
}
if( typeof NL_dim == 'undefined' ){
var NL_dim='',NL_tz=20,NL_ja='Unknown' ,NL_bn='Unknown',NL_bv='Unknown',NL_sc='Unknown',NL_sv=10,NL_ref='',NL_arg='',NL_av='',NL_je='n',NL_ul='Unknown',NL_ua='Unknown',NL_UA='Unknown',NL_rl='',NL_os='Unknown',NL_version='Unknown',NL_ad_key='',NL_xrl='',NL_cd='',NL_cpu='',NL_bz='',NL_ref_dm='',NL_url_dm='',NL_pref_dm='',NL_tref_dm='';
}

if( typeof NU_rl == 'undefined' ) NU_rl = '' ;
if( typeof NL_CODE == 'undefined' ) NL_CODE = '' ;
NL_tz = Math.floor((new Date()).getTimezoneOffset()/60) + 29 ;
if( NL_tz > 24 ) NL_tz = NL_tz - 24 ;
if( typeof NL_ag == 'undefined' ) NL_ag = 0 ;
if( typeof NL_id == 'undefined' ) NL_id = '' ;
if( typeof NL_mr == 'undefined' ) NL_mr = 'unknown';
if( typeof NL_gd == 'undefined' ) NL_gd = 'unknown';
if( typeof NL_skey == 'undefined' ) NL_skey = '';
if( typeof NL_jn == 'undefined' ) NL_jn = '';
if( typeof NL_inc == 'undefined' ) NL_inc = 0;
if( typeof NL_loc == 'undefined' ) NL_loc = '';

if( !NL_inc || typeof NL_inc == 'string' ){ NL_inc = 0 ; }
else{ NL_inc = parseInt(NL_inc); }
if( NL_inc < 0 ){ NL_inc = 0; }
else{ NL_inc = Math.floor(NL_inc/1000)*1000 ; }


if( typeof NL_menu == 'undefined' ) var NL_menu = '' ;

if( typeof NL_name == 'undefined' ) var NL_name = document.title.substring(0,32) ;

if( !NL_ag || typeof NL_ag == 'string' ){ NL_ag = 0 ; }
else{ NL_ag = parseInt(NL_ag); }
if( NL_ag < 0 || NL_ag > 150 ){ NL_ag = 0; }
else{ NL_ag = Math.floor(NL_ag/10)*10 ; }
if( NL_gd != 'man' && NL_gd != 'woman' ){ NL_gd ='unknown';}
if( NL_mr != 'married' && NL_mr != 'single' ){ NL_mr ='unknown';}
if( NL_jn != 'join' && NL_jn != 'withdraw' ){ NL_jn ='';}

NL_je = (navigator.javaEnabled()==true)?'1':'0';
NL_bn=navigator.appName;
if(NL_bn.substring(0,9)=="Microsoft") NL_bn="MSIE";

NL_cpu=navigator.cpuClass;  NL_bz=navigator.appName;  NL_pf=navigator.platform;  NL_av=navigator.appVersion;  NL_bv=parseFloat(NL_av) ;
if((NL_bn=="MSIE")&&(parseInt(NL_bv)==2) ) NL_bv=3.01;
NL_ref=document.referrer;
var NL_pre_rl = '' ;
var NL_tailrl = '' ;
if( typeof("parent.document") != "unknown" ){
        eval("try{ NL_pre_rl = parent.document.URL ;}catch(_e){ NL_pre_rl='';}");
        if( NL_pre_rl.indexOf('#') > 8 ){
                NL_tailrl = "#" + NL_pre_rl.substring(NL_pre_rl.indexOf('#')+1,NL_pre_rl.length);
                NL_pre_rl = NL_pre_rl.substring(0,NL_pre_rl.indexOf('#'));
        }
        if( document.URL.indexOf('?') > 0 ){
                NL_ad_key = document.URL.substring(document.URL.indexOf('?')+1,document.URL.length);
        }
        if( NL_pre_rl != document.URL && NL_pre_rl.indexOf('?') > 0 ){
                NL_ad_key = NL_pre_rl.substring(NL_pre_rl.indexOf('?')+1,NL_pre_rl.length);
        }
}
if( document.referrer == NL_pre_rl ){   eval("try{ NL_ref = parent.document.referrer ;}catch(_e){ NL_ref = '';}");}
else{   NL_ref = document.referrer ; }
NL_rl=document.URL;

if( NL_rl.indexOf('#') < 5 ){ NL_rl += NL_tailrl ;}
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('/'));

if(NL_url_dm == 'donga.com') NL_url_dm = 'www.donga.com';

var NL_dir = '';
if( NL_rl.indexOf('/') > 0 ){
	NL_dir = NL_url_dm + NL_rl.substring(NL_rl.indexOf('/'),NL_rl.length);
}



var MCODELIST = Array(0);
var VLST = Array(0);

MCODELIST['www.donga.com/'] = '111';
MCODELIST['www.donga.com/index.html'] = '111';
MCODELIST['www.donga.com/news/politics.html'] = '112';
MCODELIST['www.donga.com/news/society.html'] = '113';
MCODELIST['www.donga.com/news/inter.html'] = '114';
MCODELIST['www.donga.com/news/economy/biz_top.html'] = '115';
MCODELIST['www.donga.com/news/it.html'] = '116';
MCODELIST['www.donga.com/news/culture.html'] = '117';
MCODELIST['www.donga.com/news/tv.html'] = '118';
MCODELIST['www.donga.com/news/column.html'] = '119';
MCODELIST['www.donga.com/news/people.html'] = '120';
MCODELIST['www.donga.com/news'] = '237';
MCODELIST['www.donga.com/news/'] = '237';
MCODELIST['etv.donga.com/newsclip/'] = '270';

var  CLST = Array('112','112','113','114','114','115','116','117','117','117',
'117','117','118','119','120','121','121','122','123','124',
'125','126','127','128','129','130','131','132','132','133',
'134','134','135','136','136','136','136','137','136','136',
'125','125','125','125','113','113','115','115','115','114',
'132','132','132','125','215','216','237','216','243','243',
'266','270','271','272','273','308','308');

VLST[0] = 'www.donga.com/fbin/output?f=a_s';
VLST[1] = 'www.donga.com/fbin/output?f=totala&ode=a__';
VLST[2] = 'www.donga.com/fbin/output?f=c_s';
VLST[3] = 'www.donga.com/fbin/output?f=f_s';
VLST[4] = 'www.donga.com/fbin/output?f=totalf&ode=f__';
VLST[5] = 'www.donga.com/fbin/output?f=b0s';
VLST[6] = 'www.donga.com/fbin/output?f=k_s';
VLST[7] = 'www.donga.com/fbin/output?f=j_s';
VLST[8] = 'www.donga.com/fbin/moeum?n=books';
VLST[9] = 'www.donga.com/fbin/moeum?n=culture';
VLST[10] = 'www.donga.com/books/';
VLST[11]= 'www.donga.com/fbin/output?f=totalj&code=j__';
VLST[12] = 'www.donga.com/fbin/moeum?n=tv';
VLST[13]= 'www.donga.com/fbin/output?f=i_s';
VLST[14]= 'www.donga.com/fbin/output?f=g_s';
VLST[15]= 'www.donga.com/fbin/output?f=todaynews';
VLST[16]= 'www.donga.com/fbin/output?f=total';
VLST[17]= 'www.donga.com/asp/';
VLST[18]= 'mplay.donga.com/news/';
VLST[19]= 'www.donga.com/billing/kisadb/ipq_view.php';
VLST[20]= 'www.donga.com/foreign/';
VLST[21]= 'www.donga.com/fbin/dfsrch';
VLST[22]= 'www.donga.com/fbin/ppvc?b=';
VLST[23]= 'www.donga.com/texthome/';
VLST[24]= 'www.donga.com/news/newsbbs/';
VLST[25]= 'www.donga.com/news/brief.html';
VLST[26]= 'www.donga.com/news/videoreport-full.html';
VLST[27]= 'www.donga.com/fbin/output?f=totalne';
VLST[28]= 'www.donga.com/fbin/output?lifenews=home&f=nls';
VLST[29]= 'www.donga.com/fbin/output?f=aps&n=';

VLST[30]= 'www.donga.com/news/donga_album/donga_album/';
VLST[31]= 'www.donga.com/docs/news/newsphoto/forest/';

VLST[32]= 'www.donga.com/docs/magazine/woman/2002woman_donga/serial/';
VLST[33]= 'www.donga.com/sports/';
VLST[34]= 'www.donga.com/fbin/output?f=totalA&code=A__';
VLST[35]= 'www.donga.com/fbin/output?f=totalC&code=C__';
VLST[36]= 'marathon.donga.com';
VLST[37]= 'www.donga.com/fbin/output?f=total&code=total&n=';

VLST[38]= 'www.donga.com/fbin/output?f=e_s';
VLST[39] = 'www.donga.com/fbin/moeum?n=sports';
VLST[40] = 'japan.donga.com';
VLST[41] = 'english.donga.com';
VLST[42] = 'chinese.donga.com';
VLST[43] = 'china.donga.com';
VLST[44] = 'www.donga.com/fbin/moeum?n=society$c_';
VLST[45] = 'www.donga.com/fbin/output?f=totalc&code=c__';
 
VLST[46] = 'www.donga.com/fbin/output?f=totalb0&code=b0_';
VLST[47] = 'www.donga.com/fbin/moeum?n=dongaeconomy$b1_';
VLST[48] = 'www.donga.com/fbin/moeum?n=dongaeconomy2$b3_';
VLST[49] = 'www.donga.com/fbin/moeum?n=inter$f_';
VLST[50] = 'www.donga.com/fbin/output?f=incnc&code=nc_';
VLST[51] = 'www.donga.com/fbin/output?exclusive=news&f=nes';
VLST[52] = 'www.donga.com/fbin/output?todayissue=home&f=nis';
VLST[53] = 'japanese.donga.com';
VLST[54] = 'etv.donga.com';
VLST[55] = 'rss.donga.com';
VLST[56] = 'www.donga.com/news/index.html';
VLST[57] = 'www.donga.com/news/rss/';
VLST[58] = 'www.donga.com/fbin/output?f=totalne&code=ne_';
VLST[59] = 'www.donga.com/fbin/output?f=ne_&n=';
VLST[60] = 'www.donga.com/wpp/';
VLST[61] = 'etv.donga.com/newsclip/index.html';
VLST[62] = 'etv.donga.com/newsclip/videoreport.php';
VLST[63] = 'etv.donga.com/newsclip/pictorial_ad.php';
VLST[64] = 'etv.donga.com/foreign_view.php';
VLST[65] = 'sports.donga.com';
VLST[66] = 'wbc.donga.com';

NL_TID = 1;
NL_PID = 0;

NL_ref_dm = NL_ref + '/';
NL_ref_dm = NL_ref_dm.substring(0,NL_ref_dm.indexOf('/'));
if(NL_ref_dm == 'donga.com' ) NL_ref_dm = 'www.donga.com' ;
NL_tref_dm = NL_ref_dm.substring(NL_ref_dm.indexOf('.')+1,NL_ref_dm.length);
if(NL_tref_dm == 'donga.com' ) NL_tref_dm = 'INSIDE';
if(NL_tref_dm == 'dkbnews.com' ) NL_tref_dm = 'INSIDE';
if(NL_tref_dm == 'www.dkbnews.com' ) NL_tref_dm = 'INSIDE';

var NL_NID='';
var NL_param_rl = '';
if( NL_rl.indexOf('?') > 0 ){
	NL_param_rl = NL_rl.substring(NL_rl.indexOf('?')+1,NL_rl.length);
}
if( NL_param_rl.length > 0 ){
var CIDLST = Array(0);

CIDLST['7'] = '243';
CIDLST['200507180000544'] = '273';
CIDLST['200507180000545'] = '273';
CIDLST['200609260001453'] = '273';
CIDLST['200507180000546'] = '273';
CIDLST['200701310001767'] = '273';
CIDLST['200701310001766'] = '273';
CIDLST['station'] = '304';

if( NL_rl.indexOf('www.donga.com/fbin/output?f=') == 0 ){ NL_NID = get_ace_Value(NL_param_rl,'dk','&');};
if( NL_rl.indexOf('etv.donga.com/newsclip/videoreport.php?') == 0 ){ NL_NID = get_ace_Value(NL_param_rl,'clip_index','&');};
if( NL_rl.indexOf('etv.donga.com/view.php?') == 0 ){ NL_NID = get_ace_Value(NL_param_rl,'code','&');};

if( NL_NID.length > 0 ){
if( typeof CIDLST[NL_NID] != 'undefined') NL_CODE = CIDLST[NL_NID] ;
}

}

if( NL_CODE.length == 0 && MCODELIST[NL_dir] != '' && MCODELIST[NL_dir] != 'undefined' && typeof MCODELIST[NL_dir] != 'undefined'){
	NL_CODE = MCODELIST[NL_dir] ;
}

if( NL_CODE.length == 0  ){
for( i = 0 ; i < VLST.length ; i ++){
	if( NL_dir.indexOf(VLST[i]) == 0 ){
		NL_CODE = CLST[i];
	} 
}
}

if(NL_CODE == '' || NL_CODE == 'undefined' || NL_CODE == 'unknown' ) NL_CODE = '111' ;


var NL_CODE_L = Array('10','269');
var NL_CODE_V = Array(0);
NL_CODE_V[0] = '|216|266|259|112|115|114|113|116|117|136|118|119|120|134|135|123|124|122|121|125|126|137|130|131|129|128|127|132|133|243|140|';
NL_CODE_V[1] = '|270|271|272|273|215|304|';

for( i = 0 ; i < NL_CODE_L.length ; i ++ ){
	if(NL_CODE_V[i].indexOf('|'+NL_CODE+'|') >= 0 ){
		NL_PID = NL_CODE_L[i] ;
	}
}
NL_TID = 1 ;


if( NL_CODE.length == 3 ){
  if( NL_ref_dm == 'www.donga.com' ) NL_pref_dm = 'INSIDE';
  if( NL_ref_dm == 'donga.com' ) NL_pref_dm = 'INSIDE';
}

if( NL_rl.indexOf('/fbin/output?') > 0 && NL_rl.indexOf('&top20=') > 0 ) NL_kisa = 'K';
NL_cd=(NL_bn=="MSIE")?screen.colorDepth:screen.pixelDepth;
NL_UA = navigator.userAgent;
NL_ua = navigator.userAgent.toLowerCase();
if (navigator.language) {  NL_ul = navigator.language.toLowerCase();
} else if (navigator.userLanguage) {  NL_ul = navigator.userLanguage.toLowerCase();}
NL_start = NL_UA.indexOf('(') + 1;
NL_end = NL_UA.indexOf(')');
NL_str = NL_UA.substring(NL_start, NL_end);
NL_info = NL_str.split('; ');
NL_Component = 'UNKNOWN' ;
if (NL_ua.indexOf('msie') != -1) {
  NL_Component = navigator.appName;
  NL_str = NL_info[1].substring(5, NL_info[1].length);
  NL_version = parseFloat(NL_str);
} else if ( NL_ua.indexOf('opera') != -1 ){
  NL_Component = "Opera" ;
} else if ((NL_st = NL_ua.indexOf('firefox')) >0 ){
  NL_Component = "Firefox" ;
  NL_version = NL_ua.substring(NL_st+8, NL_ua.indexOf('.',NL_st+8)); 
} else if ((NL_st = NL_ua.indexOf('chrome')) > 0){ 
  NL_Component = 'Chrome'; 
  NL_version = parseFloat(NL_ua.substring(NL_st+7,NL_ua.indexOf(' ',NL_st+7))); 
} else if ((NL_st = NL_ua.indexOf('safari')) > 0){ 
  NL_Component = "Safari";  
  NL_version = parseFloat(NL_ua.substring(NL_st+7, NL_ua.indexOf(' ',NL_st+7))); 
} else if ((NL_start = NL_ua.indexOf("netscape6")) > 0) {
  NL_Component = "Netscape";
  NL_version = NL_ua.substring(NL_start+10, NL_ua.length);
  if ((NL_start = NL_version.indexOf("b")) > 0 ) {
    NL_str = NL_version.substring(0,NL_version.indexOf("b"));
    NL_version = NL_str ;
  }
} else if ((NL_start = NL_ua.indexOf("netscape/7")) > 0) {
  NL_Component = "Netscape";
  NL_version = NL_ua.substring(NL_start+9, NL_ua.length);
  if ((NL_start = NL_version.indexOf("b")) > 0 ) {
    NL_str = NL_version.substring(0,NL_version.indexOf("b"));
    NL_version = NL_str ;
  }
} else {
  if (NL_ua.indexOf("gecko") > 0) {
    NL_Component = "Mozilla";
  } else if (NL_ua.indexOf("nav") > 0) {
    NL_Component = "Netscape Navigator";
  } else {
    NL_Component = navigator.appName ;;
  }
}
if (parseInt(NL_version) == parseFloat(NL_version)) {  NL_version = NL_version + ".0"; }
NL_bz = NL_Component ;

if( NL_pf.indexOf('undefined') >= 0 || NL_pf ==  '' ){ NL_os = 'UNKNOWN' ;}
else{ NL_os = NL_pf ; }

if( NL_os.indexOf('Win32') >= 0 ){
if( NL_av.indexOf('98')>=0){ NL_os = 'Windows 98' ; }
else if( NL_av.indexOf('95')>=0 ){ NL_os = 'Windows 95' ; }
else if( NL_av.indexOf('Me')>=0 ){ NL_os = 'Windows Me' ; }
else if( NL_av.indexOf('NT')>=0 ){ NL_os = 'Windows NT' ; }
else{ NL_os = 'Windows' ; }
if( NL_av.indexOf('NT 5.0')>=0){ NL_os = 'Windows 2000' ; }
if( NL_av.indexOf('NT 5.1')>=0){ NL_os = 'Windows XP' ; }
if( NL_av.indexOf('NT 5.2')>=0){ NL_os = 'Windows Server 2003' ; }
if( NL_av.indexOf('NT 6.0')>=0){ NL_os = 'Windows Vista' ; }
}
NL_pf_substr = NL_pf.substring(0,4);

if( NL_pf_substr == 'Wind'){
if( NL_pf_substr == 'Win1'){ NL_os = 'Windows 3.1'; }
else if( NL_pf_substr == 'Mac6' ){ NL_os = 'Mac' ; }
else if( NL_pf_substr == 'MacO' ){ NL_os = 'Mac' ; }
else if( NL_pf_substr == 'MacP' ){ NL_os = 'Mac' ; }
else if(  NL_pf_substr == 'Linu' ){ NL_os = 'Linux' ; }
else if(  NL_pf_substr == 'WebT' ){ NL_os = 'WebTV' ; }
else if(  NL_pf_substr =='OSF1' ){ NL_os = 'Compaq Open VMS' ; }
else if(  NL_pf_substr == 'HP-U' ){ NL_os = 'HP Unix' ;}
else if(  NL_pf_substr == 'OS/2' ){ NL_os = 'OS/2' ;}
else if( NL_pf_substr == 'AIX4' ){ NL_os = 'AIX';}
else if( NL_pf_substr == 'Free' ){ NL_os = 'FreeBSD';}
else if( NL_pf_substr == 'SunO' ){ NL_os = 'SunO';}
else if( NL_pf_substr == 'Drea' ){ NL_os = 'Drea'; }
else if( NL_pf_substr == 'Plan' ){ NL_os = 'Plan'; }
else{ NL_os = 'UNKNOWN'; }
}
if( NL_cpu == 'x86' ){ NL_cpu = 'Intel x86';}
else if( NL_cpu == 'PPC' ){ NL_cpu = 'Power PC';}
else if( NL_cpu == '68k' ){ NL_cpu = 'Motorola 680x';}
else if( NL_cpu == 'Alpha' ){ NL_cpu = 'Compaq Alpa';}
else if( NL_cpu == 'Arm' ){ NL_cpu = 'ARM';}
else{ NL_cpu = 'UNKNOWN';}
if( NL_dim == '' || NL_dim == 'undefined'){ NL_dim = '0*0';}

