function floatObj(a,b,c,d,e){
this.obj = a;
if(b==1){
this.obj.style.position = 'relative';
}else{
this.obj.style.position = 'absolute';
}
this.obj.style.top = 0;
this.obj.style.left = e ? 'auto' : 0;
this.obj.style.right = e ? '0' : 'auto';
this.f = b || 0;
this.firstScroll = this.lastScroll = -c || 0;
this.itvl = null;
this.speed = d || .2
if (document.documentElement && document.documentElement.scrollTop)
this.diffY = document.documentElement.scrollTop;
else if (document.body)
this.diffY = document.body.scrollTop
else
{/*Netscape stuff*/}
if(this.f == 2){
this.lastScroll = this.obj.offsetHeight - getSize()[3] - this.diffY
this.firstScroll = this.lastScroll - c
}
this.originTop = this.obj.offsetTop;
this.sideFloat = function(){
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
diffY = document.documentElement.scrollTop;
else if (document.body)
diffY = document.body.scrollTop
else
{/*Netscape stuff*/}
if(this.f == 1){
var tmpsp = this.speed*(diffY - this.originTop - this.lastScroll)
var percent= diffY - this.originTop > 0 ? tmpsp : this.obj.offsetTop > this.originTop ?  tmpsp  : 0;
}else if(this.f == 2){
var percent=this.speed*(- this.lastScroll  + this.firstScroll + getSize()[3] + diffY - this.obj.offsetHeight);
}else{
var percent=this.speed*(diffY - this.lastScroll);
}
percent = percent>0 ? Math.ceil(percent) : percent=Math.floor(percent)
this.obj.style.top = this.obj.style.top == "" ? "0px" : this.obj.style.top
this.obj.style.top = parseInt(this.obj.style.top) + percent + "px"
if(this.f==1){
this.obj.style.top = parseInt(this.obj.style.top) < 0 ? 0 : this.obj.style.top
}
this.lastScroll += percent;
};
this.close = function () {
clearInterval(this.itvl);
this.obj.style.display = "none";
};
}
function fltCreate(id,str,b,c,d,e){
var fs = getElementsByClassName('fltobj','div',document);
if(fs.length > 0){
return
}
var obj = document.createElement('div');
obj.innerHTML = str;
var cl = document.createElement('div');
cl.innerHTML =  'x ¹Ø±Õ';
obj.appendChild(cl);
$(id).appendChild(obj);
fltSet(obj,cl,b,c,d,e)
}
function fltSet(obj,cl,b,c,d,e){
var fltobj_1 = new floatObj(obj,b,c,d,e);
obj.setAttribute('val', b + ',' + c + ',' + d + ',' + e)
obj.className = 'fltobj';
cl.style.color = '#000'
cl.style.cursor = 'pointer';
cl.style.textAlign = 'center';
cl.onmouseover = function (){
this.style.color = '#c80000';
}
cl.onmouseout = function (){
this.style.color = '#000';
}
cl.onclick = function (){
fltobj_1.close();
}
window.setInterval(function () {
if(typeof setInnerALink == "function"){
setInnerALink(fltobj_1.obj);
}
fltobj_1.sideFloat();
},1);
}
function fltInitialize(){
var fs = getElementsByClassName('fltobj','div',document);
var i = fs.length;
while( i-- > 0 ){
var v = fs[i].getAttribute('val').split(',');
fs[i].style.display = 'block';
fltSet(fs[i],getLastElementChild(fs[i]),parseInt(v[0]),parseInt(v[1]),parseInt(v[2]),parseInt(v[3]))
}
}
addEvent(window,'load',function (){
try{fltInitialize()}catch(e){}
})
