<!--
// Weboscope - weboscope4.5.js version 4.5
// Updated on 10/17/2003

// Constantes
SERVERDEV = "comptintra.dev.echonet"
SERVERSTAGINGINTRA = "comptintra.staging.echonet"
SERVERSTAGINGINTER = "comptinter.staging.echonet"
SERVERINTRA = "statsweb.sig.echonet"
SERVERINTER = "statsweb.bnpparibas.com"
SERVERINTERQ = "bnpparibas.weborama.fr"

// Parameters
SITE =  686
SITE2 = 201
SERVER = SERVERINTER

///////////////////
// Weboscope tag //
//////////////////

// Weboscope main function
function weboscope(_WEBOSERVER, _WEBOID, _WEBOZONE, _WEBOPAGE, _WEBOTIME, _WEBOARG1, _WEBOARG2, _WEBOARG3, _WEBOARG4, _WEBOREF)
{
    var wbs_da = new Date();
    _WEBOTIME = parseInt(wbs_da.getTime()) - _WEBOTIME;
    wbs_da = parseInt(wbs_da.getTime()/1000 - 60*wbs_da.getTimezoneOffset());
    var wbs_ref = '' + escape(document.referrer);
    var wbs_ta = '0x0';
    var wbs_co = 0;
    var wbs_nav = navigator.appName;
    if (parseInt(navigator.appVersion) >= 4)
    {
        wbs_ta = screen.width + "x" + screen.height;
        wbs_co = (wbs_nav!="Netscape")? screen.colorDepth : screen.pixelDepth;
    }
    
    // Detection du type de connexion : HTTP ou HTTPS
    (document.URL.indexOf("https://") != -1)? WEBO_CONNEXION = "https://" : WEBO_CONNEXION = "http://";

    // Calcul du referrer
    if ((_WEBOREF != null) && ((wbs_nav != "Netscape") || (parseInt(navigator.appVersion) >= 5)))
    {
        var reftmp = 'parent.document.referrer';
        if ((_WEBOREF < 5) && (_WEBOREF > 0))
        {
            for (_k = _WEBOREF; _k > 1; _k--) 
                reftmp = 'parent.' + reftmp;
        }
        var mon_ref = eval(reftmp);

        if (document.referrer == parent.location || document.referrer == '') 
            wbs_ref = '' + escape(mon_ref)
    }

    var wbs_arg = WEBO_CONNEXION + _WEBOSERVER + "/fcgi-bin/comptage.fcgi?ID=" + _WEBOID;
    wbs_arg += "&ZONE=" + _WEBOZONE + "&PAGE=" + _WEBOPAGE;
    wbs_arg += "&ver=2&da2=" + wbs_da + "&ta=" + wbs_ta + "&co=" + wbs_co + "&ref=" + wbs_ref;
    wbs_arg += "&BNP1=" + _WEBOTIME + "&BNP2=" + _WEBOARG1 + "&BNP3=" + _WEBOARG2 + "&BNP4=" + _WEBOARG3 + "&BNP5=" + _WEBOARG4;

    if (parseInt(navigator.appVersion) >= 3)
    {
        webo_compteur = new Image(1,1);
        webo_compteur.src = wbs_arg;
    }
    else
    {
        document.write("<img src='" + wbs_arg + "' border='0' height='1' width='1' alt=''>");
    }
}

// Weboscope short function
function weboShort(_WEBOSERVER, _WEBOID, _WEBOZONE, _WEBOPAGE, _WEBOTIME, _WEBOREF)
{
    weboscope(_WEBOSERVER, _WEBOID, _WEBOZONE, _WEBOPAGE, _WEBOTIME, 0, 0, 0, 0, _WEBOREF)
}

///////////////////////////
// Weboscope clic module //
///////////////////////////

function click(_ID_LINK, _WEBOSERVER, _WEBOID, _WEBOCAMP, _WEBOORIG, _WEBODETAIL)
{
 if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) <= 4))
  return; // Si Netscape 4

 if (click_ok) 
 {
  var _LINK = document.getElementById(_ID_LINK)
  var _WEBOREDIR = _LINK.href

  _LINK.href = "http://" + _WEBOSERVER + "/fcgi-bin/clic.fcgi?ID=" + _WEBOID + "&camp=" + _WEBOCAMP + "&origine=" + _WEBOORIG + "&detail=" + _WEBODETAIL + "&redir=" + escape(_WEBOREDIR)
  _LINK.onmouseover = new Function("self.status ='" + _WEBOREDIR + "'; return true")
 }
}


//Performance V2.2
function clickv2(_ID_LINK, _WEBOSERVER, _WEBOID, _WEBOCAMP, _WEBOORIG, _WEBODETAIL, _WEBOTYPE)
{
 if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) <= 4))
  return;

 var _LINK = document.getElementById(_ID_LINK)
 var _WEBOREDIR = _LINK.href

 _LINK.href = "http://" + _WEBOSERVER + "/fcgi-bin/performance.fcgi?ID=" + _WEBOID + "&A=1&L=" + _WEBODETAIL + "&C=" + _WEBOCAMP + "&P=" + _WEBOORIG + "&T=" + _WEBOTYPE + "&URL=" + escape(_WEBOREDIR)
 _LINK.onmouseover = new Function("self.status ='" + _WEBOREDIR + "'; return true")
}




/////////////////////
// Weboscope Class //
////////////////////

function weboscopeTag(_WEBOSERVER, _WEBOID, _WEBOZONE, _WEBOPAGE)
{
    // Attributs
    this.WEBOSERVER = _WEBOSERVER
    this.WEBOID = _WEBOID
    this.WEBOZONE = _WEBOZONE
    this.WEBOPAGE = _WEBOPAGE
    this.WEBOTIME = 0
    this.WEBOARG1 = 0
    this.WEBOARG2 = 0
    this.WEBOARG3 = 0
    this.WEBOARG4 = 0
    this.EXTENDEDPARAMETERS = ""
    this.WEBOID2 = -1
    this.WEBOZONE2 = 0
    this.WEBOPAGE2 = 0
    this.WEBOTIME2 = 0
    this.WEBOARG21 = 0
    this.WEBOARG22 = 0
    this.WEBOARG23 = 0
    this.WEBOARG24 = 0
    this.EXTENDEDPARAMETERS2 = ""
    this.WEBOID3 = -1
    this.WEBOZONE3 = 0
    this.WEBOPAGE3 = 0
    this.WEBOTIME3 = 0
    this.WEBOARG31 = 0
    this.WEBOARG32 = 0
    this.WEBOARG33 = 0
    this.WEBOARG34 = 0
    this.EXTENDEDPARAMETERS3 = ""
    this.WEBOID4 = -1
    this.WEBOZONE4 = 0
    this.WEBOPAGE4 = 0
    this.WEBOTIME4 = 0
    this.WEBOARG41 = 0
    this.WEBOARG42 = 0
    this.WEBOARG43 = 0
    this.WEBOARG44 = 0
    this.EXTENDEDPARAMETERS4 = ""
    this.WEBOREF = 0
    
    // Fonctions
    this.setTag = setTag
    this.setParameters = setParameters
    this.addExtendedParameter = addExtendedParameter
    this.setTag2 = setTag2
    this.setParameters2 = setParameters2
    this.addExtendedParameter2 = addExtendedParameter2
    this.setTag3 = setTag3
    this.setParameters3 = setParameters3
    this.addExtendedParameter3 = addExtendedParameter3
    this.setTag4 = setTag4
    this.setParameters4 = setParameters4
    this.addExtendedParameter3 = addExtendedParameter3
    this.getURL = getURL
    this.execute = execute
}


function setTag(_SITE, _ZONE, _PAGE)
{
    this.WEBOID = _SITE
    this.WEBOZONE = _ZONE
    this.WEBOPAGE = _PAGE
}

function setParameters(_WEBOARG1, _WEBOARG2, _WEBOARG3, _WEBOARG4)
{
    this.WEBOARG1 = (isNaN(_WEBOARG1)? 0 : _WEBOARG1)
    this.WEBOARG2 = (isNaN(_WEBOARG2)? 0 : _WEBOARG2)
    this.WEBOARG3 = (isNaN(_WEBOARG3)? 0 : _WEBOARG3)
    this.WEBOARG4 = (isNaN(_WEBOARG4)? 0 : _WEBOARG4)
}

function addExtendedParameter(_NAME, _VALUE)
{
    if (_NAME && _NAME != "")
     if (this.EXTENDEDPARAMETERS != "")
      this.EXTENDEDPARAMETERS += "&" + _NAME + "=" + escape(_VALUE)
     else
      this.EXTENDEDPARAMETERS += _NAME + "=" + escape(_VALUE)
}

function setTag2(_SITE, _ZONE, _PAGE)
{
    this.WEBOID2 = _SITE
    this.WEBOZONE2 = _ZONE
    this.WEBOPAGE2 = _PAGE
}

function setParameters2(_WEBOARG1, _WEBOARG2, _WEBOARG3, _WEBOARG4)
{
    this.WEBOARG21 = (isNaN(_WEBOARG1)? 0 : _WEBOARG1)
    this.WEBOARG22 = (isNaN(_WEBOARG2)? 0 : _WEBOARG2)
    this.WEBOARG23 = (isNaN(_WEBOARG3)? 0 : _WEBOARG3)
    this.WEBOARG24 = (isNaN(_WEBOARG4)? 0 : _WEBOARG4)
}

function addExtendedParameter2(_NAME, _VALUE)
{
    if (_NAME && _NAME != "")
     if (this.EXTENDEDPARAMETERS2 != "")
      this.EXTENDEDPARAMETERS2 += "&" + _NAME + "=" + escape(_VALUE)
     else
      this.EXTENDEDPARAMETERS2 += _NAME + "=" + escape(_VALUE)
}

function setTag3(_SITE, _ZONE, _PAGE)
{
    this.WEBOID3 = _SITE
    this.WEBOZONE3 = _ZONE
    this.WEBOPAGE3 = _PAGE
}

function setParameters3(_WEBOARG1, _WEBOARG2, _WEBOARG3, _WEBOARG4)
{
    this.WEBOARG31 = (isNaN(_WEBOARG1)? 0 : _WEBOARG1)
    this.WEBOARG32 = (isNaN(_WEBOARG2)? 0 : _WEBOARG2)
    this.WEBOARG33 = (isNaN(_WEBOARG3)? 0 : _WEBOARG3)
    this.WEBOARG34 = (isNaN(_WEBOARG4)? 0 : _WEBOARG4)
}

function addExtendedParameter3(_NAME, _VALUE)
{
    if (_NAME && _NAME != "")
     if (this.EXTENDEDPARAMETERS3 != "")
      this.EXTENDEDPARAMETERS3 += "&" + _NAME + "=" + escape(_VALUE)
     else
      this.EXTENDEDPARAMETERS3 += _NAME + "=" + escape(_VALUE)
}

function setTag4(_SITE, _ZONE, _PAGE)
{
    this.WEBOID4 = _SITE
    this.WEBOZONE4 = _ZONE
    this.WEBOPAGE4 = _PAGE
}

function setParameters4(_WEBOARG1, _WEBOARG2, _WEBOARG3, _WEBOARG4)
{
    this.WEBOARG41 = (isNaN(_WEBOARG1)? 0 : _WEBOARG1)
    this.WEBOARG42 = (isNaN(_WEBOARG2)? 0 : _WEBOARG2)
    this.WEBOARG43 = (isNaN(_WEBOARG3)? 0 : _WEBOARG3)
    this.WEBOARG44 = (isNaN(_WEBOARG4)? 0 : _WEBOARG4)
}

function addExtendedParameter4(_NAME, _VALUE)
{
    if (_NAME && _NAME != "")
     if (this.EXTENDEDPARAMETERS4 != "")
      this.EXTENDEDPARAMETERS4 += "&" + _NAME + "=" + escape(_VALUE)
     else
      this.EXTENDEDPARAMETERS4 += _NAME + "=" + escape(_VALUE)
}


function getURL(_WEBOTIME)
{
    var wbs_da = new Date();
    _WEBOTIME = parseInt(wbs_da.getTime()) - _WEBOTIME;
    wbs_da = parseInt(wbs_da.getTime()/1000 - 60*wbs_da.getTimezoneOffset());
    var wbs_ref = '' + escape(document.referrer);
    var wbs_ta = '0x0';
    var wbs_co = 0;
    var wbs_nav = navigator.appName;
    if (parseInt(navigator.appVersion) >= 4)
    {
        wbs_ta = screen.width + "x" + screen.height;
        wbs_co = (wbs_nav!="Netscape")? screen.colorDepth : screen.pixelDepth;
    }
    
    // Detection du type de connexion : HTTP ou HTTPS
    (document.URL.indexOf("https://") != -1)? WEBO_CONNEXION = "https://" : WEBO_CONNEXION = "http://";

    // Calcul du referrer
    if ((this.WEBOREF != null) && ((wbs_nav != "Netscape") || (parseInt(navigator.appVersion) >= 5)))
    {
        var reftmp = 'parent.document.referrer';
        if ((this.WEBOREF < 5) && (this.WEBOREF > 0))
        {
            for (_k = this.WEBOREF; _k > 1; _k--) 
                reftmp = 'parent.' + reftmp;
        }
        var mon_ref = eval(reftmp);

        if (document.referrer == parent.location || document.referrer == '') 
            wbs_ref = '' + escape(mon_ref)
    }

    var wbs_arg = WEBO_CONNEXION + this.WEBOSERVER + "/fcgi-bin/comptage.fcgi?ID=" + this.WEBOID;
    wbs_arg += "&ZONE=" + this.WEBOZONE + "&PAGE=" + this.WEBOPAGE;
    wbs_arg += "&ver=2&da2=" + wbs_da + "&ta=" + wbs_ta + "&co=" + wbs_co + "&ref=" + wbs_ref;
    wbs_arg += "&BNP1=" + _WEBOTIME + "&BNP2=" + this.WEBOARG1 + "&BNP3=" + this.WEBOARG2 + "&BNP4=" + this.WEBOARG3 + "&BNP5=" + this.WEBOARG4 + "&WEP=" + escape(this.EXTENDEDPARAMETERS);

    if (this.WEBOID2 > 0)
     wbs_arg += "&ID2=" + this.WEBOID2 + "&ZONE2=" + this.WEBOZONE2 + "&PAGE2=" + this.WEBOPAGE2 + "&BNP21=" + _WEBOTIME + "&BNP22=" + this.WEBOARG21 + "&BNP23=" + this.WEBOARG22 + "&BNP24=" + this.WEBOARG23 + "&BNP25=" + this.WEBOARG24 + "&WEP2=" + escape(this.EXTENDEDPARAMETERS2);
    if (this.WEBOID3 > 0)
     wbs_arg += "&ID3=" + this.WEBOID3 + "&ZONE3=" + this.WEBOZONE3 + "&PAGE3=" + this.WEBOPAGE3 + "&BNP31=" + _WEBOTIME + "&BNP32=" + this.WEBOARG31 + "&BNP33=" + this.WEBOARG32 + "&BNP34=" + this.WEBOARG33 + "&BNP35=" + this.WEBOARG34 + "&WEP3=" + escape(this.EXTENDEDPARAMETERS3);
    if (this.WEBOID4 > 0)
     wbs_arg += "&ID4=" + this.WEBOID4 + "&ZONE4=" + this.WEBOZONE4 + "&PAGE4=" + this.WEBOPAGE4 + "&BNP41=" + _WEBOTIME + "&BNP42=" + this.WEBOARG41 + "&BNP43=" + this.WEBOARG42 + "&BNP44=" + this.WEBOARG43 + "&BNP45=" + this.WEBOARG44 + "&WEP4=" + escape(this.EXTENDEDPARAMETERS4);

    return wbs_arg;
}

function execute(_WEBOTIME)
{
 if (parseInt(navigator.appVersion) >= 3)
 {
  webo_compteur = new Image(1,1);
  webo_compteur.src = this.getURL(_WEBOTIME);
 }
 else
 {
  document.write("<img src='" + this.getURL(_WEBOTIME) + "' border='0' height='1' width='1' alt=''>");
 }
}

//////////////////////
// Weboscope on/off //
/////////////////////

webo_ok = 1
click_ok = 1

//-->