var ubi_umon_domain = 'uts.ubi.com'; 
var ubi_umon_URL = ubi_umon_domain;

function ubi_do_WT_stat()
{
  var w = window;
  
  if (w.ubi_tag)
  {
    var url = 'http://' + ubi_umon_URL + '/stats.aspx?';
    url = url + 'system=webtrack';
    url = url + '&tag=' + escape(w.ubi_tag);
    url = url + '&ref=' + encodeURIComponent(document.referrer);
    url = url + '&hres=' + ubi_get_hres();
    url = url + '&vres=' + ubi_get_vres();

    document.write('<img border=0 height=1 width=1 src="' + url + '">');
  }                   
}
function ubi_do_WT_stat_silent(tag)
{
  if (tag)
  {
    var url = 'http://' + ubi_umon_URL + '/stats.aspx?';
    url = url + 'system=webtrack';
    url = url + '&tag=' + escape(tag);
    url = url + '&ref=' + encodeURIComponent(document.referrer);
    url = url + '&hres=' + ubi_get_hres();
    url = url + '&vres=' + ubi_get_vres();

    var img=new Image();img.src=url;
  }                   
}
function ubi_get_hres()
{
  return navigator.appVersion ? screen.height: '';
}
function ubi_get_vres()
{
  return navigator.appVersion ? screen.width: '';
}

ubi_do_WT_stat();

function ubi_do_CT_stat(tag)
{
  if (tag)
  {
    var url = 'http://' + ubi_umon_URL + '/stats.aspx?';
    url = url + 'system=clicktrack';
    url = url + '&tag=' + escape(tag);
    url = url + '&ref=' + encodeURIComponent(document.referrer);
    url = url + '&hres=' + ubi_get_hres();
    url = url + '&vres=' + ubi_get_vres();

    if (true) //(window.navigator.appName.toLowerCase().indexOf('explorer') == -1)
    {
      var xmlRequest = new XMLHttpRequest();
      if (xmlRequest)
      {
        xmlRequest.open("GET", url, true);
        xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        xmlRequest.send(null);
      }
    }
    /*
    else
    {
      var xmlRequest = new ActiveXObject("Microsoft.XMLHTTP");
      if (xmlRequest)
      {
        xmlRequest.open("GET", url, true);
        xmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        xmlRequest.send();
      }        
    }
    */
  }
}