document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <script type="text/javascript">
  2. var fadeEffect=function(){
  3.     return{
  4.         init:function(id, flag, target){
  5.             this.elem = document.getElementById(id);
  6.             clearInterval(this.elem.si);
  7.             this.target = target ? target : flag ? 100 : 0;
  8.             this.flag = flag || -1;
  9.             this.alpha = this.elem.style.opacity ? parseFloat(this.elem.style.opacity) * 100 : 0;
  10.             this.si = setInterval(function(){fadeEffect.tween()}, 20);
  11.         },
  12.         tween:function(){
  13.             if(this.alpha == this.target){
  14.                 clearInterval(this.elem.si);
  15.             }else{
  16.                 var value = Math.round(this.alpha + ((this.target - this.alpha) * .05)) + (1 * this.flag);
  17.                 this.elem.style.opacity = value / 100;
  18.                 this.elem.style.filter = \'alpha(opacity=\' + value + \')\';
  19.                 this.alpha = value
  20.             }
  21.         }
  22.     }
  23. }();
  24. </script>
');