<!--
// Scripts Pack Release 2
// 02/06/2003

  function GetCookie(aName)
  {
    cookieFoundAt = document.cookie.indexOf(aName + "=");

    if (cookieFoundAt < 0) {
         cookieValue = "";
    }
    else {
      cookieFoundAt = document.cookie.indexOf("=",cookieFoundAt);
      cookieFoundAt++;

      cookieEnd = document.cookie.indexOf(";", cookieFoundAt);
      if (cookieEnd == -1) {
        cookieEnd = document.cookie.length;
      }
      cookieValue =document.cookie.substring(cookieFoundAt,cookieEnd);
    }
    return cookieValue;
  }

  function SetCookie (aName, aValue) {
    cookiedate = new Date ("December 31, 2050");
    document.cookie = aName + "=" + aValue + ";expires=" + cookiedate.toGMTString();
  }

  function SetCookieOnce (aName, aValue) {
    cookiedate = new Date ("December 31, 2050");
    CookieExists = (document.cookie.indexOf (aName+"=") >= 0);

    if ((!CookieExists) || (GetCookie(aName) == "")) {
      document.cookie = aName + "=" + aValue + ";expires=" + cookiedate.toGMTString();
    }
  }

  function StripUrl (Url) {
    i = Url.indexOf ("//");
    if (i >= 0) i += 2;
    strDomain = Url.substring (i, Url.length);
    i = strDomain.indexOf ("?");
    if (i >= 0) strDomain = strDomain.substring (0, i);
    return strDomain;
  }

  function GetUrlParam (Url, ParamName) {
    i = Url.indexOf ("?");
    if (i >= 0) {
      ParamStr = Url.substring (i+1, Url.length);
      Params = ParamStr.split ("&");
      for (i=0; i < Params.length; i++) {
        iParam = Params[i];
        NameValue = iParam.split ("=");
        if (NameValue[0] == ParamName) return NameValue[1];
      }
    }
    return "";
  }

  function IsIE40AndHigher () {
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf ( "MSIE " );
    if ( msie > 0 ) return (parseInt (ua.substring (msie+5, ua.indexOf (".", msie ))) >= 4);
    else return false;
  }

  function GetCookieEnabled ()
  {
    document.cookie="cookietest=passed";
    cookieTest = GetCookie ("cookietest");
    return (cookieTest == "passed");
  }

  function GetHAdd1 () {
    Result = "2";
    if (!IsIE40AndHigher()) {
      Result += "@error@WrongBrowser";
      return Result;
    }

    if (!GetCookieEnabled ()) {
      Result += "@error@NoCookies";
      return Result;
    }

    Src = GetCookie ("src");
    Ref = GetCookie ("ref");
    EntryPage = GetCookie ("entrypage");
    EntryDate = GetCookie ("entrydate");
    if (EntryDate != "") {
      eDate = new Date (EntryDate);
      EntryDate = (eDate.getMonth() + 1) + "/" + eDate.getDate () + "/" + eDate.getFullYear ();
    }
    DlDate = GetCookie ("dldate");
    if (DlDate != "" ) {
      dDate = new Date (DlDate);
      DlDate = (dDate.getMonth() + 1) + "/" + dDate.getDate () + "/" + dDate.getFullYear ();
    }
    QueryStr = GetCookie ("query");

    bigPprm = GetCookie ("pprm");
    strippedPprm = bigPprm.split ("@");
    Pprm = strippedPprm[0];

    D = new Date ();
    D1 = new Date (strippedPprm[1]);
    if (Math.abs (D - D1) < 3600000) OrderFromProg = "1";
    else OrderFromProg = "0";
    
    Msg = Ref + "@" + QueryStr + "@" + EntryPage + "@" + EntryDate + "@" + Src + "@" + DlDate + "@" + OrderFromProg + "@" + Pprm;
    Result += "@" + Msg.length + "@" + Msg;
    return Result;
  }

  function GetHAdd2 () {
    return "";
  }


  // This func is called when a user clicks the download link

  function SetDlDate () {
    D = new Date ();
    SetCookieOnce ("dldate", D.toGMTString());
    return true;
  }


  // Execution starts here

  if (IsIE40AndHigher()) {
    D = new Date ();

    if (GetCookie ("entrydate") == "" ) {
      SetCookieOnce ("ref", StripUrl (document.referrer));

      loc = StripUrl (String (document.location));
      i = loc.indexOf ("/");
      if (i >= 0) loc = loc.substring (i+1);
      SetCookieOnce ("entrypage", loc);

      src = GetUrlParam (new String (document.location), "src");
      if (src != "") SetCookieOnce ("src", src);

      SetCookieOnce ("entrydate", D.toGMTString());

      if (document.referrer != "") {
        SearchQueryString = "";
        S = new String (document.referrer);
        if (S.indexOf ("google.com") >= 0) SearchQueryString = GetUrlParam (S, "q");
        if (S.indexOf ("yahoo.com") >= 0) SearchQueryString = GetUrlParam (S, "p");
        if (S.indexOf ("search.msn.com") >= 0) SearchQueryString = GetUrlParam (S, "q");
        if (S.indexOf ("search.aol.com") >= 0) SearchQueryString = GetUrlParam (S, "query");
        if (S.indexOf ("ask.com") >= 0) SearchQueryString = GetUrlParam (S, "ask");

        if (S.indexOf ("search.netscape.com") >= 0) SearchQueryString = GetUrlParam (S, "query");
        if (S.indexOf ("infospace.com") >= 0) SearchQueryString = GetUrlParam (S, "qkw");
        if (S.indexOf ("altavista.com") >= 0) SearchQueryString = GetUrlParam (S, "q");
        if (S.indexOf ("lycos.com") >= 0) SearchQueryString = GetUrlParam (S, "query");
        if (S.indexOf ("looksmart.com") >= 0) SearchQueryString = GetUrlParam (S, "key");

        if (SearchQueryString != "") {
          SearchQueryString = unescape (SearchQueryString);
          SetCookieOnce ("query", SearchQueryString);
        }
      }
    }

    pprm = GetUrlParam (new String (document.location), "pprm");
    if (pprm != "") SetCookie ("pprm", pprm + "@" + D);
  }

// -->