imgTrack=function(intTimeout, strPathCounter){
	this.intTimeout=intTimeout;
	this.curTimeout=null;
	if((strPathCounter!='')&&(strPathCounter!=null)&&(strPathCounter!='undefined'))
			this.pathCounter=strPathCounter;
		else
			this.pathCounter='http://adimg.alice.it/tracks/bi/images/kpi.gif';
}
imgTrack.prototype={
	callBIGif:function(theParameter,fncGoPage){
		try{
			
			if(this.curTimeout!=null)
				{clearTimeout(this.curTimeout);}
				
			if((fncGoPage!=null)&&(fncGoPage!='undefined'))
				{this.fncGoPage=fncGoPage;}
			else
				{this.fncGoPage=null;}
				
			var strPathCounter=this.pathCounter;
			strUrlCounter=strPathCounter+'?'+theParameter+'&rand='+Math.floor(1000000*Math.random());
			var objRequest=this;
			var returnsTimeout=function(){return objRequest.timeoutBI();};
			var returns=function(){return objRequest.callBackBI();};
			var imgBi = document.createElement("IMG");
			imgBi.id="imgBi";
			imgBi.onload=returns;
			imgBi.src=strUrlCounter;
			document.body.appendChild(imgBi);
			this.curTimeout=setTimeout(returnsTimeout,this.intTimeout);
		}
		catch(e){return true;}	
	},
	callBackBI:function(){
		try{
			if(this.curTimeout!=null)
				clearTimeout(this.curTimeout);
			if(this.fncGoPage!=null)
				{this.fncGoPage();return false;}
		}
		catch(e){return true;}	
	},
	timeoutBI:function(){
		try{
			if(this.curTimeout!=null)
				clearTimeout(this.curTimeout);
			if(this.fncGoPage!=null)
				{this.fncGoPage();return false;}
		}
		catch(e){return true;}	
	}
}