// Auriq Systems Inc.
// $Id: aq_tag.js 6.3.0 $
// 2008.08.08
var aqusr = "";
function aq_ini_(ck)
{
  var w, i;
  aqusr = "";
  if (document.cookie) {
    w = document.cookie;
    while (w.length > 6) {
      if (w.substring(0, 6) == "aqusr=") {
        if ((i = w.indexOf(";")) < 0) i = w.length;
        aqusr = w.substring(6, i);
        break;
      }
      if ((i = w.indexOf(";")) < 0) break;
      for (i += 1; i < w.length; ++i) if (w.charAt(i) != ' ') break;
      w = w.substring(i, w.length);
    }
  }
  if (ck) {
    if (aqusr == "") aqusr = "A1043.400258BB02274F4F37";
    w = new Date();
    w.setFullYear(w.getFullYear() + 1);
    document.cookie = "aqusr=" + aqusr + "; path=/; expires=" + w;
    aq_ini_(false);
  }
}
function aq_cb_() { return; }
function aq_go_(agv, mod)
{
  var ctl, i, j, p, s, r;
  if (!window.aqid || aqid == "" || !document.URL) return;
  ctl = ",,";
  if (window.aqctl) ctl += window.aqctl + ",";
  s = document.location.protocol + "//t8.aqtracker.com/cgi-bin/asp/tagx/";
  if (window.aqctl_allow_cache || ctl.indexOf(",allow_cache,") >= 0) {
    s += "_";
  } else {
    i = new Date();
    s += i.getTime();
  }
  if (window.aqctl_no_extra_cookie || ctl.indexOf(",no_extra_cookie,") >= 0) {
    s += "c";
  }
  if (window.aqctl_user_mnt || ctl.indexOf(",user_mnt,") >= 0) {
    s += "h";
  }
  if (mod == 3) {
    s += "v";
  }
  s += "/" + aqid + "?1=" + aqusr;
  i = 0;
  p = document.URL;
  if ((window.aqctl_trim_query || ctl.indexOf(",trim_query,") >= 0) &&
      (j = p.indexOf("?")) > 0) p = p.substring(0, j);
  if (mod == 1 && i < agv.length) { r = agv[i]; i++;
    if ((j = p.indexOf("?")) < 0) p += "?"; else if (j < p.length - 1) p += "&";
    p += r;
  }
  s += "&2=" + escape(p);
  if (mod == 2 && i < agv.length) { s += "&3=" + escape(agv[i]); i++; }
  r = (mod <= 1)? document.referrer : p;
  if (r) s += "&4=" + escape(r);
  while (i < agv.length) { s += "&101=" + escape(agv[i]); i++; }
  s += "&101=res=" + screen.width + "x" + screen.height;
  i = new Image(1, 1);
  i.onload = aq_cb_;
  i.src = s;
}
function aq_tag() { aq_go_(arguments, 0); }
function aq_tag_cat() { aq_go_(arguments, 1); }
function aq_tag_file() { aq_go_(arguments, 2); }
function aq_tag_value() { aq_go_(arguments, 3); }
aq_ini_(true);
