var delta=0.015;
' u/ e( }7 ]6 Z var collection; v2 z4 V7 C% _4 m8 b
var closeB=false;
/ r' E- E. S* l9 \ function floaters() {6 a) C& k+ L# M+ D& e* M
this.items = [];
$ ^- M$ H% U/ \: S2 g: n this.addItem = function(id,x,y,content)
2 q& f5 {! k3 H' ] {% K7 s M, Y0 k. n& @" _& p7 C& \
document.write(';<DIV id=';+id+'; style="Z-INDEX: 10; POSITION: absolute; width:80px; height:60px;left:';+(typeof(x)==';string';?eval(x):x)+';;top:';+(typeof(y)==';string';?eval(y):y)+';">';+content+';</DIV>';);6 A+ f/ V5 j2 X0 x" Z: w! x
. F/ Z" _- v" {' D$ h- r* P, o
var newItem = {};
1 M: k( a- l$ I$ n- a+ E3 c+ x) l- t newItem.object = document.getElementById(id);) E! i0 L& j& m# Q& n- e
newItem.x = x;9 Q. A- y; ^, \2 V* }0 e
newItem.y = y;
) ^* s; L. I1 t this.items[this.items.length] = newItem;; [3 H& S( e% Y' `" q9 ^0 e; B
}
7 `1 P+ ~( x& p this.play = function()
" _% [* l f3 z+ T/ g) L {
& j/ P I8 L) s2 T3 Q0 M4 V2 V4 M$ B collection = this.items' Z; k8 x/ ]6 m1 v
setInterval(';play()';,30);
. m) u& m/ B& j8 ^2 p( \' v }
6 f+ u2 {1 t- S- M. M }
+ l. i2 F% G& [, t" X. ] function play()
5 |' C7 h: F- u: V: D6 X$ c {+ e8 F: I" S# Y. y* W
if(screen.width<=800 || closeB)
2 b4 U" L5 L5 ~) B' H9 L {$ ~9 B( S7 V) z
for(var i=0;i<collection.length;i++)4 ?! g& j. o0 Y: q+ {
{/ F0 ~3 k9 w& u4 Q6 f4 X) G
collection.object.style.display = ';none';;4 K, K- S2 Q) ?8 ^+ s7 y/ m
}
/ U: q t: w& y; N* D' u# a return;
$ S2 ^. B" d# y u6 }, G0 M3 u }2 R, r# r( a5 f: @* p$ ?( q
for(var i=0;i<collection.length;i++)
5 P$ F. k5 q3 x {
! n- e: T% x, U0 E var followObj = collection.object;
0 ]" D1 _" }6 d( x& u, ^ var followObj_x = (typeof(collection.x)==';string';?eval(collection.x):collection.x);$ y& \. K' a d: s
var followObj_y = (typeof(collection.y)==';string';?eval(collection.y):collection.y);) u) A x, O2 h3 D7 ^4 Q5 F1 }1 p
if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
% Y, q! q0 D+ Z I var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
& z* \# U/ N0 W; R; y5 f dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
; \, w/ P$ F( b1 i. M' V) i followObj.style.left=followObj.offsetLeft+dx;
+ y2 h M R5 f) o# V9 ^ }
7 C9 } B4 V" w; U! Y9 L" s# A if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
8 c/ n- P O* O) T* B/ ? var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
) ^) ~5 a! X1 ?! H, t- b dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));. I ^0 j9 O; l: b' ?
followObj.style.top=followObj.offsetTop+dy;
/ v% H6 o; O$ x3 X+ d6 m }
$ e1 I6 V- D9 x& w3 Q/ g$ T followObj.style.display = ';';;
% K' h% C$ @+ J* ?; A }3 ]- ]8 |: M# D4 o
} 1 ]3 O: W+ Y3 M! I' {5 K* r; q
function closeBanner()
# x4 s- {$ J, U {
0 w5 I" T" @2 {6 t closeB=true;. t" Z' R0 m( y- u* O
return;
7 X. K: G' z: B7 l' y }9 X6 }" f) _2 d
var theFloaters = new floaters();
# M( K% K k1 u7 B //
2 x) h0 [9 D# M, O theFloaters.addItem(';followDiv1';,';document.body.clientWidth-100';,0,';<a onClick="closeBanner();" href=http://www.dfeng.net target=_blank><img src=ad/doublead/right.gif width=100 height=554 border=0></a><br><br><img src=ad/doublead/close.gif onClick="closeBanner();">';);
; k9 B% ]. H( C. q$ E8 m theFloaters.addItem(';followDiv2';,0,0,';<a onClick="closeBanner();" href=http://www.dfeng.net target=_blank><img src=ad/doublead/ad_ad.gif width=100 height=400 border=0 ></a><br><br><img src=ad/doublead/close.gif onClick="closeBanner();">';);9 E. ]1 d$ l6 m9 _& p8 q
theFloaters.play();! \$ Y' x8 V, p8 T
|