function oespy(){};
oespy.logs="http://flogs.orange.es/";
oespy.partners="uol starmedia";
oespy.sep=".-.-.";
oespy.log=true;
oespy.imagen=new Image();
oespy.setExt=function(cadena)
{
if(!cadena)return 'p.html';
if(cadena.indexOf('.')==-1)return cadena+'.html';
var re=/(.*)(\..*)$/
return cadena.replace(re,"$1.html");
}
oespy.getBase=function(domain,canal,paz,page)
{
return (domain?(domain+'/'):'')
+(canal?(canal+'/'):'')
+(paz?(paz+'/'):'')
+escape(this.setExt(page));
}
oespy.getUrl=function(log,first,domain,canal,paz,page,random,kw)
{
return this.logs
+this.getBase(domain,canal,paz,page)+'?'
+'ord='+random+(kw?('&kw='+escape(kw)):'');
}
oespy.init=function(domain,canal,paz,page,random,kw)
{
if(!random)random=(''+new Date().getTime()).substring(4)+(''+Math.random(1)).substring(2,6);
if(!domain)domain='www.orange.es';
if(!canal)canal='';
if(!paz)paz='';
if(!page)page='p';
if(!kw)kw='';
this.domain=domain;
this.canal=canal;
this.paz=paz;
this.page=page;
this.kw=kw;
this.src=this.getUrl(this.log,this.first,this.domain,this.canal,this.paz,this.page,random,this.kw);
}

oespy.get=function()
{
if((typeof noLog!="undefined")&&noLog)
    return;
var xspylt = 0;
if(typeof emspy!="undefined")
  xspylt = emspy.lt;
else if(typeof smspy!="undefined")
  xspylt = smspy.lt;
var oespy_load_time = (new Date().getTime() - xspylt)/1000;
this.src+="&loadtime="+oespy_load_time;
this.imagen.src=this.src;
}
oespy.reload=function(domain,canal,paz,page,random,kw)
{
this.init(domain?domain:this.domain,canal?canal:this.canal,paz?paz:this.paz,page?page:this.page,null,kw?kw:this.kw);
this.get();
}
if((typeof noLog!="undefined")&&noLog)oespy.log=false;
oespy.domain=(typeof logInternacional!="undefined")?((logInternacional.constructor==Array)?logInternacional[parseInt(Math.random()*logInternacional.length)]:logInternacional):((typeof logDomain!="undefined")?logDomain:"");
if(window.name!=''&&oespy.partners.indexOf(window.name)!=-1)oespy.domain=window.name+"."+oespy.domain;
oespy.init(oespy.domain,
(typeof logChannel!="undefined")?logChannel:"",
(typeof logPath!="undefined")?logPath:"",
(typeof logPage!="undefined")?logPage:"",
null,(typeof kw!="undefined")?kw:"");
oespy.get();
//document.write("<br>"+oespy.src);
