ACTIVE = true;
SCRIPT_URL = 'http://222.68.185.248/cgi-bin/webtrend';
DOMAIN_NAME  = 'sh.ct10000.com';

siteReferrer = new Array(); // Don't modify this

siteReferrer[0] = "sh.ct10000.com";
siteReferrer[1] = "www.sh.ct10000.com";

dirChecklist = new Array();


dirChecklist[0] = "http://sh.ct10000.com/v3/ywsl/ywxz.jsp";
dirChecklist[1] = "http://sh.ct10000.com/sh10000/pub_new_set_sel_init.do";
dirChecklist[2] = "http://sh.ct10000.com/v3/cms/html/gryjt/tyydyw/";
dirChecklist[3] = "http://sh.ct10000.com/v3/workbench/expoCard/main.jsp";
dirChecklist[4] = "http://sh.ct10000.com/sh10000/billRemedy.do";
dirChecklist[5] = "http://sh.ct10000.com/sh10000/logon_noright.jsp";
dirChecklist[6] = "http://sh.ct10000.com/v3/ddds_query.do";
dirChecklist[7] = "http://sh.ct10000.com/v3/cms/html/zxdt/yhhd/";
dirChecklist[8] = "http://sh.ct10000.com/tiyan/";
dirChecklist[9] = "http://sh.ct10000.com/sh10000/queryGift.do";
dirChecklist[10] = "http://sh.ct10000.com/v3/cNetpointQuery.do";
dirChecklist[11] = "http://sh.ct10000.com/sh10000/detailBillControl.do";
dirChecklist[12] = "http://sh.ct10000.com/sh10000/pub_e6e8_chg_op_init.do";
dirChecklist[13] = "http://sh.ct10000.com/v3/commSubsidiesApply.do";
dirChecklist[14] = "http://sh.ct10000.com/v3/cms/html/zqkh/";
dirChecklist[15] = "http://sh.ct10000.com/tiyan/allknow/";
dirChecklist[16] = "http://sh.ct10000.com/v3/redirect.do?service=billQueryandPay";
dirChecklist[17] = "http://sh.ct10000.com/sh10000/pub_new_set_sel_init.do";
dirChecklist[18] = "http://sh.ct10000.com/internet/";
dirChecklist[19] = "http://sh.ct10000.com/sh10000/ywsl/ywxz.jsp";
dirChecklist[20] = "http://sh.ct10000.com/sh10000/pubBizCheckType.do";
dirChecklist[21] = "http://sh.ct10000.com/sh10000/weatherAlarmInit.do";
dirChecklist[22] = "http://sh.ct10000.com/sh10000/workbench/operation/myE189.jsp";
dirChecklist[23] = "http://sh.ct10000.com/sh10000/curAccount.do";
dirChecklist[24] = "http://sh.ct10000.com/sh10000/applyRefund.do";
dirChecklist[25] = "http://sh.ct10000.com/pptc";
dirChecklist[26] = "http://sh.ct10000.com/v3/cms/html/gryjt/dh/";
dirChecklist[27] = "http://sh.ct10000.com/v3/account_manage_pay.do";
dirChecklist[28] = "http://sh.ct10000.com/sh10000/eSurfingByCust.do";
dirChecklist[29] = "http://sh.ct10000.com/sh10000/curAccount.do";
dirChecklist[30] = "http://sh.ct10000.com/products/";
dirChecklist[31] = "http://sh.ct10000.com/cdma133/";
dirChecklist[32] = "http://sh.ct10000.com/sh10000/cNetpointQuery.do";
dirChecklist[33] = "http://sh.ct10000.com/sh10000/callOutLockUpDev.do";
dirChecklist[34] = "http://sh.ct10000.com/sh10000/ywsl/fycx.jsp";
dirChecklist[35] = "http://sh.ct10000.com/sh10000/batchPay.do";
dirChecklist[36] = "http://sh.ct10000.com/sh10000/cnet/point/";
dirChecklist[37] = "http://sh.ct10000.com/v3/recharge.do";
dirChecklist[38] = "http://sh.ct10000.com/v3/redirect.do?service=detailQuery";
dirChecklist[39] = "http://sh.ct10000.com/sh10000/queryCurTelCash.do";
dirChecklist[40] = "http://sh.ct10000.com/sh10000/wifiGetCard.do";
dirChecklist[41] = "http://sh.ct10000.com/news/";
dirChecklist[42] = "http://sh.ct10000.com/sh10000/dwqd_vip.do";
dirChecklist[43] = "http://sh.ct10000.com/v3/cms/html/gryjt/bzyzc/";
dirChecklist[44] = "http://sh.ct10000.com/v3/jxCardBalTran_init.do";
dirChecklist[45] = "http://sh.ct10000.com/sh10000/cNetpointsCar.do";
dirChecklist[46] = "http://sh.ct10000.com/sh10000/detailQUERY.do";
dirChecklist[47] = "http://sh.ct10000.com/v3/simplePrint.do";
dirChecklist[48] = "http://sh.ct10000.com/v3/pub_e6e8_chg_op_init.do";
dirChecklist[49] = "http://sh.ct10000.com/v3/EhomeAcceptedAction.do";
dirChecklist[50] = "http://sh.ct10000.com/v3/ehome_cdma_pack_init.do";
dirChecklist[51] = "http://sh.ct10000.com/v3/rt_ehome_upgrade.do";
dirChecklist[52] = "http://sh.ct10000.com/v3/pub_chg3Prom_init.do";
dirChecklist[53] = "http://sh.ct10000.com/v3/cNetPointChangeShow.do";
dirChecklist[54] = "http://sh.ct10000.com/v3/cardUserfulLife.do";
dirChecklist[55] = "http://sh.ct10000.com/sh10000/promotionChange.do";
dirChecklist[56] = "http://sh.ct10000.com/sh10000/incrementService.do";
dirChecklist[57] = "http://sh.ct10000.com/v3/accountGetCard.do";
dirChecklist[58] = "http://sh.ct10000.com/sh10000/ddds_query.do";
dirChecklist[59] = "http://sh.ct10000.com/v3/queryCurTelCash.do";
dirChecklist[60] = "http://sh.ct10000.com/v3/setmeal_sit_query.do";
dirChecklist[61] = "http://sh.ct10000.com/sh10000/sendNoteAwoke.do";
dirChecklist[62] = "http://sh.ct10000.com/v3/batchPay.do";
dirChecklist[63] = "http://sh.ct10000.com/v3/pointsIn.do";
dirChecklist[64] = "http://sh.ct10000.com/sh10000/e6e8_apply";
dirChecklist[65] = "http://sh.ct10000.com/sh10000/query_pcm.do";
dirChecklist[66] = "http://sh.ct10000.com/sh10000/sta_dev_pay_ini.do";
dirChecklist[67] = "http://sh.ct10000.com/sh10000/simplePrint.do";
dirChecklist[68] = "http://sh.ct10000.com/support/";
dirChecklist[69] = "http://sh.ct10000.com/sh10000/ywsl/czjf.jsp";
dirChecklist[70] = "http://sh.ct10000.com/v3/defaultroot/points/pointsBlan.jsp";
dirChecklist[71] = "http://sh.ct10000.com/v3/sendNoteAwoke.do";
dirChecklist[72] = "http://esale.sh.ct10000.com/";
dirChecklist[73] = "http://sh.ct10000.com/sh10000/cnet/account/reportStop.jsp";
dirChecklist[74] = "http://sh.ct10000.com/v3/";
dirChecklist[75] = "http://sh.ct10000.com/v3/xfAccpet.do";
dirChecklist[76] = "http://sh.ct10000.com/v3/cNetPointsExchangOrderQuery.do";
dirChecklist[77] = "http://sh.ct10000.com/cdma133/special/";
dirChecklist[78] = "http://sh.ct10000.com/v3/mobilePayAccpet.do";
dirChecklist[79] = "http://sh.ct10000.com/v3/applyRefund.do";
dirChecklist[80] = "http://sh.ct10000.com/sh10000/ehome_cdma_pack_init.do";
dirChecklist[81] = "http://sh.ct10000.com/ehome/";
dirChecklist[82] = "http://sh.ct10000.com/esurfing/";
dirChecklist[83] = "http://sh.ct10000.com/v3/cardTransfer.do";
dirChecklist[84] = "http://sh.ct10000.com/sh10000/cnet/account/reportLost.jsp";
dirChecklist[85] = "http://sh.ct10000.com/sh10000/billDateChoiceNew.do";
dirChecklist[86] = "http://sh.ct10000.com/sh10000/pay_detail.do";
dirChecklist[87] = "http://sh.ct10000.com/v3/queryGift.do";
dirChecklist[88] = "http://sh.ct10000.com/sh10000/countSendAction.do";
dirChecklist[89] = "http://sh.ct10000.com/sh10000/selectBallance.do";
dirChecklist[90] = "http://sh.ct10000.com/v3/cms/html/gryjt/kdyhlw/";
dirChecklist[91] = "http://sh.ct10000.com/sh10000/pointsIn.do";
dirChecklist[92] = "http://sh.ct10000.com/v3/payfolder1.do";
dirChecklist[93] = "http://sh.ct10000.com/ehome/";
dirChecklist[94] = "http://sh.ct10000.com/sh10000/rt_op_apply_cust.do";
dirChecklist[95] = "http://sh.ct10000.com/sh10000/redirect.do";
dirChecklist[96] = "http://sh.ct10000.com/sh10000/eSurfingByCust.do";
dirChecklist[97] = "http://sh.ct10000.com/esurfing/";
dirChecklist[98] = "http://sh.ct10000.com/tiyan/wireless/";
dirChecklist[99] = "http://sh.ct10000.com/sh10000/wl_bb_init.do";
dirChecklist[100] = "http://sh.ct10000.com/sh10000/curAccount.do";
dirChecklist[101] = "http://sh.ct10000.com/v3/cms/html/gryjt/wdej/";
dirChecklist[102] = "http://sh.ct10000.com/sh10000/payQuery.do";
dirChecklist[103] = "http://sh.ct10000.com/sh10000/cnetBaseOper.do";
dirChecklist[104] = "http://sh.ct10000.com/v3/voucherRecord.do";
dirChecklist[105] = "http://sh.ct10000.com/vip/";
dirChecklist[106] = "http://sh.ct10000.com/v3/cms/html/gryjt/xyw/";
dirChecklist[107] = "http://sh.ct10000.com/v3/ywsl/ywxz.jsp";
dirChecklist[108] = "http://sh.ct10000.com/v3/selectBallance.do";
dirChecklist[109] = "http://sh.ct10000.com/vas/";
dirChecklist[110] = "http://sh.ct10000.com/sh10000/chooseNum.do";
dirChecklist[111] = "http://sh.ct10000.com/sh10000/voucherRecord.do";
dirChecklist[112] = "http://sh.ct10000.com/sh10000/cardTransfer.do";
dirChecklist[113] = "http://sh.ct10000.com/v3/callOutLockUpDev.do";
dirChecklist[114] = "http://sh.ct10000.com/v3/existLongPhone.do";
dirChecklist[115] = "http://sh.ct10000.com/v3/weatherAlarmInit.do";
dirChecklist[116] = "http://sh.ct10000.com/v3/workbench/workbench_lingyin.jsp";
dirChecklist[117] = "http://sh.ct10000.com/v3/func_chg_init.do";
dirChecklist[118] = "http://sh.ct10000.com/v3/pub_new_op_init.do";
dirChecklist[119] = "http://sh.ct10000.com/v3/sta_dev_pay_ini.do";
dirChecklist[120] = "http://sh.ct10000.com/v3/rt_op_apply_cust.do";
dirChecklist[121] = "http://sh.ct10000.com/sh10000/logon_noright.jsp";
dirChecklist[122] = "http://sh.ct10000.com/sh10000/recharge.do";
dirChecklist[123] = "http://sh.ct10000.com/fixedline/";
dirChecklist[124] = "http://sh.ct10000.com/v3/cNetChoose_type.do";
dirChecklist[125] = "http://sh.ct10000.com/sh10000/cardTransfer.do";
dirChecklist[126] = "http://sh.ct10000.com/sh10000/rt_op_apply_cust.do";
dirChecklist[127] = "http://sh.ct10000.com/tiyan/message/";
dirChecklist[128] = "http://sh.ct10000.com/v3/wl_bb_init.do";
dirChecklist[129] = "http://sh.ct10000.com/v3/func_chg_init.do";
dirChecklist[130] = "http://sh.ct10000.com/v3/EhomeAcceptedAction.do?method=init&combId=4";
dirChecklist[131] = "http://sh.ct10000.com/v3/rt_op_apply_cust.do";
dirChecklist[132] = "http://sh.ct10000.com/sh10000/commSubsidiesApply.do";
dirChecklist[133] = "http://sh.ct10000.com/wxkdfg/";
dirChecklist[134] = "http://sh.ct10000.com/v3/selectBallance.do?method=ballance";
dirChecklist[135] = "http://sh.ct10000.com/v3/pay_detail.do";
dirChecklist[136] = "http://sh.ct10000.com/expo/";
dirChecklist[137] = "http://sh.ct10000.com/zhaopin/";
dirChecklist[138] = "http://sh.ct10000.com/v3/cNetPointsItemShow.do";
dirChecklist[139] = "http://sh.ct10000.com/v3/cms/html/sbzq/";
dirChecklist[140] = "http://sh.ct10000.com/sh10000/cNetPointsExchangOrderQuery.do";
dirChecklist[141] = "http://sh.ct10000.com/sh10000/cNetPointsQueryPrizeInfo.do?";
dirChecklist[142] = "http://sh.ct10000.com/cdma133/content/";
dirChecklist[143] = "http://sh.ct10000.com/v3/redirect.do?service=billQueryandPay";
dirChecklist[144] = "http://sh.ct10000.com/tiyan/iptv/";
dirChecklist[145] = "http://sh.ct10000.com/sh10000/setUsedQuery.do";
dirChecklist[146] = "http://sh.ct10000.com/biz/";
dirChecklist[147] = "http://sh.ct10000.com/sh10000/func_chg";
dirChecklist[148] = "http://sh.ct10000.com/ebiz/";
dirChecklist[149] = "http://sh.ct10000.com/sh10000/accountGetCard.do";
dirChecklist[150] = "http://sh.ct10000.com/tiyan/ehome/";
dirChecklist[151] = "http://sh.ct10000.com/v3/qclyAccpet.do";
dirChecklist[152] = "http://sh.ct10000.com/v3/workbench/studentPackage/main.jsp";
dirChecklist[153] = "http://sh.ct10000.com/v3/chooseNum.do";
dirChecklist[154] = "http://sh.ct10000.com/v3/queryPuk.do";
dirChecklist[155] = "http://sh.ct10000.com/v3/stu_selectNum.do";
dirChecklist[156] = "http://sh.ct10000.com/v3/billRemedy.do";
dirChecklist[157] = "http://sh.ct10000.com/v3/detailBillControl.do";
dirChecklist[158] = "http://sh.ct10000.com/v3/eSurfingByCust.do";
dirChecklist[159] = "http://sh.ct10000.com/sh10000/qclyAccpet.do";
dirChecklist[160] = "http://sh.ct10000.com/sh10000/logon_noright.jsp";
dirChecklist[161] = "http://sh.ct10000.com/v3/account_manage_query.do";
dirChecklist[162] = "http://sh.ct10000.com/sh10000/PointsInfo.jsp";
dirChecklist[163] = "http://sh.ct10000.com/sh10000/jxCardBalTran_init.do";
dirChecklist[164] = "http://sh.ct10000.com/sh10000/workbench/workbench_lingyin.jsp";

window.status = ' ';

if (typeof(window.top.document) != "unknown")
    Referrer = window.top.document.referrer;
else
    Referrer = document.referrer;

Referrer = Referrer.replace (/[&]/g, ';');
lastDate = null;
uniqueUser = null;


function get_cookie (name)
{
  var arg = name + "=";
  var arg_len = arg.length;
  var cookie_len = document.cookie.length;
  var i = 0;

  while (i < cookie_len) {
    var j = i + arg_len;

    if (document.cookie.substring(i, j) == arg)
      return get_cookie_val(j);

    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }

  return null;
}

function set_cookie (name, value, expDays, rootpath, sitedomain)
{
  var argv = set_cookie.arguments;
  var argc = set_cookie.arguments.length;

  var expires = (argc > 2) ? argv[2] : null;
  var path    = (argc > 3) ? argv[3] : null;
  var domain  = (argc > 4) ? argv[4] : null;
  var secure  = (argc > 5) ? argv[5] : false;

  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path    == null) ? "" : ("; path=" + path)) +
    ((domain  == null) ? "" : ("; domain=" + domain)) +
    ((secure  == true) ? "; secure" : "");
}

function remove_cookie (name)
{
  var exp = new Date();
  exp.setTime (exp.getTime() - 1);
  var cval = get_cookie (name);
  document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

function set_datetime (expDays)
{
  var expDate = new Date();
  expDate.setTime(expDate.getTime() + (86400 * 1000 * expDays));

  return expDate;
}

function set_site_cookie (name, content, expires, path)
{
   set_cookie(name, content, expires, path);
}

function cookie_init (tmpdir)
{
  var count = get_cookie('chweblog_dir');
  var webtrend_Curl = tmpdir + 'chweblog_dir';;
  webtrend_Curl = webtrend_Curl.replace (/;/g, '');
  var punique = get_cookie(webtrend_Curl);
    
  if (punique == null) {
    uniqueUser = 1;
    var utime = new Date();
    utime.setHours(23);
    utime.setMinutes(59);
    utime.setSeconds(59);
    utime.setMilliseconds(999);

    set_site_cookie(webtrend_Curl, 1, utime, "/");
  }
  else
    uniqueUser = 0;

  if (count == null) {
    var ftime = new Date();
    set_site_cookie('chweblog_dir', ftime.getTime(), set_datetime(365), "/");
  }
  else {
    var found = 0;
    var ctime = new Date();

    for (var i=0; i < siteReferrer.length; i++) {
      var domain = siteReferrer[i];
      var reg = new RegExp("^http:\/\/([a-zA-Z0-9]+\.)?" + domain, "ig");

      if (Referrer && reg.test(Referrer)) {
        found = 1;
        break;
      }
    }

    if (found)
        lastDate = -1;
    else
      lastDate = get_cookie('chweblog_dir');

    remove_cookie('chweblog_dir');
    set_site_cookie('chweblog_dir', ctime.getTime(), set_datetime(365), "/");
  }
}

function get_cookie_val (offset)
{
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function language ()
{
  var language;

  if (navigator.appName == 'Netscape')
    var bname = navigator.language;
  else
    var bname = navigator.browserLanguage;

  bname = bname.toLowerCase();

  if (bname.substr(0,2) == "ko")
    language = 'Korean / Korea';
  else if (bname.substr(0,2) == "af")
    language = 'Afrikaans';
  else if (bname.substr(0,2) == "ar") {
    if (bname.substr(3,2) == "ae")
      language = 'Arabic / United Arab Emirates';
    else if (bname.substr(3,2) == "bh")
      language = 'Arabic / Bahrain';
    else if (bname.substr(3,2) == "eg")
      language = 'Arabic / Egypt';
    else if (bname.substr(3,2) == "dz")
      language = 'Arabic / Algeria';
    else if (bname.substr(3,2) == "iq")
      language = 'Arabic / Iraq';
    else if (bname.substr(3,2) == "jo")
      language = 'Arabic / Jordan';
    else if (bname.substr(3,2) == "kw")
      language = 'Arabic / Kuwait';
    else if (bname.substr(3,2) == "lb")
      language = 'Arabic / Lebanon';
    else if (bname.substr(3,2) == "ly")
      language = 'Arabic / Libya';
    else if (bname.substr(3,2) == "ma")
      language = 'Arabic / Morocco';
    else if (bname.substr(3,2) == "om")
      language = 'Arabic / Oman';
    else if (bname.substr(3,2) == "qa")
      language = 'Arabic / Qatar';
    else if (bname.substr(3,2) == "sa")
      language = 'Arabic / Saudi Arabia';
    else if (bname.substr(3,2) == "sy")
      language = 'Arabic / Syria';
    else if (bname.substr(3,2) == "tn")
      language = 'Arabic / Tunisia';
    else if (bname.substr(3,2) == "ye")
      language = 'Arabic / Yemen';
    else
      language = 'Arabic';
  }
  else if (bname.substr(0,2) == "be")
    language = 'Belarusian';
  else if (bname.substr(0,2) == "bg")
    language = 'Bulgarian';
  else if (bname.substr(0,2) == "ca")
    language = 'Catalan';
  else if (bname.substr(0,2) == "cs")
    language = 'Czech';
  else if (bname.substr(0,2) == "da")
    language = 'Danish';
  else if (bname.substr(0,2) == "de") {
    if (bname.substr(3,2) == "at")
      language = 'German / Austria';
    else if (bname.substr(3,2) == "ch")
      language = 'German / Switzerland';
    else if (bname.substr(3,2) == "li")
      language = 'German / Liechtenstein';
    else if (bname.substr(3,2) == "lu")
      language = 'German / Luxembourg';
    else
      language = 'German / Germany';
  }
  else if (bname.substr(0,2) == "el")
    language = 'Greek / Greece';
  else if (bname.substr(0,2) == "en") {
    if (bname.substr(3,2) == "us")
      language = 'English / United States';
    else if (bname.substr(3,2) == "au")
      language = 'English / Austrailia';
    else if (bname.substr(3,2) == "bz")
      language = 'English / Belize';
    else if (bname.substr(3,2) == "ca")
      language = 'English / Canada';
    else if (bname.substr(3,2) == "gb")
      language = 'English / Great Britain';
    else if (bname.substr(3,2) == "ie")
      language = 'English / Ireland';
    else if (bname.substr(3,2) == "jm")
      language = 'English / Jamaica';
    else if (bname.substr(3,2) == "nz")
      language = 'English / New Zealand';
    else if (bname.substr(3,2) == "tt")
      language = 'English / Trinidad';
    else if (bname.substr(3,2) == "za")
      language = 'English / South Africa';
    else
      language = 'English';
  }
  else if (bname.substr(0,2) == "es") {
    if (bname.substr(3,2) == "ar")
      language = 'Spanish / Argentina';
    else if (bname.substr(3,2) == "bo")
      language = 'Spanish / Bolivia';
    else if (bname.substr(3,2) == "cl")
      language = 'Spanish / Chile';
    else if (bname.substr(3,2) == "co")
      language = 'Spanish / Colombia';
    else if (bname.substr(3,2) == "cr")
      language = 'Spanish / Costa Rica';
    else if (bname.substr(3,2) == "do")
      language = 'Spanish / Dominican Republic';
    else if (bname.substr(3,2) == "ec")
      language = 'Spanish / Ecuador';
    else if (bname.substr(3,2) == "gt")
      language = 'Spanish / Guatemala';
    else if (bname.substr(3,2) == "hn")
      language = 'Spanish / Honduras';
    else if (bname.substr(3,2) == "mx")
      language = 'Spanish / Mexico';
    else if (bname.substr(3,2) == "ni")
      language = 'Spanish / Nicaragua';
    else if (bname.substr(3,2) == "pa")
      language = 'Spanish / Panama';
    else if (bname.substr(3,2) == "pe")
      language = 'Spanish / Peru';
    else if (bname.substr(3,2) == "pr")
      language = 'Spanish / Puerto Rico';
    else if (bname.substr(3,2) == "py")
      language = 'Spanish / Paraguay';
    else if (bname.substr(3,2) == "sv")
      language = 'Spanish / El Salvador';
    else if (bname.substr(3,2) == "uy")
      language = 'Spanish / Uruguay';
    else if (bname.substr(3,2) == "ve")
      language = 'Spanish / Venezuela';
    else
      language = 'Spanish / Spain';
  }
  else if (bname.substr(0,2) == "et")
    language = 'Estonian';
  else if (bname.substr(0,2) == "eu")
    language = 'Basque';
  else if (bname.substr(0,2) == "fa")
    language = 'Farsi';
  else if (bname.substr(0,2) == "fi")
    language = 'Finnish';
  else if (bname.substr(0,2) == "fo")
    language = 'Faeroese';
  else if (bname.substr(0,2) == "fr") {
    if (bname.substr(3,2) == "be")
      language = 'French / Belgium';
    else if (bname.substr(3,2) == "ca")
      language = 'French / Canada';
    else if (bname.substr(3,2) == "ch")
      language = 'French / Switzerland';
    else if (bname.substr(3,2) == "ca")
      language = 'French / Luxembourg';
    else
      language = 'French / France';
  }
  else if (bname.substr(0,2) == "gd") {
    if (bname.substr(3,2) == "ie")
      language = 'Gaelic / Ireland';
    else
      language = 'Gaelic / Scotland';
  }
  else if (bname.substr(0,2) == "he")
    language = 'Hebrew';
  else if (bname.substr(0,2) == "hi")
    language = 'Hindi';
  else if (bname.substr(0,2) == "hr")
    language = 'Croatian';
  else if (bname.substr(0,2) == "hu")
    language = 'Hungarian';
  else if (bname.substr(0,2) == "in")
    language = 'Indonesian';
  else if (bname.substr(0,2) == "is")
    language = 'Icelandic';
  else if (bname.substr(0,2) == "he")
    language = 'Hebrew';
  else if (bname.substr(0,2) == "it") {
    if (bname.substr(3,2) == "ch")
      language = 'Italian / Switzerland';
    else
      language = 'Italian / Italy';
  }
  else if (bname.substr(0,2) == "ja")
    language = 'Japanese / Japan';
  else if (bname.substr(0,2) == "ji")
    language = 'Yiddish';
  else if (bname.substr(0,2) == "lt")
    language = 'Lithuanian / Lithuania';
  else if (bname.substr(0,2) == "lv")
    language = 'Latvian';
  else if (bname.substr(0,2) == "mk")
    language = 'Macedonian / Macedonia';
  else if (bname.substr(0,2) == "ms")
    language = 'Malaysian / Malaysia';
  else if (bname.substr(0,2) == "mt")
    language = 'Maltese / Malta';
  else if (bname.substr(0,2) == "nl") {
    if (bname.substr(3,2) == "be")
      language = 'Dutch / Belgium';
    else
      language = 'Dutch / Netherlands';
  }
  else if (bname.substr(0,2) == "pl")
    language = 'Polish / Poland';
  else if (bname.substr(0,2) == "pt") {
    if (bname.substr(3,2) == "br")
      language = 'Portuguese / Brazil';
    else
      language = 'Portuguese / Portugual';
  }
  else if (bname.substr(0,2) == "rm")
    language = 'Rhaeto-Romanic / Romania';
  else if (bname.substr(0,2) == "ro")
    language = 'Romanian / Romania';
  else if (bname.substr(0,2) == "ru")
    language = 'Russian / Russia';
  else if (bname.substr(0,2) == "sb")
    language = 'Sorbian';
  else if (bname.substr(0,2) == "sk")
    language = 'Slovak';
  else if (bname.substr(0,2) == "sl")
    language = 'Slovenian';
  else if (bname.substr(0,2) == "sq")
    language = 'Albanian / Albania';
  else if (bname.substr(0,2) == "sr")
    language = 'Serbian / Serbia';
  else if (bname.substr(0,2) == "sv") {
    if (bname.substr(3,2) == "fi")
      language = 'Swedish / Finland';
    else
      language = 'Swedish / Sweden';
  }
  else if (bname.substr(0,2) == "sx")
    language = 'Sutu';
  else if (bname.substr(0,2) == "sz")
    language = 'Sami';
  else if (bname.substr(0,2) == "th")
    language = 'Thai / Thailand';
  else if (bname.substr(0,2) == "tn")
    language = 'Tswana';
  else if (bname.substr(0,2) == "tr")
    language = 'Turkish / Turkey';
  else if (bname.substr(0,2) == "ts")
    language = 'Tsonga';
  else if (bname.substr(0,2) == "uk")
    language = 'Ukrainian';
  else if (bname.substr(0,2) == "th")
    language = 'Thai / Thailand';
  else if (bname.substr(0,2) == "ur")
    language = 'Urdu';
  else if (bname.substr(0,2) == "ve")
    language = 'Venda';
  else if (bname.substr(0,2) == "vi")
    language = 'Vietnamese / Vietnam';
  else if (bname.substr(0,2) == "xh")
    language = 'Xhosa';
  else if (bname.substr(0,2) == "zh") {
    if (bname.substr(3,2) == "cn")
      language = 'Chinese / China';
    else if (bname.substr(3,2) == "hk")
      language = 'Chinese / Hong Kong';
    else if (bname.substr(3,2) == "sg")
      language = 'Chinese / Singapore';
    else if (bname.substr(3,2) == "tw")
      language = 'Chinese / Taiwan';
    else
      language = 'Chinese / China';
  }
  else if (bname.substr(0,2) == "zu")
    language = 'Zulu';
  else
    language = 'Unknown/Other';

  return language;
}

function get_dir(reURL)
{	   
	  var urlReg  = /http:\/\/([^\/]+)(.*)/i;
 
	  var codeRE = new RegExp("http://([^/]+)(.*)","gi"); 
	  
	  for(var i=0;i<dirChecklist.length;i++)
	  {
	  	  var tmpurl = dirChecklist[i];	 
	  	  var tmpreURL = reURL; 	  
	  	  if (!urlReg.test(tmpurl)){   	   	 
	  	  	 codeRE.exec(tmpreURL);
	  	  	 tmpreURL =  new String(RegExp.$2); 
	  	  	 tmpreURL  = (tmpreURL == '') ? '/': tmpreURL;	  
	  	  }	  	   
	  	  if (tmpreURL.indexOf(tmpurl) == 0)
 
	  	  {  
	  	   	return tmpurl;
	  	  } 

	  } 
    return "";
}

//////////////////////////////////////////////////////////////////////////

if (ACTIVE) {
var webTrendTestUrl = window.location.href;
var webTrend_tmpDir = get_dir(webTrendTestUrl);
if (webTrend_tmpDir == '')
{
    webTrend_tmpDir = 'tmpData';
}
cookie_init(webTrend_tmpDir);
var userDate = new Date();
if (lastDate == null) lastDate = 0;
var doc_Title = document.title;
doc_Title = doc_Title.replace (/[#%|*&^$@!]/g, '');
Referrer = Referrer.replace (/[#|*&^$@!]/g, '');
var pageCharset;
if (navigator.appName == "Netscape")  pageCharset = document.characterSet;
else pageCharset = document.charset;

document.write('<img src="' + SCRIPT_URL + '/process_dir.cgi'
                + '?rs=' + window.screen.width + ' X ' + window.screen.height
                + '&cd=' + window.screen.colorDepth
                + '&ln=' + language()
                + '&rf=' + Referrer
                + '&vc=' + get_cookie('chweblog_dir')
                + '&ut=' + userDate.getTime()
                + '&lv=' + lastDate
                + '&cs=' + pageCharset
                + '&uq=' + uniqueUser
		            + '&qz=' + DOMAIN_NAME
		            + '&dt=' + doc_Title
                + '" width="0" height="0">');
}

