
var bw = new verifyCompatibleBrowser();
var lstart = 50;
var loop = true; 
var speed = 70;
var pr_step = 1;
var delay = 2000000;

function ConstructObject(obj,nest)
{ 
    nest=(!nest) ? '':'document.'+nest+'.';
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0; 
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0; 
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight;
    this.areaScroll=areaScroll; 
    this.moveIt=b_moveIt; this.x; this.y; 
    this.obj = obj + "Object"; 
    eval(this.obj + "=this");
    return this;
} 

function b_moveIt(x,y)
{ 
    this.x=x;this.y=y;
    this.css.left=this.x;
    this.css.top=this.y;
} 

function areaScroll(speed)
{ 
   if (loop)
   {
       if(this.y==0 || this.y==-this.scrollHeight/2)
           for (i = 0; i <= delay; i++);
       if(this.y>-this.scrollHeight)
       { 
           this.moveIt(0,this.y-pr_step);
           setTimeout(this.obj+".areaScroll("+speed+")",speed);
       }
       else 
           if(loop)
           {
               this.moveIt(0,lstart);
               eval(this.obj+".areaScroll("+speed+")");
           } 
   }
}

function InitBestBuyScrollArea()
{ 
    objContainer = new ConstructObject('divBestBuyArea');
    objContent = new ConstructObject('divBestBuyList','divBestBuyArea');
    objContent.moveIt(0, lstart);
    objContainer.css.visibility = 'visible';
    objContent.areaScroll(speed);
} 
