/* 	
	weboscope.js					 
	Weboscope version 4.0 copyright Weborama 04-01-2003
*/

//Code performance pour le référencement naturel
if (document.cookie.indexOf('perfvisite')==-1)
{
	var  cur_domaine = this.location.host;
	tab_points = new Array();
	tab_points = this.location.host.split('.');
	if(tab_points.length>2) cur_domaine = cur_domaine.substring(cur_domaine.indexOf('.')+1,cur_domaine.length);
	if(document.referrer)
	{
		if(document.referrer.indexOf(cur_domaine)==-1)
		{
			var mlien = 2703;  
			if(document.referrer.indexOf('.google.')>=0) mlien=2698;
			if(document.referrer.indexOf('.voila.')>=0) mlien=2699;
			if(document.referrer.indexOf('.msn.')>=0) mlien=2700;
			if(document.referrer.indexOf('.yahoo.')>=0) mlien=2701;
			var mclic = new Image();
			mclic.src = 'http://perf.weborama.fr/fcgi-bin/performance.fcgi?ID=108954&A=1&L=' + mlien + '&C=175&P=533&T=I&W=1&URL=http%3A%2F%2Fstatic.weborama.fr%2Fimages%2Ftransp.gif&NREF='+escape(document.referrer);
		}
	}
	document.cookie = "perfvisite=1;path=/";
}


function get_webo_arg_zpi(_WEBOZONE,_WEBOPAGE,_WEBOID,_ACC,_WEBOID2,_WEBOZONE2,_WEBOPAGE2)
{
        var wbs_da=new Date();
        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;
	}
	if((_ACC != null)&&(wbs_nav!="Netscape"))
	{
		var reftmp = 'parent.document.referrer';
		if((_ACC<5)&&(_ACC>0))
		{
			for(_k=_ACC;_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 = ".weborama.fr/fcgi-bin/comptage.fcgi?ID="+_WEBOID;
	if ( location.protocol == 'https:'){
	 	wbs_arg = "https://ssl" + wbs_arg;
	}
	else {
		wbs_arg =  "http://pro" + wbs_arg; 
	}
	wbs_arg+="&ZONE="+_WEBOZONE+"&PAGE="+_WEBOPAGE;
	
	if(_WEBOID2 != null)
	{
		wbs_arg += "&ID2=" + _WEBOID2;
		if((_WEBOZONE2 != null) && (_WEBOPAGE2  != null ))
		{
			wbs_arg+="&ZONE2="+_WEBOZONE2+"&PAGE2="+_WEBOPAGE2;
		}
	}
	
		
	wbs_arg+="&ver=2&da2="+wbs_da+"&ta="+wbs_ta+"&co="+wbs_co+"&ref="+wbs_ref;
	return wbs_arg;
}



function webo_zpi(_WEBOZONE,_WEBOPAGE,_WEBOID,_ACC)
{
	var mes_wbs_arg = get_webo_arg_zpi(_WEBOZONE,_WEBOPAGE,_WEBOID,_ACC);
	if (parseInt(navigator.appVersion)>=3)
	{
		var webo_compteur = new Image(1,1);
		webo_compteur.src=mes_wbs_arg;
	}
	else
	{
		document.write('<IMG SRC="'+wbs_arg+wbs_t);
	}
}

// Fonctions pour le multi_requetage
function webo_mutu_zpii(_WEBOZONE,_WEBOPAGE,_WEBOID1,_WEBOID2,_ACC)
{
	var mes_wbs_arg = get_webo_arg_zpi(_WEBOZONE,_WEBOPAGE,_WEBOID1,_ACC,_WEBOID2);
	var webo_compteur = new Image(1,1);
	webo_compteur.src=mes_wbs_arg;
}

function webo_mutu_libre_zpi(_WEBOZONE,_WEBOPAGE,_WEBOID,_WEBOZONE2,_WEBOPAGE2,_WEBOID2,_ACC)
{
	var mes_wbs_arg = get_webo_arg_zpi(_WEBOZONE,_WEBOPAGE,_WEBOID,_ACC,_WEBOID2,_WEBOZONE2,_WEBOPAGE2);
	var webo_compteur = new Image(1,1);
	webo_compteur.src=mes_wbs_arg;
}


// Compatible
function webossl_zpi(_WEBOZONE,_WEBOPAGE,_WEBOID,_ACC) {
	webo_zpi(_WEBOZONE,_WEBOPAGE,_WEBOID,_ACC);
}

function flash_zpi(_WEBOZONE,_WEBOPAGE,_WEBOID,_ACC) {
	webo_zpi(_WEBOZONE,_WEBOPAGE,_WEBOID,_ACC);
}

webo_ok = 1;
webossl_ok = 1;
weboflash_ok=1;
