function banner(){};
banner.banners={};
banner.init=function( objs )
{
var obj=(objs.constructor==Array)?objs[new Date().getTime()%objs.length]:objs;
this.random=(obj.random?obj.random:(''+new Date().getTime()).substring(4)+(''+Math.random(1)).substring(2,6));
this.svr='http://ad.es.doubleclick.net';
this.site=(obj.site?obj.site:'eresmas');
this.area=(obj.area?obj.area:'home');
this.place=this.site+'/'+this.area;
this.nd=obj&&obj.nd?obj.nd:false;
this.kw=obj.kw;
}
banner.getDesc=function(obj)
{
return this.place+(obj.pos=='1'&&!this.nd?';dcopt=ist':'')+';sz='+obj.wid+'x'+obj.hei+';ptile=1;ord='+this.random+';kw='+(this.kw?this.kw:'');
}
banner.begin=function(obj)
{
var pos=obj&&obj.pos?obj.pos:'1';
var wid=obj&&obj.wid?obj.wid:(pos=='2'?'120':'468');
var hei=obj&&obj.hei?obj.hei:(pos=='2'?'600':'60');
var w=obj&&obj.win?obj.win:window;
var d=w.document;
this.banners[pos]={wid:wid,hei:hei,pos:pos,w:w};
var desc=this.getDesc(this.banners[pos]);
var r='<SCR'+'IPT SRC="'+this.svr+'/adj/'+desc+'?">'+
'document.write(\'<A HREF="'+this.svr+'/jump/'+desc+';abr=!ie4;abr=!ie5;abr=!nn2;abr=!nn3;abr=!nn4?">\');'+
'document.write(\'<IMG SRC="'+this.svr+'/ad/'+desc+';abr=!ie4;abr=!ie5;abr=!nn2;abr=!nn3;abr=!nn4?" border=0 width="'+wid+'" height="'+hei+'"></A>\');</SCR'+'IPT>';
if (obj&&obj.nw) return r;
d.write(r);
}
banner.end=function(obj)
{
return '';
}
banner.finish=function(w)
{
}
banner.reload=function(obj)
{
}
