function float(_id) {
this . adnum = 0;
this . items = [];
this . left contents = [];
this . right contents = [];
this.id = _ id
this.y = 80
this.steptime = 3000
this.tt = null
this.leftDiv = null
this . .rightDiv = null
이 . addleftcontents = function(innerTxt){
var newContent = innerTxt
this . 왼쪽 내용[this . 왼쪽 내용 . 길이] = 새 콘텐츠;
}
이 . addrigthcontents = function(innerTxt){
var newContent = innerTxt
this . 오른쪽 내용[this . 오른쪽 내용 . length] = new content;
}
this . LoopScrll = function(){
if(this . ADNUM & LT; this . 왼쪽 내용 . length-1){ this . adnum++; } else { this . adnum = 0; }
var clossdiv = ' & ltdiv style = " Z-INDEX:9999; 위치:절대; width:100 px; height:30pxalign:right; "onclick = " + this . id + ". closs div()" align = " right " & gt; close
this . left div . innerhtml = closs div+this . 왼쪽 내용[이 . adnum];
this . right div . innerhtml = closs div+this . 오른쪽 내용[이 . adnum];
this . move();
//window . clear interval(this . TT);
this . id . timer = setTimeout(this . id + ". play()", this . step time);
}
this.initFloaters = function()
{
document . write(' & lt; DIV id = '+this . id+" 1 "+' style = " Z-INDEX:10; 위치:절대; 너비:100px; 높이:300px 왼쪽:6; top:'+(typeof(this.y)=='string '? eval(this . y):this . y)+' " & gt; & lt/DIV & gt;');
document . write(' & lt; DIV id = '+this . id+" 2 "+' style = " Z-INDEX:10; 위치:절대; 너비:100px; 높이:300pxleft:'+(document . body . client width-106)+'; top:'+(typeof(this.y)=='string '?eval(this . y):this . y)+' " & gt; & lt/DIV & gt;');
this . left div = document . getelementbyid(this . id+" 1));
this . right div = document . getelementbyid(this . id+" 2));
}
this.play = function(){
this . loops crll();
this.tt = setInterval(this .id+'. move()', 500);
}
}
this.move=function(){
//alert("ffff ")
if(window . screen . width & lt; = 800 ){
this . left div . style . display = " none ";
this . right div . style . display = " none ";
반환;
}
이 . left div . style . top = document . 문서 요소 . scroll top+this . y
이 . 오른쪽 div . top = document . top = document . 문서 요소 . 스크롤 상단+이 . y
이 . 왼쪽 div . style . 왼쪽 = 문서 . 문서 요소 . 스크롤 왼쪽+6
this . right div . style . left = document . 문서 요소 . 왼쪽 스크롤+문서 . 문서 요소 . 클라이언트 너비 - 이 . right div . offsetwidth-16
/*
이 . left div . top = math . top = math . random()* 100
this . right div . style . top = math . random()* 500
this . left div . style . left = math . random()* 200
this . right div . style . left = math . random()* 800
*/
}
this.clossDiv=function(){
this . left div . style . display = " none ";
this . right div . style . display = " none ";
}
}
/*공개 섹션의 끝 */
/*광고 js 파일 */
var theFloaters = new floater("the floaters")
theFloaters . y = 130;
thefloaters . addleftcontents(" & lt; a href = ' ' target = ' _ blank ' & gt& ltimg src = '/EC bay/images/ad/100 x300 . ' gif ' border = ' 0 '/& gt; & lt/a >;);
thefloaters . addleftcontents(" & lt; a href = ' ' target = ' _ blank ' & gt& ltimg src = '/EC bay/images/ad/100 x 3002 . ' gif ' border = ' 0 '/& gt; & lt/a >;);
thefloaters . addleftcontents(" & lt; a href = ' ' target = ' _ blank ' & gt& ltimg src = '/EC bay/images/ad/100 x 300 . ' gif ' border = ' 0 '/& gt; & lt/a >;);
thefloaters . addrightcontents(" & lt; a href = ' ' target = ' _ blank ' & gt& ltimg src = '/EC bay/images/ad/100 x300 . ' gif ' border = ' 0 '/& gt; & lt/a >;);
thefloaters . addrightcontents(" & lt; a href = ' ' target = ' _ blank ' & gt& ltimg src = '/EC bay/images/ad/100 x 3002 . ' gif ' border = ' 0 '/& gt; & lt/a >;);
thefloaters . addrightcontents(" & lt; a href = ' ' target = ' _ blank ' & gt& ltimg src = '/EC bay/images/ad/100 x 300 . ' gif ' border = ' 0 '/& gt; & lt/a >;);
thefloaters . init floaters();
thefloaters . play();
LZ, 해보세요