// JavaScript Document
function suport_online(destDiv){
   
  this.destDiv=document.getElementById(destDiv);
  var that=this;   
  
  var winW = 630, winH = 460;
  var targetx=0,targety=0;
  
  this.getScrollY=function() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return scrOfY;
}
  
  this.getsize=function(){
  
  if (document.body && document.body.offsetWidth) {
     winW = document.body.offsetWidth;
     winH = document.body.offsetHeight;
   }
   if (document.compatMode=='CSS1Compat' &&
    document.documentElement &&
    document.documentElement.offsetWidth ) {
    winW = document.documentElement.offsetWidth;
    winH = document.documentElement.offsetHeight;
   }
   if (window.innerWidth && window.innerHeight) {
      winW = window.innerWidth;
      winH = window.innerHeight;
   }
    
    targetx=winW-45-15;
    targety=this.getScrollY()+(winH-208)/2;
  
   }
   
   this.positioning=function(){
   
      this.destDiv.style.left=targetx+"px";
      this.destDiv.style.top=(this.destDiv.offsetTop+(targety-this.destDiv.offsetTop)/10)+"px";
   
   }
   
   setInterval(this.positioning,10);
   
   
   window.onscroll=function(){
     that.getsize();
   }
   
   this.getsize();
  
   this.destDiv.style.left=targetx+"px";
   this.destDiv.style.top=targety+"px";
   that.positioning();
}

