function isIE6(){var a=navigator.appName;var b=navigator.appVersion;var c=b.split(";");var d="";if(c[1]!=null)d=c[1].replace(/[ ]/g,"");if(a=="Microsoft Internet Explorer"&&d=="MSIE6.0")return true;else return false}function FloatingModule(){this.myie=document.all;this.right_edge=0;this.expandState=0;this.ie=document.all?1:0;this.ns=document.layers?1:0;this.master=new Object("element");this.master.curLeft=this.right_edge;this.master.curTop=10;this.master.gapLeft=0;this.master.gapTop=0;this.master.timer=null;this.isleft=1;this.myController="";this.myFormID=""}FloatingModule.prototype.Init=function(a,b,c,d,e,f,g,h,i,j){this.isleft=d;this.myController="Floating"+a;this.myFormID=e;this.imageWidth=c;this.imageHeight=h;this.myie=document.all;this.alwaysfloating=g;if(j!=null&&j>0)this.left=j;else this.left=0;this.expandState=0;if(f!=null&&f>0)this.top=f;else this.top=0;this.strWidth=b;this.strHeight=i;this.lastClientHeight=this.isiebody().clientHeight;this.right_edge=this.isiebody().clientWidth-c;if(this.alwaysfloating==0){if(this.isleft==1){this.strleft=0;this.strhleft=-b}else if(this.isleft==0){this.strleft=this.right_edge-b;this.strhleft=this.right_edge}else if(this.isleft==2){this.top=0;this.strleft=this.left;this.strhleft=this.left}else{this.top=this.isiebody().clientHeight-h;this.strleft=this.left;this.strhleft=this.left}}else{if(this.isleft==3)this.top=this.isiebody().clientHeight-i-h;else this.top=f;if(this.isleft!=0){this.strleft=this.left;this.strhleft=this.left}else{this.strleft=this.right_edge-this.left-b;this.strhleft=this.right_edge-this.left-b}if(this.isleft==4){this.strleft=this.left;this.strhleft=this.left;this.top=f}}this.containerwidth=b+c;document.getElementById(this.myFormID).style.left=this.strhleft+"px";document.getElementById(this.myFormID).style.top=this.top+"px";document.getElementById(this.myFormID).style.width=this.containerwidth+"px";if(document.compatMode&&document.compatMode!="BackCompat"&&!isIE6())document.getElementById(this.myFormID).style.position="fixed";else document.getElementById(this.myFormID).style.position="absolute";document.getElementById(this.myFormID).style.zIndex="99999";this.ie=document.all?1:0;this.ns=document.layers?1:0;this.master=new Object("element");this.master.curLeft=this.strhleft;this.master.curTop=this.top;this.master.gapLeft=0;this.master.gapTop=0;this.master.timer=null;setInterval(this.myController+".FixY()",100);if(this.alwaysfloating==0){this.expandState=0;this.setPace(this.myFormID,this.strhleft,this.top,20)}else{this.expandState=1;this.setPace(this.myFormID,this.strleft,this.top,20)}};FloatingModule.prototype.moveAlong=function(a,b,c,d,e){clearTimeout(this.master.timer);if(this.master.curLeft!=d&&this.isleft<=1){if(Math.max(this.master.curLeft,d)-Math.min(this.master.curLeft,d)<b){this.master.curLeft=d}else if(this.master.curLeft<d){this.master.curLeft=this.master.curLeft+b}else if(this.master.curLeft>d){this.master.curLeft=this.master.curLeft-b}if(this.ie){document.getElementById(a).style.left=this.master.curLeft}else{document.getElementById(a).style.left=this.master.curLeft+"px"}}if(document.compatMode&&document.compatMode!="BackCompat"&&!isIE6()){if(this.isleft==3){if(this.expandState==0)this.master.curTop=this.isiebody().clientHeight-this.imageHeight;else this.master.curTop=this.isiebody().clientHeight-this.imageHeight-this.strHeight;if(this.ie){document.getElementById(a).style.top=this.master.curTop}else{document.getElementById(a).style.top=this.master.curTop+"px"}}}else{if(this.isleft==3&&this.lastClientHeight!=this.isiebody().clientHeight){clearTimeout(this.master.timer);this.lastClientHeight=this.isiebody().clientHeight;if(this.expandState==0)this.master.curTop=this.isiebody().clientHeight-this.imageHeight;else this.master.curTop=this.isiebody().clientHeight-this.imageHeight-this.strHeight;if(this.ie){document.getElementById(a).style.top=this.master.curTop}else{document.getElementById(a).style.top=this.master.curTop+"px"}this.top=this.master.curTop;this.setPace(a,d,this.lastClientHeight-this.imageHeight,20);return}else if(this.master.curTop!=e){if(Math.max(this.master.curTop,e)-Math.min(this.master.curTop,e)<c){this.master.curTop=e}else if(this.master.curTop<e){this.master.curTop=this.master.curTop+c}else if(this.master.curTop>e){this.master.curTop=this.master.curTop-c}if(this.ie){document.getElementById(a).style.top=this.master.curTop}else{document.getElementById(a).style.top=this.master.curTop+"px"}}}this.master.timer=setTimeout(this.myController+'.moveAlong("'+a+'",'+b+","+c+","+d+","+e+")",30)};FloatingModule.prototype.setPace=function(a,b,c,d){this.master.gapLeft=(Math.max(this.master.curLeft,b)-Math.min(this.master.curLeft,b))/d;this.master.gapTop=(Math.max(this.master.curTop,c)-Math.min(this.master.curTop,c))/d;this.moveAlong(a,this.master.gapLeft,this.master.gapTop,b,c)};FloatingModule.prototype.FixY=function(){this.right_edge=this.isiebody().clientWidth-this.imageWidth;if(this.isleft!=1&&this.strhleft!=this.right_edge){this.strhleft=this.right_edge;this.strleft=this.right_edge-this.strWidth;if(this.expandState==0)this.setPace(this.myFormID,this.strhleft,this.isiebody().scrollTop+this.top,20);else this.setPace(this.myFormID,this.strleft,this.isiebody().scrollTop+this.top,20);return}var a;if(this.expandState==0){a=this.strhleft}else{a=this.strleft}if(Math.abs(this.master.curTop-this.isiebody().scrollTop-this.top)>=1)this.setPace(this.myFormID,a,this.isiebody().scrollTop+this.top,20)};FloatingModule.prototype.isiebody=function(){return document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body};FloatingModule.prototype.expand=function(){var a;if(document.body.scrollTop>0)a=document.body.scrollTop+this.top;else a=document.documentElement.scrollTop+this.top;if(this.expandState==0){this.setPace(this.myFormID,this.strleft,a,20);this.expandState=1}else{this.setPace(this.myFormID,this.strhleft,a,20);this.expandState=0}};FloatingModule.prototype.expand3=function(){if(this.expandState==0){this.master.curTop=this.isiebody().clientHeight-this.imageHeight-this.strHeight;this.expandState=1}else{this.master.curTop=this.isiebody().clientHeight-this.imageHeight;this.expandState=0}if(this.ie){document.getElementById(this.myFormID).style.top=this.master.curTop}else{document.getElementById(this.myFormID).style.top=this.master.curTop+"px"}this.top=this.master.curTop;this.setPace(this.myFormID,this.strleft,this.master.curTop,20)}
